Artifactory Bootstrap
Bootstrap Artifactory Helm admin credentials and initial configuration automatically during deployment via values.yaml.
Bootstrap the Artifactory admin password and configuration with Helm Charts.
Bootstrap the Artifactory Admin Password
You can bootstrap the admin user password as described in Recreating the Default Admin User.
-
Create
admin-creds-values.yamland provide the IP (by default 127.0.0.1) and password.artifactory: admin: ip: "<IP_RANGE>" # Example: "*" to allow access from anywhere username: "admin" password: "<PASSWD>" -
Apply the
admin-creds-values.yamlfile.Artifactory
helm upgrade --install artifactory --namespace artifactory jfrog/artifactory -f admin-creds-values.yamlArtifactory HA
helm upgrade --install artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha -f admin-creds-values.yaml -
Restart the Artifactory pod (
kubectl delete pod <pod_name>).
Bootstrap the Artifactory Configuration
Use Helm charts to bootstrap the Artifactory global and security configuration. An Artifactory subscription is required.
-
Create a
bootstrap-config.yamlwith anartifactory.config.import.xmland asecurity.import.xmlas shown below.apiVersion: v1 kind: ConfigMap metadata: name: my-release-bootstrap-config data: artifactory.config.import.xml: | <config contents> security.import.xml: | <config contents> -
Create a configMap in Kubernetes.
kubectl apply -f bootstrap-config.yaml -
Pass the configMap to Helm using one of the following options.
Artifactory
helm upgrade --install artifactory --set artifactory.license.secret=artifactory-license,artifactory.license.dataKey=art.lic,artifactory.configMapName=my-release-bootstrap-config --namespace artifactory jfrog/artifactoryArtifactory HA
helm upgrade --install artifactory-ha --set artifactory.license.secret=artifactory-license,artifactory.license.dataKey=art.lic,artifactory.configMapName=my-release-bootstrap-config --namespace artifactory-ha jfrog/artifactory-haor
Artifactory
helm upgrade --install artifactory --set artifactory.license.licenseKey=<LICENSE_KEY>,artifactory.configMapName=my-release-bootstrap-config --namespace artifactory jfrog/artifactoryArtifactory HA
helm upgrade --install artifactory-ha --set artifactory.license.licenseKey=<LICENSE_KEY>,artifactory.configMapName=my-release-bootstrap-config --namespace artifactory-ha jfrog/artifactory-haFor more information, see Bootstrapping the Artifactory Global Configuration and Bootstrapping the Artifactory Security Configuration.
Copy Configuration Files for Every Startup
The chart copies files from /artifactory-extra-conf to ARTIFACTORY_HOME/etc only on first startup. To copy configuration files to ARTIFACTORY_HOME/etc on every startup, use the copyOnEveryStartup setting.
For example, with the default behavior, binarystore.xml is only copied on the first startup, so later changes to the binarystore.xml configuration are not applied.
-
To apply changes on every startup, create a YAML block with the following values:
artifactory: copyOnEveryStartup: - source: /artifactory_bootstrap/binarystore.xml target: etc/artifactory -
Install the Helm chart with the values file you created:
Artifactory
helm upgrade --install artifactory --namespace artifactory jfrog/artifactory -f values.yamlArtifactory HA
helm upgrade --install artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha -f values.yaml
For any custom configuration file, such as logback.xml:
-
Create a configMap with your
logback.xmlconfiguration. -
Next, create a
values.yamlfile with the following values:artifactory: ## Create a volume pointing to the config map with your configuration file customVolumes: | - name: logback-xml-configmap configMap: name: logback-xml-configmap customVolumeMounts: | - name: logback-xml-configmap mountPath: /tmp/artifactory-logback/ copyOnEveryStartup: - source: /tmp/artifactory-logback/* target: etc/artifactory -
Install the Helm chart with the values file you created:
Artifactory
helm upgrade --install artifactory --namespace artifactory jfrog/artifactory -f values.yamlArtifactory HA
helm upgrade --install artifactory-ha --namespace artifactory-ha jfrog/artifactory-ha -f values.yaml
Updated 3 days ago
