Skip to content

Commit

Permalink
Move docker start back to boot and wait until it's up
Browse files Browse the repository at this point in the history
  • Loading branch information
lox committed Apr 11, 2017
1 parent f96160f commit c4b92f9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions packer/conf/bin/bk-install-elastic-stack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,11 @@ fi
start terminationd || true
service awslogs restart || true

# start up docker, wait for it to initialize
service docker start || true
chkconfig docker on
docker ps
# wait for docker to start
next_wait_time=0
until docker ps || [ $next_wait_time -eq 5 ]; do
sleep $(( next_wait_time++ ))
done

for i in $(seq 1 "${BUILDKITE_AGENTS_PER_INSTANCE}"); do
cp /etc/buildkite-agent/init.d.tmpl "/etc/init.d/buildkite-agent-${i}"
Expand Down
2 changes: 1 addition & 1 deletion packer/scripts/install-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rm docker.tgz

sudo cp /tmp/conf/docker/init.d/docker /etc/init.d/docker
sudo cp /tmp/conf/docker/docker.conf /etc/sysconfig/docker
sudo chkconfig docker off
sudo chkconfig docker on

echo "Downloading docker-compose..."
sudo curl -Lsf -o /usr/bin/docker-compose https://github.com/docker/compose/releases/download/${DOCKER_COMPOSE_VERSION}/docker-compose-Linux-x86_64
Expand Down

0 comments on commit c4b92f9

Please sign in to comment.