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
diff --git a/mojo-lp-git/services b/mojo-lp-git/services
index 3ce7e20..f445fd8 100644
--- a/mojo-lp-git/services
+++ b/mojo-lp-git/services
@@ -63,6 +63,9 @@ turnip:
63{%- else %}63{%- else %}
64 num_units: 264 num_units: 2
65{%- endif %}65{%- endif %}
66{%- if stage_name == "production" %}
67 to: ['lxd:0', 'lxd:1']
68{%- endif %}
66 # Don't expose! Not all of the ports are public.69 # Don't expose! Not all of the ports are public.
67 options:70 options:
68 default_options: ""71 default_options: ""
@@ -120,6 +123,9 @@ turnip:
120 charm: nfs-ganesha123 charm: nfs-ganesha
121 constraints: "{{ nfs_constraints }}"124 constraints: "{{ nfs_constraints }}"
122 num_units: 1125 num_units: 1
126{%- if stage_name == "production" %}
127 to: ['lxd:0']
128{%- endif %}
123 options:129 options:
124 install_keys: |130 install_keys: |
125 - null131 - null
@@ -135,6 +141,9 @@ turnip:
135{%- else %}141{%- else %}
136 num_units: 2142 num_units: 2
137{%- endif %}143{%- endif %}
144{%- if stage_name == "production" %}
145 to: [2, 3]
146{%- endif %}
138 options:147 options:
139 log_hosts_allow: "{{ log_hosts_allow }}"148 log_hosts_allow: "{{ log_hosts_allow }}"
140 nagios_context: "{{ nagios_context }}"149 nagios_context: "{{ nagios_context }}"
@@ -145,6 +154,9 @@ turnip:
145{%- if devel %}154{%- if devel %}
146 num_units: 1155 num_units: 1
147 to: [turnip-pack-backend]156 to: [turnip-pack-backend]
157{%- elif stage_name == "production" %}
158 num_units: 2
159 to: [2, 3]
148{%- else %}160{%- else %}
149 num_units: 2161 num_units: 2
150 to: [turnip-pack-backend, turnip-pack-backend]162 to: [turnip-pack-backend, turnip-pack-backend]
@@ -158,6 +170,9 @@ turnip:
158{%- if devel %}170{%- if devel %}
159 num_units: 1171 num_units: 1
160 to: [turnip-pack-backend]172 to: [turnip-pack-backend]
173{%- elif stage_name == "production" %}
174 num_units: 2
175 to: [2, 3]
161{%- else %}176{%- else %}
162 num_units: 2177 num_units: 2
163 to: [turnip-pack-backend, turnip-pack-backend]178 to: [turnip-pack-backend, turnip-pack-backend]
@@ -171,6 +186,9 @@ turnip:
171{%- if devel %}186{%- if devel %}
172 num_units: 1187 num_units: 1
173 to: [turnip-pack-backend]188 to: [turnip-pack-backend]
189{%- elif stage_name == "production" %}
190 num_units: 2
191 to: [2, 3]
174{%- else %}192{%- else %}
175 num_units: 2193 num_units: 2
176 to: [turnip-pack-backend, turnip-pack-backend]194 to: [turnip-pack-backend, turnip-pack-backend]
@@ -187,6 +205,9 @@ turnip:
187{%- if devel %}205{%- if devel %}
188 num_units: 1206 num_units: 1
189 to: [turnip-pack-backend]207 to: [turnip-pack-backend]
208{%- elif stage_name == "production" %}
209 num_units: 2
210 to: [2, 3]
190{%- else %}211{%- else %}
191 num_units: 2212 num_units: 2
192 to: [turnip-pack-backend, turnip-pack-backend]213 to: [turnip-pack-backend, turnip-pack-backend]
@@ -207,6 +228,9 @@ turnip:
207{%- if devel %}228{%- if devel %}
208 num_units: 1229 num_units: 1
209 to: [turnip-pack-backend]230 to: [turnip-pack-backend]
231{%- elif stage_name == "production" %}
232 num_units: 2
233 to: [2, 3]
210{%- else %}234{%- else %}
211 num_units: 2235 num_units: 2
212 to: [turnip-pack-backend, turnip-pack-backend]236 to: [turnip-pack-backend, turnip-pack-backend]

Subscribers

People subscribed via source and target branches