Merge "Add local docker registry support"

This commit is contained in:
Jenkins 2015-11-20 17:28:48 +00:00 committed by Gerrit Code Review
commit 159e78db98
4 changed files with 55 additions and 15 deletions

View File

@ -9,6 +9,9 @@ parameters:
NodeConfigIdentifiers: NodeConfigIdentifiers:
type: json type: json
description: Value which changes if the node configuration may need to be re-applied description: Value which changes if the node configuration may need to be re-applied
DockerNamespace:
type: string
default: kollaglue
DockerComputeImage: DockerComputeImage:
type: string type: string
DockerComputeDataImage: DockerComputeDataImage:
@ -95,7 +98,10 @@ resources:
group: docker-compose group: docker-compose
config: config:
ovsvswitchd: ovsvswitchd:
image: {get_param: DockerOvsVswitchdImage} image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerOvsVswitchdImage} ]
container_name: ovs-vswitchd container_name: ovs-vswitchd
net: host net: host
privileged: true privileged: true
@ -108,7 +114,10 @@ resources:
- KOLLA_CONFIG_STRATEGY=COPY_ALWAYS - KOLLA_CONFIG_STRATEGY=COPY_ALWAYS
openvswitchdb: openvswitchdb:
image: {get_param: DockerOpenvswitchDBImage} image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchDBImage} ]
container_name: ovs-db-server container_name: ovs-db-server
net: host net: host
restart: always restart: always
@ -151,14 +160,20 @@ resources:
group: docker-compose group: docker-compose
config: config:
computedata: computedata:
image: {get_param: DockerComputeDataImage} image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerComputeDataImage} ]
container_name: computedata container_name: computedata
volumes: volumes:
- /var/lib/nova/instances - /var/lib/nova/instances
- /var/lib/libvirt - /var/lib/libvirt
libvirt: libvirt:
image: {get_param: DockerLibvirtImage} image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerLibvirtImage} ]
container_name: libvirt container_name: libvirt
net: host net: host
pid: host pid: host
@ -187,7 +202,10 @@ resources:
group: docker-compose group: docker-compose
config: config:
openvswitch: openvswitch:
image: {get_param: DockerOpenvswitchImage} image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchImage} ]
container_name: openvswitch container_name: openvswitch
net: host net: host
privileged: true privileged: true
@ -205,7 +223,10 @@ resources:
- computedata - computedata
neutronagent: neutronagent:
image: {get_param: DockerOpenvswitchImage} image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerOpenvswitchImage} ]
container_name: neutronagent container_name: neutronagent
net: host net: host
pid: host pid: host
@ -223,7 +244,10 @@ resources:
- computedata - computedata
novacompute: novacompute:
image: {get_param: DockerComputeImage} image:
list_join:
- '/'
- [ {get_param: DockerNamespace}, {get_param: DockerComputeImage} ]
container_name: novacompute container_name: novacompute
net: host net: host
privileged: true privileged: true

View File

@ -4,6 +4,12 @@ parameters:
DockerAgentImage: DockerAgentImage:
type: string type: string
default: dprince/heat-docker-agents-centos default: dprince/heat-docker-agents-centos
DockerNamespace:
type: string
default: kollaglue
DockerNamespaceIsRegistry:
type: boolean
default: false
resources: resources:
@ -21,6 +27,8 @@ resources:
str_replace: str_replace:
params: params:
$agent_image: {get_param: DockerAgentImage} $agent_image: {get_param: DockerAgentImage}
$docker_registry: {get_param: DockerNamespace}
$docker_namespace_is_registry: {get_param: DockerNamespaceIsRegistry}
template: {get_file: ./start_docker_agents.sh} template: {get_file: ./start_docker_agents.sh}
outputs: outputs:

View File

@ -38,7 +38,9 @@ EOF
#echo "ADD_REGISTRY='--registry-mirror $docker_registry'" >> /etc/sysconfig/docker #echo "ADD_REGISTRY='--registry-mirror $docker_registry'" >> /etc/sysconfig/docker
# Local docker registry 1.8 # 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/setenforce 0
/sbin/modprobe ebtables /sbin/modprobe ebtables

View File

@ -9,10 +9,16 @@ parameters:
# FIXME: When Kolla cuts liberty tag we can use kollaglue registry # FIXME: When Kolla cuts liberty tag we can use kollaglue registry
parameter_defaults: parameter_defaults:
DockerComputeImage: rthallisey/centos-binary-nova-compute:liberty # Defaults to kollaglue. Specify a local docker registry
DockerComputeDataImage: rthallisey/centos-binary-data:liberty # Example: 192.168.122.131:8787
DockerLibvirtImage: rthallisey/centos-binary-nova-libvirt:liberty DockerNamespace: kollaglue
DockerNeutronAgentImage: rthallisey/centos-binary-neutron-agents:liberty # Enable local Docker registry
DockerOpenvswitchImage: rthallisey/centos-binary-neutron-openvswitch-agent:liberty DockerNamespaceIsRegistry: false
DockerOvsVswitchdImage: rthallisey/centos-binary-openvswitch-vswitchd:liberty # Compute Node Images
DockerOpenvswitchDBImage: rthallisey/centos-binary-openvswitch-db-server:liberty 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