Merge lp:~dpb/landscape-charm/root-disk-constraint into lp:~landscape/landscape-charm/trunk

Proposed by David Britton
Status: Superseded
Proposed branch: lp:~dpb/landscape-charm/root-disk-constraint
Merge into: lp:~landscape/landscape-charm/trunk
Diff against target: 419 lines (+378/-0) (has conflicts)
8 files modified
Makefile (+11/-0)
README.md (+28/-0)
charm-store (+23/-0)
landscape-dense-maas.yaml (+56/-0)
landscape-dense.yaml (+56/-0)
landscape-scalable.yaml (+52/-0)
landscape-template.jinja2 (+94/-0)
render-bundles (+58/-0)
Conflict adding file Makefile.  Moved existing file to Makefile.moved.
Conflict adding file README.md.  Moved existing file to README.md.moved.
To merge this branch: bzr merge lp:~dpb/landscape-charm/root-disk-constraint
Reviewer Review Type Date Requested Status
Adam Collard (community) Needs Resubmitting
Landscape Pending
Review via email: mp+284503@code.launchpad.net

Description of the change

add root-disk=10G constraint.

To post a comment you must log in.
Revision history for this message
Adam Collard (adam-collard) wrote :

I think you must have had a stale copy of the charm laying around. This diff is kinda crazy :)

review: Needs Resubmitting

Unmerged revisions

15. By David Britton

add root-disk=10G constraint, render

14. By Björn Tillenius

Don't set 'charm' if 'branch' is specified for landscape-server. [trivial]

13. By David Britton

15.11 source, cleanup some gui annotations that were missing in template.

12. By Andreas Hasenack

Merged with the new bundles for the release of LDS 15.10 with the new charm

11. By Adam Collard

Fix typo in README.md

10. By David Britton

Add GUI annotations into bundles

9. By David Britton

Merge Adam Collard 2015-03-09 15.01 > 14.10

8. By David Britton

Pass commit message in for charm-store commit helper.

7. By David Britton

Fix URLs in README.md to use new API v4 syntax.

6. By David Britton

