diff options
author | Jenkins <jenkins@review.openstack.org> | 2017-03-09 11:51:28 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2017-03-09 11:51:28 +0000 |
commit | 89fbbf12ca953b1c246b8b9ec2022d88245fdf36 (patch) | |
tree | 869aa58cb1db4d0486741ab172e929d1138adf51 | |
parent | 09af40f5dbbdd335005640b538ed043dda75e77b (diff) | |
parent | 46b5911a150aa0ce89629c3058e3ad65b2d98684 (diff) |
Merge "Enable Docker service for Compute role"
-rwxr-xr-x | docker/firstboot/setup_docker_host.sh | 24 | ||||
-rw-r--r-- | environments/docker.yaml | 3 |
2 files changed, 6 insertions, 21 deletions
diff --git a/docker/firstboot/setup_docker_host.sh b/docker/firstboot/setup_docker_host.sh index b2287e91..8b4c6a03 100755 --- a/docker/firstboot/setup_docker_host.sh +++ b/docker/firstboot/setup_docker_host.sh @@ -1,26 +1,8 @@ #!/bin/bash set -eux -# TODO This would be better in puppet +# This file contains setup steps that can't be or have not yet been moved to +# puppet -# TODO remove this when built image includes docker -if [ ! -f "/usr/bin/docker" ]; then - yum -y install docker -fi - -# NOTE(mandre) $docker_namespace_is_registry is not a bash variable but is -# a place holder for text replacement done via heat -if [ "$docker_namespace_is_registry" = "True" ]; then - /usr/bin/systemctl stop docker.service - # if namespace is used with local registry, trim all namespacing - trim_var=$docker_registry - registry_host="${trim_var%%/*}" - /bin/sed -i -r "s/^[# ]*INSECURE_REGISTRY *=.+$/INSECURE_REGISTRY='--insecure-registry $registry_host'/" /etc/sysconfig/docker -fi - -# enable and start docker -/usr/bin/systemctl enable docker.service -/usr/bin/systemctl start docker.service - -# Disable libvirtd +# Disable libvirtd since it conflicts with nova_libvirt container /usr/bin/systemctl disable libvirtd.service /usr/bin/systemctl stop libvirtd.service diff --git a/environments/docker.yaml b/environments/docker.yaml index 3696f908..8a977f26 100644 --- a/environments/docker.yaml +++ b/environments/docker.yaml @@ -3,6 +3,8 @@ resource_registry: # e.g atomic, but it has been replaced with OS::TripleO::Services::Docker # OS::TripleO::NodeUserData: ../docker/firstboot/setup_docker_host.yaml OS::TripleO::Services::Docker: ../puppet/services/docker.yaml + # The compute node still needs extra initialization steps + OS::TripleO::Compute::NodeUserData: ../docker/firstboot/setup_docker_host.yaml #NOTE (dprince) add roles to be docker enabled as we support them OS::TripleO::Services::NovaLibvirt: ../docker/services/nova-libvirt.yaml @@ -55,3 +57,4 @@ parameter_defaults: - OS::TripleO::Services::NovaCompute - OS::TripleO::Services::NovaLibvirt - OS::TripleO::Services::ComputeNeutronOvsAgent + - OS::TripleO::Services::Docker |