Skip to content

Commit 116e81c

Browse files
author
Henry Mollman
committed
Merge remote-tracking branch 'origin/master' into 5-2-update-dock-init-and-charon
2 parents 0240417 + 4d37ce0 commit 116e81c

11 files changed

Lines changed: 55 additions & 32 deletions

File tree

ansible/delta-hosts/hosts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,9 @@ delta-consul-c
3737
[user-vault]
3838
localhost
3939

40+
[user-local]
41+
localhost
42+
4043
[worker]
4144
localhost
4245

ansible/delta-hosts/variables

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ cream_stripe_publishable_key=pk_live_5yYYZlYIwY3LwvKFaXY0jNlm
178178
datadog_mongodb_pwd=sqa3WBgkCgZsFZuex0kBNahZ
179179
datadog_mongodb_user=datadog
180180
datadog_tags=env:delta
181+
dock_vault_user_creation_access_token=ddf20c34-019c-5b24-9c0d-1b44e3edf29a
181182
domain=runnable.io
182183
env=delta
183184
github_domain=api.github.com
@@ -193,18 +194,18 @@ pg_pass=59a5524e-a772-11e5-bedc-1bdc0db458b3
193194
pg_port=5432
194195
rabbit_host_address=10.8.4.195
195196
rabbit_password=wKK7g7NWKpQXEeSzyWB7mIpxZIL8H2mDSf3Q6czR3Vk
197+
rabbit_port=54321
196198
rabbit_username=o2mdLh9N9Ke2GzhoK8xsruYPhIQFN7iEL44dQJoq7OM
197199
redis_host_address=10.8.4.9
200+
registry_token=4PX2AU9QIJSCDLZEXILYX6ZP2RCXY1HR10WVZKWVR0JW8DS5IIY87D96V0RACMK5
201+
registry_username=runnable+deltapush
198202
secrets_path=delta-hosts/secrets
199203
user_content_domain=runnableapp.com
204+
user_vault_load_balancer=ab5d35e6f344211e797770ac76ff2aaa-2031464484.us-west-2.elb.amazonaws.com
200205
vault_auth_token=578c9767-5af8-8490-0954-5d330f27b088
201206
vault_token_01=0d324dc7d4cbd94790fd08809d06fb1e28e21e185910081c7646e3e49924f6ed01
202207
vault_token_02=42dc8a69df174e77eb47a63b6ef4709bec57101cb1bff11a71c91b73b8bc046102
203208
vault_token_03=47f3cb74f5374fa3c51c90fd25e3d4cc851034de97584995fce5fc5382342f1f03
204-
rabbit_port=54321
205-
registry_username=runnable+deltapush
206-
registry_token=4PX2AU9QIJSCDLZEXILYX6ZP2RCXY1HR10WVZKWVR0JW8DS5IIY87D96V0RACMK5
207-
dock_vault_user_creation_access_token=ddf20c34-019c-5b24-9c0d-1b44e3edf29a
208209

209210
[web:vars]
210211
web_intercom_id=wqzm3rju

ansible/gamma-hosts/hosts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,9 @@ gamma-consul-c
4141
[user-vault]
4242
localhost
4343

44+
[user-local]
45+
localhost
46+
4447
[worker]
4548
localhost
4649