Add simple helper and Makefile for interacting with charm-store [trivial]

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added file 'Makefile'
2--- Makefile 1970-01-01 00:00:00 +0000
3+++ Makefile 2016-01-29 22:57:08 +0000
4@@ -0,0 +1,11 @@
5+compare-charm-store:
6+ ./charm-store
7+
8+commit-charm-store:
9+ CHARM_STORE_COMMIT=1 ./charm-store
10+
11+clean:
12+ @rm -rf build
13+
14+render:
15+ @./render-bundles
16
17=== renamed file 'Makefile' => 'Makefile.moved'
18=== added file 'README.md'
19--- README.md 1970-01-01 00:00:00 +0000
20+++ README.md 2016-01-29 22:57:08 +0000
21@@ -0,0 +1,28 @@
22+Overview
23+========
24+
25+This branch contains the necessary config and instructions for using
26+juju-deployer/juju-quickstart to deploy the landscape charm.
27+
28+Deployment should be straightforward.
29+
30+Dense Deployment - MAAS
31+=======================
32+For MAAS where LXCs can be addressed externally, you can deploy to a single
33+machine while at the same time making the service scalable in the future:
34+
35+ juju quickstart u/landscape/landscape-dense-maas/
36+
37+Dense Deployment - Other
38+========================
39+For other substrates, use the plain dense deployment which allows your
40+landscape server to be fully reachable, but will not allow easy scaling
41+should load increase.
42+
43+ juju quickstart u/landscape/landscape-dense/
44+
45+Scalable Deployment
46+===================
47+For a truly scalable deployment, the following stanza should be used.
48+
49+ juju quickstart u/landscape/landscape-scalable
50
51=== renamed file 'README.md' => 'README.md.moved'
52=== added file 'charm-store'
53--- charm-store 1970-01-01 00:00:00 +0000
54+++ charm-store 2016-01-29 22:57:08 +0000
55@@ -0,0 +1,23 @@
56+#!/bin/bash -e
57+
58+COMMIT=${CHARM_STORE_COMMIT:-}
59+
60+for i in *.yaml; do
61+ revno=$(bzr revno)
62+ target=$(basename $i .yaml)
63+ if [ -e build/$target ]; then
64+ echo "build/$target exists, please remove before continuing (make clean)"
65+ exit 1
66+ fi
67+ mkdir -p build
68+ bzr co lp:~landscape/charms/bundles/$target/bundle build/$target
69+ cp $target.yaml build/$target/bundles.yaml
70+ cp README.md build/$target/README.md
71+ if [ "$COMMIT" == "" ]; then
72+ echo "Diff from Charm Store: $target"
73+ (cd build/$target && bzr diff) || /bin/true
74+ else
75+ echo "Committing to Charm Store: $target"
76+ (cd build/$target && bzr commit -m "$COMMIT (stable: r$revno)")
77+ fi
78+done
79
80=== added file 'landscape-dense-maas.yaml'
81--- landscape-dense-maas.yaml 1970-01-01 00:00:00 +0000
82+++ landscape-dense-maas.yaml 2016-01-29 22:57:08 +0000
83@@ -0,0 +1,56 @@
84+landscape-dense-maas:
85+ series: trusty
86+ services:
87+ rabbitmq-server:
88+ charm: cs:trusty/rabbitmq-server-26
89+ constraints: root-disk=10G
90+ to: lxc:0
91+ num_units: 1
92+ annotations:
93+ "gui-x": "600"
94+ "gui-y": "370"
95+ postgresql:
96+ charm: cs:trusty/postgresql-27
97+ constraints: root-disk=10G mem=2048
98+ to: lxc:0
99+ num_units: 1
100+ options:
101+ extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
102+ max_connections: 500
103+ max_prepared_transactions: 500
104+ annotations:
105+ "gui-x": "600"
106+ "gui-y": "120"
107+ haproxy:
108+ charm: cs:trusty/haproxy-10
109+ constraints: root-disk=10G
110+ to: lxc:0
111+ expose: True
112+ num_units: 1
113+ options:
114+ enable_monitoring: True
115+ monitoring_allowed_cidr: "0.0.0.0/0"
116+ monitoring_password: "haproxy"
117+ default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
118+ # Don't deploy default haproxy service on port 80
119+ services: ""
120+ source: backports
121+ ssl_cert: SELFSIGNED
122+ annotations:
123+ "gui-x": "1200"
124+ "gui-y": "120"
125+ landscape-server:
126+ charm: cs:trusty/landscape-server
127+ constraints: root-disk=10G mem=2048
128+ to: lxc:0
129+ num_units: 1
130+ options:
131+ source: deb http://ppa.launchpad.net/landscape/15.11/ubuntu trusty main
132+ key: 4652B4E6
133+ annotations:
134+ "gui-x": "950"
135+ "gui-y": "120"
136+ relations:
137+ - [landscape-server, rabbitmq-server]
138+ - [landscape-server, haproxy]
139+ - ["landscape-server:db", "postgresql:db-admin"]
140
141=== added file 'landscape-dense.yaml'
142--- landscape-dense.yaml 1970-01-01 00:00:00 +0000
143+++ landscape-dense.yaml 2016-01-29 22:57:08 +0000
144@@ -0,0 +1,56 @@
145+landscape-dense:
146+ series: trusty
147+ services:
148+ rabbitmq-server:
149+ charm: cs:trusty/rabbitmq-server-26
150+ constraints: root-disk=10G
151+ to: lxc:0
152+ num_units: 1
153+ annotations:
154+ "gui-x": "600"
155+ "gui-y": "370"
156+ postgresql:
157+ charm: cs:trusty/postgresql-27
158+ constraints: root-disk=10G mem=2048
159+ to: lxc:0
160+ num_units: 1
161+ options:
162+ extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
163+ max_connections: 500
164+ max_prepared_transactions: 500
165+ annotations:
166+ "gui-x": "600"
167+ "gui-y": "120"
168+ haproxy:
169+ charm: cs:trusty/haproxy-10
170+ constraints: root-disk=10G
171+ to: 0
172+ expose: True
173+ num_units: 1
174+ options:
175+ enable_monitoring: True
176+ monitoring_allowed_cidr: "0.0.0.0/0"
177+ monitoring_password: "haproxy"
178+ default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
179+ # Don't deploy default haproxy service on port 80
180+ services: ""
181+ source: backports
182+ ssl_cert: SELFSIGNED
183+ annotations:
184+ "gui-x": "1200"
185+ "gui-y": "120"
186+ landscape-server:
187+ charm: cs:trusty/landscape-server
188+ constraints: root-disk=10G mem=2048
189+ to: lxc:0
190+ num_units: 1
191+ options:
192+ source: deb http://ppa.launchpad.net/landscape/15.11/ubuntu trusty main
193+ key: 4652B4E6
194+ annotations:
195+ "gui-x": "950"
196+ "gui-y": "120"
197+ relations:
198+ - [landscape-server, rabbitmq-server]
199+ - [landscape-server, haproxy]
200+ - ["landscape-server:db", "postgresql:db-admin"]
201
202=== added file 'landscape-scalable.yaml'
203--- landscape-scalable.yaml 1970-01-01 00:00:00 +0000
204+++ landscape-scalable.yaml 2016-01-29 22:57:08 +0000
205@@ -0,0 +1,52 @@
206+landscape-scalable:
207+ series: trusty
208+ services:
209+ rabbitmq-server:
210+ charm: cs:trusty/rabbitmq-server-26
211+ constraints: root-disk=10G
212+ num_units: 1
213+ annotations:
214+ "gui-x": "600"
215+ "gui-y": "370"
216+ postgresql:
217+ charm: cs:trusty/postgresql-27
218+ constraints: root-disk=10G mem=2048
219+ num_units: 1
220+ options:
221+ extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
222+ max_connections: 500
223+ max_prepared_transactions: 500
224+ annotations:
225+ "gui-x": "600"
226+ "gui-y": "120"
227+ haproxy:
228+ charm: cs:trusty/haproxy-10
229+ constraints: root-disk=10G
230+ expose: True
231+ num_units: 1
232+ options:
233+ enable_monitoring: True
234+ monitoring_allowed_cidr: "0.0.0.0/0"
235+ monitoring_password: "haproxy"
236+ default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
237+ # Don't deploy default haproxy service on port 80
238+ services: ""
239+ source: backports
240+ ssl_cert: SELFSIGNED
241+ annotations:
242+ "gui-x": "1200"
243+ "gui-y": "120"
244+ landscape-server:
245+ charm: cs:trusty/landscape-server
246+ constraints: root-disk=10G mem=2048
247+ num_units: 1
248+ options:
249+ source: deb http://ppa.launchpad.net/landscape/15.11/ubuntu trusty main
250+ key: 4652B4E6
251+ annotations:
252+ "gui-x": "950"
253+ "gui-y": "120"
254+ relations:
255+ - [landscape-server, rabbitmq-server]
256+ - [landscape-server, haproxy]
257+ - ["landscape-server:db", "postgresql:db-admin"]
258
259=== added file 'landscape-template.jinja2'
260--- landscape-template.jinja2 1970-01-01 00:00:00 +0000
261+++ landscape-template.jinja2 2016-01-29 22:57:08 +0000
262@@ -0,0 +1,94 @@
263+landscape-{{ name }}:
264+ series: trusty
265+ services:
266+ rabbitmq-server:
267+ charm: cs:trusty/rabbitmq-server-26
268+ constraints: root-disk=10G
269+ {% if rabbitmq["to"] %}
270+ to: {{ rabbitmq["to"] }}
271+ {% endif %}
272+ num_units: 1
273+ annotations:
274+ "gui-x": "600"
275+ "gui-y": "370"
276+ postgresql:
277+ charm: cs:trusty/postgresql-27
278+ {% if postgresql["memory"] %}
279+ constraints: root-disk=10G mem={{ postgresql["memory"] }}
280+ {% endif %}
281+ {% if postgresql["to"] %}
282+ to: {{ postgresql["to"] }}
283+ {% endif %}
284+ num_units: 1
285+ options:
286+ extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
287+ max_connections: {{ postgresql.max_connections }}
288+ max_prepared_transactions: {{ postgresql.max_connections }}
289+ {% if postgresql.manual_tuning %}
290+ performance_tuning: manual
291+ {% endif %}
292+ {% if postgresql.shared_buffers %}
293+ shared_buffers: {{ postgresql.shared_buffers }}
294+ {% endif %}
295+ {% if postgresql.checkpoint_segments %}
296+ checkpoint_segments: {{ postgresql.checkpoint_segments }}
297+ {% endif %}
298+ {% if postgresql.maintenance_work_mem %}
299+ maintenance_work_mem: {{ postgresql.maintenance_work_mem }}
300+ {% endif %}
301+ {% if postgresql.work_mem %}
302+ work_mem: {{ postgresql.work_mem }}
303+ {% endif %}
304+ {% if postgresql.effective_cache_size %}
305+ effective_cache_size: {{ postgresql.effective_cache_size }}
306+ {% endif %}
307+ annotations:
308+ "gui-x": "600"
309+ "gui-y": "120"
310+ haproxy:
311+ charm: cs:trusty/haproxy-10
312+ constraints: root-disk=10G
313+ {% if haproxy["to"] %}
314+ to: {{ haproxy["to"] }}
315+ {% endif %}
316+ expose: True
317+ num_units: 1
318+ options:
319+ enable_monitoring: True
320+ monitoring_allowed_cidr: "0.0.0.0/0"
321+ monitoring_password: "haproxy"
322+ default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
323+ # Don't deploy default haproxy service on port 80
324+ services: ""
325+ source: backports
326+ ssl_cert: SELFSIGNED
327+ annotations:
328+ "gui-x": "1200"
329+ "gui-y": "120"
330+ landscape-server:
331+ {% if landscape["branch"] %}
332+ branch: {{ landscape["branch"] }}
333+ {% else %}
334+ charm: cs:trusty/landscape-server
335+ {% endif %}
336+ {% if landscape["memory"] %}
337+ constraints: root-disk=10G mem={{ landscape["memory"] }}
338+ {% endif %}
339+ {% if landscape["to"] %}
340+ to: {{ landscape["to"] }}
341+ {% endif %}
342+ num_units: 1
343+ options:
344+ source: {{ landscape["source"] }}
345+ key: {{ landscape["key"] }}
346+ {% if landscape["ssl-cert"] %}
347+ ssl-cert: {{ landscape["ssl-cert"] }}
348+ ssl-key: {{ landscape["ssl-key"] }}
349+ {% endif %}
350+ annotations:
351+ "gui-x": "950"
352+ "gui-y": "120"
353+ relations:
354+ - [landscape-server, rabbitmq-server]
355+ - [landscape-server, haproxy]
356+ - ["landscape-server:db", "postgresql:db-admin"]
357
358=== added file 'render-bundles'
359--- render-bundles 1970-01-01 00:00:00 +0000
360+++ render-bundles 2016-01-29 22:57:08 +0000
361@@ -0,0 +1,58 @@
362+#!/usr/bin/python3
363+
364+import os
365+
366+from jinja2 import FileSystemLoader, Environment
367+
368+DEFAULTS = {
369+ "rabbitmq": {},
370+ "postgresql": {
371+ "max_connections": 500,
372+ "max_prepared_transactions": 500,
373+ "memory": 2048},
374+ "haproxy": {},
375+ "landscape": {
376+ "memory": 2048,
377+ "source": "deb http://ppa.launchpad.net/landscape/15.11/ubuntu trusty main",
378+ "key": "4652B4E6"}
379+}
380+
381+FLAVORS = [
382+ # scalable
383+ {"name": "scalable"},
384+
385+ # dense
386+ {"name": "dense",
387+ "rabbitmq": {
388+ "to": "lxc:0"},
389+ "postgresql": {
390+ "to": "lxc:0"},
391+ "haproxy": {
392+ "to": "0"},
393+ "landscape": {
394+ "to": "lxc:0"}},
395+
396+ # dense-maas
397+ {"name": "dense-maas",
398+ "rabbitmq": {
399+ "to": "lxc:0"},
400+ "postgresql": {
401+ "to": "lxc:0"},
402+ "haproxy": {
403+ "to": "lxc:0"},
404+ "landscape": {
405+ "to": "lxc:0"}},
406+]
407+
408+if __name__ == "__main__":
409+ environment = Environment(
410+ loader=FileSystemLoader("."), trim_blocks=True, lstrip_blocks=True,
411+ keep_trailing_newline=True)
412+ template = environment.get_template("landscape-template.jinja2")
413+ for flavor in FLAVORS:
414+ with open("landscape-%s.yaml" % flavor["name"], "w") as fd:
415+ context = DEFAULTS.copy()
416+ context["name"] = flavor["name"]
417+ for key in DEFAULTS.keys():
418+ context[key].update(flavor.get(key, {}))
419+ fd.write(template.render(context))

Subscribers

People subscribed via source and target branches