summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Hwang <mhwang@research.att.com>2017-10-11 12:39:58 -0400
committerMichael Hwang <mhwang@research.att.com>2017-10-11 12:46:33 -0400
commit78d00cddcead1d0614ae20907b52fff70a7c8583 (patch)
treefce4457a498a3da45f3534d9d067dcd572dd7b3e
parentc8795185884ca77102a0a412ea20babde3be3ce3 (diff)
Fix docker bp to run in build env
* Make sure consul binary is unzipped * Spawn target_datacenter input Change-Id: I271cfecf24f5279048c81b4b134a022f66e165c8 Issue-Id: DCAEGEN2-151 Signed-off-by: Michael Hwang <mhwang@research.att.com>
-rw-r--r--blueprints/DockerBP.yaml-template14
1 files changed, 9 insertions, 5 deletions
diff --git a/blueprints/DockerBP.yaml-template b/blueprints/DockerBP.yaml-template
index 53aa04b..32ee931 100644
--- a/blueprints/DockerBP.yaml-template
+++ b/blueprints/DockerBP.yaml-template
@@ -37,6 +37,10 @@ inputs:
location_id:
description: the location ID for the location where the Docker hsot is being deployed
type: string
+ target_datacenter:
+ description: |-
+ This is the name of the target Consul datacenter that the docker host will try to join
+ type: string
registrator_image:
description: |-
Full uri to registrator Docker image. Note! You should be using the forked version of
@@ -123,9 +127,10 @@ inputs:
mkdir -p /opt/consul/config /opt/consul/data /opt/consul/bin
# Download Consul from Nexus
- curl -Ss https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_amd64.zip > /opt/consul/bin/consul_0.8.3_linux_amd64
- chmod +x /opt/consul/bin/consul_0.8.3_linux_amd64
- ln -s /opt/consul/bin/consul_0.8.3_linux_amd64 /opt/consul/bin/consul
+ apt-get update
+ DEBIAN_FRONTEND=noninteractive apt-get install -y -q unzip
+ curl -Ss https://releases.hashicorp.com/consul/0.8.3/consul_0.8.3_linux_amd64.zip > /opt/consul/bin/consul_0.8.3_linux_amd64.zip
+ unzip /opt/consul/bin/consul_0.8.3_linux_amd64.zip
cat <<EOF > /opt/consul/config/consul.json
{
"bind_addr" : "0.0.0.0",
@@ -182,7 +187,6 @@ inputs:
sleep 60
done
- apt-get update
DEBIAN_FRONTEND=noninteractive apt-get install -y -q linux-image-extra-`uname -r` linux-image-extra-virtual apparmor dirmngr
DEBIAN_FRONTEND=noninteractive apt-get install -y -q docker.io
echo 'DOCKER_OPTS="--raw-logs -H tcp://0.0.0.0:2376 -H unix:///var/run/docker.sock"' >>/etc/default/docker
@@ -261,7 +265,7 @@ node_templates:
userdata:
concat:
- { get_input: vm_init_dokr_00 }
- - { get_input: location_id }
+ - { get_input: target_datacenter }
- |+
- { get_input: vm_init_dokr_01 }