Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 11 additions & 4 deletions ansible/dock.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
---
- hosts: registry

- hosts: localhost
connection: local
tasks:
Expand All @@ -9,7 +11,12 @@
name={{ dock }}
groups=dock

- include: charon.yml git_branch="{{ charon_version }}"
- include: dock-init.yml git_branch="{{ dock_init_version }}"
- include: image-builder.yml git_branch="{{ image_builder_version }}"
- include: krain.yml git_branch="{{ krain_version }}"
- include: charon.yml git_branch="v4.0.0"
- include: dock-init.yml git_branch="v10.0.0"
- include: krain.yml git_branch="v0.3.0"

- hosts: "{{ host }}"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that does this do? where is host set?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think because we need to execute the next block w/ the roles I used the hosts part to specify a new block. there is probably a better way to do this


roles:
- { role: install-ssm }
- { role: dock-images }
2 changes: 2 additions & 0 deletions ansible/group_vars/all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@ redis_host_address: "{{ hostvars[groups['redis'][0]]['ansible_default_ipv4']['ad
redis_port: 6379
redis_tls_port: 6380

registry_address: "{{ hostvars[groups['registry'][0]]['ansible_default_ipv4']['address'] }}"

# sauron
sauron_rollbar_token: 83157ae2d50d4b6398e404c0b9978d26

Expand Down
52 changes: 52 additions & 0 deletions ansible/roles/dock-images/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
---
- name: starting docker
become: true
service:
name=docker
state=started

- name: add runnable registry to /etc/hosts
become: true
blockinfile:
dest: /etc/hosts
insertafter: EOF
block: |
{{ registry_address }} registry.runnable.com

- name: pulling docker images
become: true
command: docker pull {{ item }}
with_items:
- "registry.runnable.com/runnable/image-builder:v4.2.2"
- "swarm:1.2.5"
- "registry:2.3.1"
- "google/cadvisor:v0.24.1"
- "prom/node-exporter:0.12.0"
- "weaveworks/weaveexec:1.5.0"
- "weaveworks/weavedb:latest"
- "weaveworks/weave:1.5.0"
- "node:argon"
- "ruby:2.3"
- "python:2.7"
- "php:7.0-apache"
- "runnable/mysql:5.6"
- "runnable/postgres:9.4"
- "runnable/mongo:3.2"

- name: stopping docker
become: true
service:
name=docker
state=stopped

- name: removing docker key file
become: true
file:
path: /etc/docker/key.json
state: absent

- name: removing docker pid file
become: true
file:
path: /var/run/docker.pid
state: absent
11 changes: 11 additions & 0 deletions ansible/roles/install-ssm/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
---
- name: get amazon simple systems management
get_url:
url=https://amazon-ssm-us-west-2.s3.amazonaws.com/latest/debian_amd64/amazon-ssm-agent.deb
dest=/tmp

- name: start amazon simple systems management
command: dpkg -i amazon-ssm-agent.deb
become: true
args:
chdir: /tmp
12 changes: 6 additions & 6 deletions ansible/roles/package-aws/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,16 +25,16 @@
- name: Unzip the ec2-api-tool
become: true
unarchive:
src=/usr/local/ec2-api-tools.zip
dest=/usr/local
copy=no
mode=0755
src: /usr/local/ec2-api-tools.zip
dest: /usr/local
copy: no
mode: 0755

- name: remove old ec2 dir/link
become: true
file:
path=/usr/local/ec2
state=absent
path: /usr/local/ec2
state: absent

- name: Link to ec2
become: true
Expand Down
20 changes: 10 additions & 10 deletions ansible/roles/package-dock/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
- name: unzip vault_0.4.1_linux_amd64.zip
become: true
unarchive:
src=/usr/local/bin/vault_0.4.1_linux_amd64.zip
dest=/usr/local/bin
copy=no
mode=0755
src: /usr/local/bin/vault_0.4.1_linux_amd64.zip
dest: /usr/local/bin
copy: no
mode: 0755

- name: Download Consul-Template
become: true
Expand All @@ -56,14 +56,14 @@
- name: unzip
become: true
unarchive:
src=/usr/local/bin/consul-template_0.11.1_linux_amd64.zip
dest=/usr/local/bin
copy=no
mode=0755
src: /usr/local/bin/consul-template_0.11.1_linux_amd64.zip
dest: /usr/local/bin
copy: no
mode: 0755

- name: Download weave 1.4.6
- name: Download weave 1.5.0
become: true
get_url:
url=https://github.com/weaveworks/weave/releases/download/v1.4.6/weave
url=https://github.com/weaveworks/weave/releases/download/v1.5.0/weave
dest=/usr/local/bin
mode=0755