summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-15 19:24:01 +0000
committerGerrit Code Review <review@openstack.org>2016-02-15 19:24:01 +0000
commit014ed92b4e614c4e68bc95a65666c228a72d4997 (patch)
tree32148f245ce4ff7111c93f00b873750e307117af
parent4af63c0b17c89799c57efb45bcf575110d54d9e3 (diff)
parent255f4fd69e6bdf8247bc2861fa830859fffbef33 (diff)
Merge "Minor fixes to allow local docker registry usage"
-rw-r--r--docker/firstboot/install_docker_agents.yaml7
-rw-r--r--docker/firstboot/start_docker_agents.sh5
-rw-r--r--environments/docker.yaml2
3 files changed, 10 insertions, 4 deletions
diff --git a/docker/firstboot/install_docker_agents.yaml b/docker/firstboot/install_docker_agents.yaml
index 348c1755..2858552f 100644
--- a/docker/firstboot/install_docker_agents.yaml
+++ b/docker/firstboot/install_docker_agents.yaml
@@ -3,7 +3,7 @@ heat_template_version: 2014-10-16
parameters:
DockerAgentImage:
type: string
- default: tripleoupstream/heat-docker-agents
+ default: heat-docker-agents
DockerNamespace:
type: string
default: kollaglue
@@ -26,7 +26,10 @@ resources:
config:
str_replace:
params:
- $agent_image: {get_param: DockerAgentImage}
+ $agent_image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerAgentImage} ]
$docker_registry: {get_param: DockerNamespace}
$docker_namespace_is_registry: {get_param: DockerNamespaceIsRegistry}
template: {get_file: ./start_docker_agents.sh}
diff --git a/docker/firstboot/start_docker_agents.sh b/docker/firstboot/start_docker_agents.sh
index a0e95d11..2b03b96e 100644
--- a/docker/firstboot/start_docker_agents.sh
+++ b/docker/firstboot/start_docker_agents.sh
@@ -39,7 +39,10 @@ EOF
# Local docker registry 1.8
if [ $docker_namespace_is_registry ]; then
- /bin/sed -i "s/# INSECURE_REGISTRY='--insecure-registry '/INSECURE_REGISTRY='--insecure-registry $docker_registry'/g" /etc/sysconfig/docker
+ # if namespace is used with local registry, trim all namespacing
+ trim_var=$docker_registry
+ registry_host="${trim_var%%/*}"
+ /bin/sed -i "s/# INSECURE_REGISTRY='--insecure-registry'/INSECURE_REGISTRY='--insecure-registry $registry_host'/g" /etc/sysconfig/docker
fi
/sbin/setenforce 0
diff --git a/environments/docker.yaml b/environments/docker.yaml
index 6376b749..7c6dc407 100644
--- a/environments/docker.yaml
+++ b/environments/docker.yaml
@@ -8,7 +8,7 @@ parameters:
parameter_defaults:
# Defaults to 'tripleoupstream'. Specify a local docker registry
- # Example: 192.168.122.131:8787
+ # Example: 192.0.2.1:8787/tripleoupstream
DockerNamespace: tripleoupstream
# Enable local Docker registry
DockerNamespaceIsRegistry: false