coreos at carnival
TRANSCRIPT
CoreOS at Carnival @tobcox
Overview
Web App
API App
JS App
Sidekiq App
CoreOS cluster
Docker RepositoryDrone
• Staging and production envs
• Micro(ish) services
• CI server
• Private docker repository
Drone
• Self-hosted (http://drone.io)
• Runs tests in containers
• If successful on master branch, pushes image to private Docker repository
CD to Staging
• When Drone is successful on master:
• Staging pulls successful container
• Restarts systemd service
Production DeployStep #1: Tag the image to deploy
Production DeployStep #2: Alter etcd version value
Production DeployStep #3: Let the watcher service do its magic
while true do VERSION=$(etcdctl watch /versions/$NAME) if [ -z "$VERSION" ]; then continue fi
echo "#### New version: $VERSION"
echo "## Pulling $IMAGE_NAME:$VERSION" docker pull $IMAGE_NAME:$VERSION 1>/dev/null echo -n ".Done!"
echo "## Updating service $SERVICE" systemctl restart $SERVICE echo ".Done!" done
Dabus
• systemd dbus notification observer
• Gives us Slack notifications whenever a service restarts
• https://github.com/carnivalmobile/dabus
Thanks @tobcox