Resolution

How to use a Configuration Management tool for Artifactory configurations?

AuthorFullName__c
Disha Meswania
articleNumber
000004260
ft:sourceType
Salesforce
FirstPublishedDate
2018-09-10T08:07:56Z
lastModifiedDate
2023-01-22T11:11:00Z
VersionNumber
5

   - Using XML for configuration management

To import configurations for a new Artifactory instance, you can use the ‘artifactory.config.import.xml’ for importing configurations from an older instance. You need to place this file under <ARTIFACTORY_HOME>/etc folder.

You can use this incrementally also, you can make a copy of ‘artifactory.config.latest.xml’ file, rename it as ‘artifactory.config.import.xml’ and place it under <ARTIFACTORY_HOME>/etc folder. In order for these changes to be effective, you will have to restart Artifactory. You will observe that once Artifactory is restarted, import file is missing again from etc folder and config changes are consumed.

   - Using YAML for configuration management

Artifactory supports making multiple changes through YAML files. You make reference this link for viewing all supported configuration changes.

All you need to do is, create the YAML file and apply the configuration changes using curl command as per the below example:

curl -u<username>:<password> -X PATCH "http://localhost:8081/artifactory/api/system/configuration" -H “Content-Type: application/yaml” -T configuration.yml

Please note, this doesn’t require Artifactory restart and you can see the changes taking place immediately after a refresh.