Subscribe¶
The subscribe command creates a subscribed content library in vSphere that pulls from an Artifactory-published lib.json URL.
vSphere needs Artifactory basic authentication credentials to pull content from a protected repository.
CLI Example¶
Refer to subscribe command options for the full flag list.
artifactory-content-library subscribe \
--url "https://vc01.example.com" \
--username "[email protected]" \
--password "password" \
--ssl-verify true \
--datacenter "dc01" \
--name "artifactory-library" \
--datastore "nfs" \
--publisher-subscription-url "https://packages.example.com/artifactory/example-repository/example-library/lib.json" \
--publisher-username "admin" \
--publisher-password "password"
Environment Variables¶
Refer to vSphere environment variables for the full list.
export VSPHERE_URL="https://vc01.example.com"
export VSPHERE_USERNAME="[email protected]"
export VSPHERE_PASSWORD="password"
export VSPHERE_SSL_VERIFY="true"
export VSPHERE_PUBLISHER_USERNAME="admin"
export VSPHERE_PUBLISHER_PASSWORD="password"
artifactory-content-library subscribe \
--name "artifactory-library" \
--datacenter "dc01" \
--datastore "nfs" \
--publisher-subscription-url "https://packages.example.com/artifactory/example-repository/example-library/lib.json"
Configuration File¶
Refer to init command options for the full flag list.
Generate an example subscribe configuration:
Example:
# yaml-language-server: $schema=https://raw.githubusercontent.com/tenthirtyam/artifactory-content-library/main/schema/config.schema.json
---
vsphere:
url: ${VSPHERE_URL}
username: ${VSPHERE_USERNAME}
password: ${VSPHERE_PASSWORD}
ssl_verify: true
library:
name: Artifactory Subscribed Library
datacenter: dc01
datastore: ds01
auto_sync: true
on_demand: false
publisher_subscription_url: https://packages.example.com/artifactory/.../lib.json
publisher_ssl_thumbprint: ""
publisher_username: ${VSPHERE_PUBLISHER_USERNAME}
publisher_password: ${VSPHERE_PUBLISHER_PASSWORD}
logging:
format: standard
level: info