diff options
Diffstat (limited to 'docker/firstboot')
-rw-r--r-- | docker/firstboot/install_docker_agents.yaml | 8 | ||||
-rw-r--r-- | docker/firstboot/start_docker_agents.sh | 9 |
2 files changed, 12 insertions, 5 deletions
diff --git a/docker/firstboot/install_docker_agents.yaml b/docker/firstboot/install_docker_agents.yaml index 8adc8939..22a8ff92 100644 --- a/docker/firstboot/install_docker_agents.yaml +++ b/docker/firstboot/install_docker_agents.yaml @@ -4,6 +4,12 @@ parameters: DockerAgentImage: type: string default: dprince/heat-docker-agents-centos + DockerNamespace: + type: string + default: kollaglue + DockerNamespaceIsRegistry: + type: boolean + default: false resources: @@ -21,6 +27,8 @@ resources: str_replace: params: $agent_image: {get_param: DockerAgentImage} + $docker_registry: {get_param: DockerNamespace} + $docker_namespace_is_registry: {get_param: DockerNamespaceIsRegistry} template: {get_file: ./start_docker_agents.sh} outputs: diff --git a/docker/firstboot/start_docker_agents.sh b/docker/firstboot/start_docker_agents.sh index 88759a5d..a0e95d11 100644 --- a/docker/firstboot/start_docker_agents.sh +++ b/docker/firstboot/start_docker_agents.sh @@ -7,7 +7,7 @@ if ! hostname | grep compute &>/dev/null; then exit 0 fi -mkdir -p /var/lib/etc-data/ #FIXME: this should be a docker data container +mkdir -p /var/lib/etc-data/json-config #FIXME: this should be a docker data container # heat-docker-agents service cat <<EOF > /etc/systemd/system/heat-docker-agents.service @@ -38,14 +38,13 @@ EOF #echo "ADD_REGISTRY='--registry-mirror $docker_registry'" >> /etc/sysconfig/docker # Local docker registry 1.8 -#/bin/sed -i s/ADD_REGISTRY/#ADD_REGISTRY/ /etc/sysconfig/docker +if [ $docker_namespace_is_registry ]; then + /bin/sed -i "s/# INSECURE_REGISTRY='--insecure-registry '/INSECURE_REGISTRY='--insecure-registry $docker_registry'/g" /etc/sysconfig/docker +fi /sbin/setenforce 0 /sbin/modprobe ebtables -# Create /var/lib/etc-data for now. FIXME: This should go into a data container. -#mkdir -p /var/lib/etc-data - echo nameserver 8.8.8.8 > /etc/resolv.conf # We need hostname -f to return in a centos container for the puppet hook |