Registry changes on mgmt.
This commit is contained in:
parent
ddad272b98
commit
148644110b
@ -35,9 +35,7 @@ if [ ! -f "$CLUSTER_DEFINITION" ]; then
|
|||||||
export LXD_CLUSTER_PASSWORD="$(gpg --gen-random --armor 1 14)"
|
export LXD_CLUSTER_PASSWORD="$(gpg --gen-random --armor 1 14)"
|
||||||
export SOVEREIGN_STACK_MAC_ADDRESS="CHANGE_ME_REQUIRED"
|
export SOVEREIGN_STACK_MAC_ADDRESS="CHANGE_ME_REQUIRED"
|
||||||
export PROJECT_NAME="public"
|
export PROJECT_NAME="public"
|
||||||
export REGISTRY_URL="http://$(hostname).$(resolvectl status | grep 'DNS Domain:' | awk '{ print $3 }'):5000"
|
#export REGISTRY_URL="https://index.docker.io/v1/"
|
||||||
export REGISTRY_USERNAME="CHANGE_ME"
|
|
||||||
export REGISTRY_PASSWORD="CHANGE_ME"
|
|
||||||
|
|
||||||
EOL
|
EOL
|
||||||
|
|
||||||
|
@ -107,3 +107,4 @@ export REMOTE_CERT_BASE_DIR="$REMOTE_HOME/.certs"
|
|||||||
|
|
||||||
# this space is for OS, docker images, etc. DOES NOT INCLUDE USER DATA.
|
# this space is for OS, docker images, etc. DOES NOT INCLUDE USER DATA.
|
||||||
export ROOT_DISK_SIZE_GB=20
|
export ROOT_DISK_SIZE_GB=20
|
||||||
|
export REGISTRY_URL="https://index.docker.io/v1/"
|
||||||
|
48
deploy.sh
48
deploy.sh
@ -175,34 +175,34 @@ source "$CLUSTER_DEFINITION"
|
|||||||
|
|
||||||
# if the registry URL isn't defined, then we just use the upstream dockerhub.
|
# if the registry URL isn't defined, then we just use the upstream dockerhub.
|
||||||
# recommended to run a registry cache on your management machine though.
|
# recommended to run a registry cache on your management machine though.
|
||||||
if [ -n "$REGISTRY_URL" ]; then
|
# if [ -n "$REGISTRY_URL" ]; then
|
||||||
|
|
||||||
cat > "$CLUSTER_PATH/registry.yml" <<EOL
|
# cat > "$CLUSTER_PATH/registry.yml" <<EOL
|
||||||
version: 0.1
|
# version: 0.1
|
||||||
http:
|
# http:
|
||||||
addr: 0.0.0.0:5000
|
# addr: 0.0.0.0:5000
|
||||||
host: ${REGISTRY_URL}
|
# host: ${REGISTRY_URL}
|
||||||
|
|
||||||
proxy:
|
# proxy:
|
||||||
remoteurl: ${REGISTRY_URL}
|
# remoteurl: ${REGISTRY_URL}
|
||||||
username: ${REGISTRY_USERNAME}
|
# username: ${REGISTRY_USERNAME}
|
||||||
password: ${REGISTRY_PASSWORD}
|
# password: ${REGISTRY_PASSWORD}
|
||||||
EOL
|
# EOL
|
||||||
|
|
||||||
# enable docker swarm mode so we can support docker stacks.
|
# # enable docker swarm mode so we can support docker stacks.
|
||||||
if docker info | grep -q "Swarm: inactive"; then
|
# if docker info | grep -q "Swarm: inactive"; then
|
||||||
docker swarm init
|
# docker swarm init
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
mkdir -p "${CACHES_DIR}/registry_images"
|
# mkdir -p "${CACHES_DIR}/registry_images"
|
||||||
|
|
||||||
# run a docker registry pull through cache on the management machine.
|
# # run a docker registry pull through cache on the management machine.
|
||||||
if [ "$DEPLOY_MGMT_REGISTRY" = true ]; then
|
# if [ "$DEPLOY_MGMT_REGISTRY" = true ]; then
|
||||||
if ! docker stack list | grep -q registry; then
|
# if ! docker stack list | grep -q registry; then
|
||||||
docker stack deploy -c management/registry_mirror.yml registry
|
# docker stack deploy -c management/registry_mirror.yml registry
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
fi
|
# fi
|
||||||
|
|
||||||
|
|
||||||
# this is our password generation mechanism. Relying on GPG for secure password generation
|
# this is our password generation mechanism. Relying on GPG for secure password generation
|
||||||
@ -492,7 +492,7 @@ export PRIMARY_WWW_FQDN="$WWW_HOSTNAME.$DOMAIN_NAME"
|
|||||||
|
|
||||||
stub_site_definition
|
stub_site_definition
|
||||||
|
|
||||||
# bring the vms up under the primary domain name.
|
# bring the VMs up under the primary domain name.
|
||||||
instantiate_vms
|
instantiate_vms
|
||||||
|
|
||||||
# let's stub out the rest of our site definitions, if any.
|
# let's stub out the rest of our site definitions, if any.
|
||||||
|
Loading…
Reference in New Issue
Block a user