Merge ~cjwatson/launchpad-mojo-specs:lp-production-internal-rabbitmq into launchpad-mojo-specs:master

Proposed by Colin Watson
Status: Merged
Merged at revision: 61c96cb9c0381b4a0093b2a605f3310440858882
Proposed branch: ~cjwatson/launchpad-mojo-specs:lp-production-internal-rabbitmq
Merge into: launchpad-mojo-specs:master
Diff against target: 110 lines (+4/-13)
1 file modified
lp/bundle.yaml (+4/-13)
Reviewer Review Type Date Requested Status
Ines Almeida Approve
Review via email: mp+455971@code.launchpad.net

Commit message

lp: Use internal rabbitmq-server for production

Description of the change

While our previous deployment was workable enough, it was deployed in `prod-launchpad-manual-servers` via an IS-maintained bundle, and it would be simpler to move it into our main bundle.

Some migration will need to be done manually; this change will have the effect of deploying new units, but nothing will use them until we update or remove the `rabbitmq_broker_urls` options from `deploy-secrets`.

To post a comment you must log in.
Revision history for this message
Ines Almeida (ines-almeida) wrote :

Makes sense

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/lp/bundle.yaml b/lp/bundle.yaml
2index f8d9803..c33f6ef 100644
3--- a/lp/bundle.yaml
4+++ b/lp/bundle.yaml
5@@ -52,8 +52,6 @@
6 {%- set enable_loggerhead = False %}
7 {#- If True, external-services/db_connections must be set in secrets. #}
8 {%- set external_database = False %}
9-{#- If True, launchpad-*/rabbitmq_broker_urls must be set in secrets. #}
10-{%- set external_rabbitmq = False %}
11 {%- set gpg_upload_keys = False %}
12 {%- set haproxy_num_units = 1 %}
13 {%- set http_proxy = "http://squid.internal:3128/" %}
14@@ -108,6 +106,7 @@
15 {%- set ppa_lb_ipv4_address = "" %}
16 {%- set ppa_private_base_url_buildd_manager = "http://private-ppa.buildd/" %}
17 {%- set process_inbound_email_host = "mail.canonical.com" %}
18+{%- set rabbitmq_constraints = "" %}
19 {%- set require_signing_keys = False %}
20 {%- set signing_endpoint = "" %}
21 {%- set snap_store_secrets_public_key = "" %}
22@@ -184,7 +183,6 @@
23 {%- set enable_librarian_frontend = True %}
24 {%- set enable_loggerhead = True %}
25 {%- set external_database = True %}
26-{%- set external_rabbitmq = True %}
27 {%- set gpg_upload_keys = True %}
28 {%- set haproxy_num_units = 2 %}
29 {%- set internal_branch_by_id_root = "http://bazaar.lp.internal:8081/" %}
30@@ -269,6 +267,8 @@
31 {%- set port_main = 10001 %}
32 {%- set port_xmlrpc = 8097 %}
33 {%- set process_inbound_email_username = "launchpad" %}
34+{%- set rabbitmq_constraints = "cores=4 mem=8G root-disk=50G root-disk-source=local" %}
35+{%- set rabbitmq_num_units = 3 %}
36 {%- set rabbitmq_user = "production-juju" %}
37 {%- set require_signing_keys = True %}
38 {%- set services_lb_constraints = "cores=4 mem=4096M root-disk-source=volume root-disk=50G" %}
39@@ -1572,11 +1572,11 @@ applications:
40 {%- else %}
41 num_units: 2
42 {%- endif %}
43-{%- if not external_rabbitmq %}
44 rabbitmq-server:
45 charm: ch:rabbitmq-server
46 channel: stable
47 revision: 123
48+ constraints: "{{ rabbitmq_constraints }}"
49 num_units: {{ rabbitmq_num_units }}
50 options:
51 check-vhosts: "{{ domain }}"
52@@ -1587,7 +1587,6 @@ applications:
53 - ['{{ domain }}', 'job', 780, 800]
54 - ['{{ domain }}', \'oops*\', 5000, 10000]
55 - [\'*\', \'*\', 100, 200]
56-{%- endif %}
57 {%- if stage_name == "production" %}
58 postfix-relay:
59 charm: ch:postfix-relay
60@@ -1740,7 +1739,6 @@ applications:
61 expose: true
62 options:
63 install_method: snap
64-{%- if not external_rabbitmq %}
65 telegraf-rabbitmq-server:
66 charm: ch:telegraf
67 channel: stable
68@@ -1749,7 +1747,6 @@ applications:
69 options:
70 install_method: snap
71 {%- endif %}
72-{%- endif %}
73 relations:
74 {%- if enable_appserver_frontends %}
75 {%- if not devel %}
76@@ -1870,7 +1867,6 @@ relations:
77 {%- if enable_launchpad_scripts_bzrsyncd %}
78 - ["launchpad-scripts-bzrsyncd", "memcached"]
79 {%- endif %}
80-{%- if not external_rabbitmq %}
81 - ["launchpad-admin", "rabbitmq-server"]
82 - ["launchpad-appserver", "rabbitmq-server"]
83 {%- if enable_buildd_manager %}
84@@ -1906,7 +1902,6 @@ relations:
85 {%- if enable_launchpad_codehosting %}
86 - ["launchpad-codehosting", "rabbitmq-server"]
87 {%- endif %}
88-{%- endif %}
89 {%- if stage_name == "production" %}
90 - ["postfix-relay", "launchpad-admin"]
91 - ["postfix-relay", "launchpad-appserver"]
92@@ -1995,9 +1990,7 @@ relations:
93 - ["nrpe:nrpe-external-master", "postgresql:nrpe-external-master"]
94 {%- endif %}
95 - ["nrpe:nrpe-external-master", "memcached:nrpe-external-master"]
96-{%- if not external_rabbitmq %}
97 - ["nrpe", "rabbitmq-server"]
98-{%- endif %}
99 {%- if not devel %}
100 {%- if enable_appserver_frontends %}
101 - ["telegraf", "frontend-main:juju-info"]
102@@ -2070,8 +2063,6 @@ relations:
103 {%- endif %}
104 - ["telegraf-memcached:juju-info", "memcached:juju-info"]
105 - ["telegraf-memcached:memcached", "memcached:cache"]
106-{%- if not external_rabbitmq %}
107 - ["telegraf-rabbitmq-server:juju-info", "rabbitmq-server:juju-info"]
108 - ["telegraf-rabbitmq-server:amqp", "rabbitmq-server:amqp"]
109 {%- endif %}
110-{%- endif %}

Subscribers

People subscribed via source and target branches