Manage artifactory config resources
Closed this issue · 5 comments
Should we expose functionality for managing resources/objects that are part of the main Artifactory config? Things that come to mind include: repository layouts, property sets and backup schedules.
Alternatively this could just exist as part of the Chef resources we are going to create. It may be easier to do reason about things in an idempotent way in these HWRPs.
@schisamo could you provide an example of what you mean? What config items? There's already the ability to put a new config file to the server, but I don't see a way to manage partial configs from their API.
@sethvargo Unfortunately I don't think there is a way to manage partial configs via the API.
The first case I have in mind is managing repository layouts. Here is an example of that bit of partial config:
GET http://admin:password@localhost:8081/artifactory/api/system/configuration
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<config xmlns="http://artifactory.jfrog.org/xsd/1.5.3" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jfrog.org/xsd/artifactory-v1_5_3.xsd">
...
<repoLayouts>
...
<repoLayout>
<name>omnibus-default</name>
<artifactPathPattern>[orgPath]/[module]/[baseRev]/[module](_)(-)[baseRev2<(?:\d*)\.(?:\d*)\.(?:\d*)(?:-|_)?(?:alpha|beta|rc)?(?:\.\d+)?>](\+[fileItegRev])-[packageIteration<(?:[0-9]+)>].[platformVersionArch<[0-9A-Za-z._]*>].[ext]</artifactPathPattern>
<distinctiveDescriptorPathPattern>true</distinctiveDescriptorPathPattern>
<descriptorPathPattern>[orgPath]/[module]/[baseRev]/[module](_)(-)[baseRev2<(?:\d*)\.(?:\d*)\.(?:\d*)(?:-|_)?(?:alpha|beta|rc)?(?:\.\d+)?>](\+[fileItegRev])-[packageIteration<(?:[0-9]+)>].[platformVersionArch<[0-9A-Za-z._]*>].[ext].metadata.json</descriptorPathPattern>
<folderIntegrationRevisionRegExp>.*</folderIntegrationRevisionRegExp>
<fileIntegrationRevisionRegExp>(?:\d{14}(?:\.git\.\d+\.[a-f0-9]{7}))?</fileIntegrationRevisionRegExp>
</repoLayout>
</repoLayouts>
...
</config>
As mentioned in the issue description: this sort off functionality might make the most sense as part of an HWRP in the artifactory cookbook.
@schisamo okay. I'm going to remove the milestone and focus on testing/finishing the API for this "sprint". We can revisit this once everything is tested.
👍
There are currently things that are unmanaged, but it's a WIP.