Merge ~cjwatson/launchpad-mojo-specs:prod-containers into launchpad-mojo-specs:master

Proposed by Colin Watson
Status: Merged
Merged at revision: 031498fdd09f87ae4dd510f4e240e3247b6cbb47
Proposed branch: ~cjwatson/launchpad-mojo-specs:prod-containers
Merge into: launchpad-mojo-specs:master
Diff against target: 84 lines (+24/-0)
1 file modified
mojo-lp-git/services (+24/-0)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+372775@code.launchpad.net

Commit message

Hardcode machine names for production deployment

On production, we want a carefully-arranged combination of VMs and LXD
containers. Setting this up requires hardcoding some machine names.
This assumes that four machines have been created prior to deployment:
we currently expect 2 and 3 to be manually-deployed VMs on 0 and 1
respectively.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) wrote :

Self-approving this, as we need to get on with the production deployment and the worst case here is that that very deployment initially fails and needs to be adjusted.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/mojo-lp-git/services b/mojo-lp-git/services
2index 3ce7e20..f445fd8 100644
3--- a/mojo-lp-git/services
4+++ b/mojo-lp-git/services
5@@ -63,6 +63,9 @@ turnip:
6 {%- else %}
7 num_units: 2
8 {%- endif %}
9+{%- if stage_name == "production" %}
10+ to: ['lxd:0', 'lxd:1']
11+{%- endif %}
12 # Don't expose! Not all of the ports are public.
13 options:
14 default_options: ""
15@@ -120,6 +123,9 @@ turnip:
16 charm: nfs-ganesha
17 constraints: "{{ nfs_constraints }}"
18 num_units: 1
19+{%- if stage_name == "production" %}
20+ to: ['lxd:0']
21+{%- endif %}
22 options:
23 install_keys: |
24 - null
25@@ -135,6 +141,9 @@ turnip:
26 {%- else %}
27 num_units: 2
28 {%- endif %}
29+{%- if stage_name == "production" %}
30+ to: [2, 3]
31+{%- endif %}
32 options:
33 log_hosts_allow: "{{ log_hosts_allow }}"
34 nagios_context: "{{ nagios_context }}"
35@@ -145,6 +154,9 @@ turnip:
36 {%- if devel %}
37 num_units: 1
38 to: [turnip-pack-backend]
39+{%- elif stage_name == "production" %}
40+ num_units: 2
41+ to: [2, 3]
42 {%- else %}
43 num_units: 2
44 to: [turnip-pack-backend, turnip-pack-backend]
45@@ -158,6 +170,9 @@ turnip:
46 {%- if devel %}
47 num_units: 1
48 to: [turnip-pack-backend]
49+{%- elif stage_name == "production" %}
50+ num_units: 2
51+ to: [2, 3]
52 {%- else %}
53 num_units: 2
54 to: [turnip-pack-backend, turnip-pack-backend]
55@@ -171,6 +186,9 @@ turnip:
56 {%- if devel %}
57 num_units: 1
58 to: [turnip-pack-backend]
59+{%- elif stage_name == "production" %}
60+ num_units: 2
61+ to: [2, 3]
62 {%- else %}
63 num_units: 2
64 to: [turnip-pack-backend, turnip-pack-backend]
65@@ -187,6 +205,9 @@ turnip:
66 {%- if devel %}
67 num_units: 1
68 to: [turnip-pack-backend]
69+{%- elif stage_name == "production" %}
70+ num_units: 2
71+ to: [2, 3]
72 {%- else %}
73 num_units: 2
74 to: [turnip-pack-backend, turnip-pack-backend]
75@@ -207,6 +228,9 @@ turnip:
76 {%- if devel %}
77 num_units: 1
78 to: [turnip-pack-backend]
79+{%- elif stage_name == "production" %}
80+ num_units: 2
81+ to: [2, 3]
82 {%- else %}
83 num_units: 2
84 to: [turnip-pack-backend, turnip-pack-backend]

Subscribers

People subscribed via source and target branches