ansible/gamma-hosts/variables

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ cream_stripe_publishable_key=pk_test_sHr5tQaPtgwiE2cpW6dQkzi8
161161
datadog_mongodb_pwd=sqa3WBgkCgZsFZuex0kBNahZ
162162
datadog_mongodb_user=datadog
163163
datadog_tags=env:gamma
164+
dock_vault_user_creation_access_token=137f441f-db71-40a2-8448-10a565323b1e
164165
domain=runnable-gamma.com
165166
env=gamma
166167
github_domain=api.github.com
@@ -176,15 +177,15 @@ pg_port=32659
176177
rabbit_password=wKK7g7NWKpQXEeSzyWB7mIpxZIL8H2mDSf3Q6czR3Vk
177178
rabbit_username=o2mdLh9N9Ke2GzhoK8xsruYPhIQFN7iEL44dQJoq7OM
178179
redis_host_address=10.4.6.45
180+
registry_token=8G0NT1HZQZHYXU7OB1QAI8HA1560V6R68DE6R6B8YJWQAED82JAFCD057ZWIDT76
181+
registry_username=runnable+gamma
179182
secrets_path=gamma-hosts/secrets
180183
user_content_domain=runnablecloud.com
184+
user_vault_load_balancer=aa8364af12f5a11e7bb9e02301ded9ea-905956029.us-west-2.elb.amazonaws.com
181185
vault_auth_token=f9a39e92-99f3-66a0-a27d-a6e07717d30d
182186
vault_token_01=2c0be2adf99931bc9ed443000e87bbcd0ef096dddc79f6add97ebe8fa7e93d2c05
183187
vault_token_02=3489b87c913058740537bbbd4503f3720d74f7cb0f4e0c30a9436e1e52a18d7003
184188
vault_token_03=ac4e1e9800cbf77283298d08172a2f0e46d0b7cbc457c47788d04768af12584a02
185-
registry_username=runnable+gamma
186-
registry_token=8G0NT1HZQZHYXU7OB1QAI8HA1560V6R68DE6R6B8YJWQAED82JAFCD057ZWIDT76
187-
dock_vault_user_creation_access_token=137f441f-db71-40a2-8448-10a565323b1e
188189

189190
[web:vars]
190191
web_intercom_id=xs5g95pd

ansible/group_vars/alpha-image-builder.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
app_name: image-builder
22
name: "{{ app_name }}"
3-
# namespace (can include "registry.runnable.com:")
4-
image_builder_docker_namespace: "{{ registry_host }}/runnable/image-builder"
5-
app_repo: git@github.com:CodeNow/{{ app_name }}.git
3+
4+
repo: git@github.com:CodeNow/{{ name }}.git
65

76
# consul values
87
consul_values:

ansible/group_vars/alpha-user-vault.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ container_image: vault
44
container_tag: 0.7.0
55
hosted_ports: ["{{ user_vault_port }}"]
66

7+
service_type: "LoadBalancer"
8+
79
volume_mounts:
810
- name: "{{ name }}"
911
path: /config

ansible/image-builder.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,13 @@
11
---
2+
- hosts: user-local
3+
vars_files:
4+
- group_vars/alpha-image-builder.yml
5+
roles:
6+
- { role: build_with_dockerfile }
7+
28
- hosts: "{{ dock | default('docks') }}"
39
vars_files:
410
- group_vars/alpha-image-builder.yml
511
roles:
6-
- { role: notify, tags: [notify] }
7-
- { role: node, tags: [setup] }
8-
- { role: git_repo }
9-
- { role: image-builder }
12+
- { role: pull-image }
1013
- { role: consul_value, tags: [consul_value] }

ansible/roles/build_with_dockerfile/tasks/main.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,20 @@
3030
become: yes
3131
command: docker build {{ build_args | default("") }} --tag="{{ container_image }}:{{ container_tag }}" "{{ build_dir }}/{{ name }}/repo"
3232

33+
- name: login to registry
34+
delegate_to: "{{ builder }}"
35+
tags: deploy, build
36+
become: yes
37+
command: docker login -u {{ registry_username }} -p {{ registry_token }} -e "info@runnable.com" {{ registry_host }}
38+
3339
- name: push docker image
3440
delegate_to: "{{ builder }}"
3541
tags: deploy, build
3642
become: yes
37-
ignore_errors: True
3843
command: docker push {{ container_image }}:{{ container_tag }}
44+
45+
- name: logout of registry
46+
delegate_to: "{{ builder }}"
47+
tags: deploy, build
48+
become: yes
49+
command: docker logout {{ registry_host }}

ansible/roles/builder/tasks/main.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
- name: set number of images built
3232
tags: deploy, build
3333
set_fact:
34+
# Quay IO includes deleted images in this query through the `end_ts` property
3435
no_images_found: "{{ currently_built_tags|json_query('json.tags')|length == 0 }}"
3536

3637
- name: set number of images built
@@ -192,4 +193,4 @@
192193
tags: deploy, build
193194
when: build_image
194195
become: yes
195-
command: docker logout
196+
command: docker logout {{ registry_host }}

ansible/roles/image-builder/tasks/main.yml

Lines changed: 0 additions & 16 deletions
This file was deleted.

0 commit comments

Comments
 (0)