aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2015-11-20 17:28:48 +0000
committerGerrit Code Review <review@openstack.org>2015-11-20 17:28:48 +0000
commit159e78db986257d7b0f3e7e28d26d9d283135fea (patch)
treeac4ce8fbba3290a1fa28f085fc4fdf1f4a98ca57
parent338a2bcfb30aa4aa1660e4eadf3d52c2e09a23c3 (diff)
parent092bcd9283db3379cc2ccc50499e7904d9647c25 (diff)
Merge "Add local docker registry support"
-rw-r--r--docker/compute-post.yaml38
-rw-r--r--docker/firstboot/install_docker_agents.yaml8
-rw-r--r--docker/firstboot/start_docker_agents.sh4
-rw-r--r--environments/docker-rdo.yaml20
4 files changed, 55 insertions, 15 deletions
diff --git a/docker/compute-post.yaml b/docker/compute-post.yaml
index 2a37b62..5dd8872 100644
--- a/docker/compute-post.yaml
+++ b/docker/compute-post.yaml
@@ -9,6 +9,9 @@ parameters:
NodeConfigIdentifiers:
type: json
description: Value which changes if the node configuration may need to be re-applied
+ DockerNamespace:
+ type: string
+ default: kollaglue
DockerComputeImage:
type: string
DockerComputeDataImage:
@@ -95,7 +98,10 @@ resources:
group: docker-compose
config:
ovsvswitchd:
- image: {get_param: DockerOvsVswitchdImage}
+ image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerOvsVswitchdImage} ]
container_name: ovs-vswitchd
net: host
privileged: true
@@ -108,7 +114,10 @@ resources:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
openvswitchdb:
- image: {get_param: DockerOpenvswitchDBImage}
+ image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchDBImage} ]
container_name: ovs-db-server
net: host
restart: always
@@ -151,14 +160,20 @@ resources:
group: docker-compose
config:
computedata:
- image: {get_param: DockerComputeDataImage}
+ image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerComputeDataImage} ]
container_name: computedata
volumes:
- /var/lib/nova/instances
- /var/lib/libvirt
libvirt:
- image: {get_param: DockerLibvirtImage}
+ image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerLibvirtImage} ]
container_name: libvirt
net: host
pid: host
@@ -187,7 +202,10 @@ resources:
group: docker-compose
config:
openvswitch:
- image: {get_param: DockerOpenvswitchImage}
+ image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchImage} ]
container_name: openvswitch
net: host
privileged: true
@@ -205,7 +223,10 @@ resources:
- computedata
neutronagent:
- image: {get_param: DockerOpenvswitchImage}
+ image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchImage} ]
container_name: neutronagent
net: host
pid: host
@@ -223,7 +244,10 @@ resources:
- computedata
novacompute:
- image: {get_param: DockerComputeImage}
+ image:
+ list_join:
+ - '/'
+ - [ {get_param: DockerNamespace}, {get_param: DockerComputeImage} ]
container_name: novacompute
net: host
privileged: true
diff --git a/docker/firstboot/install_docker_agents.yaml b/docker/firstboot/install_docker_agents.yaml
index 8adc893..22a8ff9 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 c8b404c..a0e95d1 100644
--- a/docker/firstboot/start_docker_agents.sh
+++ b/docker/firstboot/start_docker_agents.sh
@@ -38,7 +38,9 @@ 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
diff --git a/environments/docker-rdo.yaml b/environments/docker-rdo.yaml
index f42dc58..23f318b 100644
--- a/environments/docker-rdo.yaml
+++ b/environments/docker-rdo.yaml
@@ -9,10 +9,16 @@ parameters:
# FIXME: When Kolla cuts liberty tag we can use kollaglue registry
parameter_defaults:
- DockerComputeImage: rthallisey/centos-binary-nova-compute:liberty
- DockerComputeDataImage: rthallisey/centos-binary-data:liberty
- DockerLibvirtImage: rthallisey/centos-binary-nova-libvirt:liberty
- DockerNeutronAgentImage: rthallisey/centos-binary-neutron-agents:liberty
- DockerOpenvswitchImage: rthallisey/centos-binary-neutron-openvswitch-agent:liberty
- DockerOvsVswitchdImage: rthallisey/centos-binary-openvswitch-vswitchd:liberty
- DockerOpenvswitchDBImage: rthallisey/centos-binary-openvswitch-db-server:liberty
+ # Defaults to kollaglue. Specify a local docker registry
+ # Example: 192.168.122.131:8787
+ DockerNamespace: kollaglue
+ # Enable local Docker registry
+ DockerNamespaceIsRegistry: false
+ # Compute Node Images
+ DockerComputeImage: centos-binary-nova-compute:liberty
+ DockerComputeDataImage: centos-binary-data:liberty
+ DockerLibvirtImage: centos-binary-nova-libvirt:liberty
+ DockerNeutronAgentImage: centos-binary-neutron-agents:liberty
+ DockerOpenvswitchImage: centos-binary-neutron-openvswitch-agent:liberty
+ DockerOvsVswitchdImage: centos-binary-openvswitch-vswitchd:liberty
+ DockerOpenvswitchDBImage: centos-binary-openvswitch-db-server:liberty