Skip to content

Create shared dock ami#611

Merged
thejsj merged 37 commits intomasterfrom
create-shared-dock-ami
Apr 7, 2017
Merged

Create shared dock ami#611
thejsj merged 37 commits intomasterfrom
create-shared-dock-ami

Conversation

@thejsj
Copy link
Member

@thejsj thejsj commented Mar 13, 2017

What this PR does

  • Makes AMIs environment/customer agnostic (does not bake certs to AMI or any environment variables)
  • Create script to automatically generate launch configurations
  • Add new tags that don't need to be run when creating docks
  • Remove presumption that Rollbar key has to be present
  • Updates vault port to a variable.
  • Remove registrly.runnable.com for image-builder
  • Upgrades krain

Bugs/Things that need to be fixed

  • Docker needs to be run without TLS when pulling images because default docker (from service) does not have the necessary certs to run. You might need to manually deal start it.

How to create environment agnostic AMI

  1. Run base.yml with these flags.
ansible-playbook
  --vault-password-file /Users/hiphipjorge/.vaultpass
  --extra-vars "host=$DOCK_IP"
  --skip-tags=ensure_registry,loggly
  -e restart=true
  base.yml
  1. Run through mounting docker as you normally would. Because docker needs to be setup for the next step, you need to go into /etc/default/docker and remove TLS from it. In the future this should be done automatically.

  2. Run dock.yml with following arguments:

ansible-playbook 
  --vault-password-file /Users/hiphipjorge/.vaultpass
  --extra-vars "dock=$DOCK_IP"
  --skip-tags vault_files,consul_values,render_node_service_config,ensure_registry,loggly
  dock.yml
  1. Create launch configuration for environment:
ansible-playbook -i delta-hosts/ dock-generate-launch-config.yml

Tests

Create new AMI and launch configuration in gamma

  • Make sure there are no errors in /var/log/cloud-init-output.log
  • Make sure there are no errors in user-script-dock-init.log
  • Make sure Docker comes up docker ps
  • Make sure Krain comes up curl localhost:3100 -v and files show up
  • Make sure Charon is up (C2C works in environment)
  • Deploy docker-listener with changes to make sure it works

Create new AMI and launch configuration in hot grizzly

  • Make sure there are no errors in /var/log/cloud-init-output.log
  • Make sure there are no errors in user-script-dock-init.log
  • Make sure Docker comes up docker ps
  • Make sure Krain comes up curl localhost:3100 -v and files show up
  • Make sure Charon is up (C2C works in environment)
  • Deploy docker-listener with changes to make sure it works

Deployment (post-merge)

Ensure that all environments have the given changes.

  • deployed to gamma
  • deployed to delta

TODO for the future

  • Tag image builder with both runnable/image-builder and registry.runnable.com/runnable/image-buidler
  • Add mounting of /docker volume to script in order for everything to live in this script
  • Add base.yml to dock.yml in order to be able to build dock with one command
  • Handle installation of Loggly without keys (optional running)

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants