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
=== added file 'Makefile'
--- Makefile 1970-01-01 00:00:00 +0000
+++ Makefile 2016-01-29 22:57:08 +0000
@@ -0,0 +1,11 @@
1compare-charm-store:
2 ./charm-store
3
4commit-charm-store:
5 CHARM_STORE_COMMIT=1 ./charm-store
6
7clean:
8 @rm -rf build
9
10render:
11 @./render-bundles
012
=== renamed file 'Makefile' => 'Makefile.moved'
=== added file 'README.md'
--- README.md 1970-01-01 00:00:00 +0000
+++ README.md 2016-01-29 22:57:08 +0000
@@ -0,0 +1,28 @@
1Overview
2========
3
4This branch contains the necessary config and instructions for using
5juju-deployer/juju-quickstart to deploy the landscape charm.
6
7Deployment should be straightforward.
8
9Dense Deployment - MAAS
10=======================
11For MAAS where LXCs can be addressed externally, you can deploy to a single
12machine while at the same time making the service scalable in the future:
13
14 juju quickstart u/landscape/landscape-dense-maas/
15
16Dense Deployment - Other
17========================
18For other substrates, use the plain dense deployment which allows your
19landscape server to be fully reachable, but will not allow easy scaling
20should load increase.
21
22 juju quickstart u/landscape/landscape-dense/
23
24Scalable Deployment
25===================
26For a truly scalable deployment, the following stanza should be used.
27
28 juju quickstart u/landscape/landscape-scalable
029
=== renamed file 'README.md' => 'README.md.moved'
=== added file 'charm-store'
--- charm-store 1970-01-01 00:00:00 +0000
+++ charm-store 2016-01-29 22:57:08 +0000
@@ -0,0 +1,23 @@
1#!/bin/bash -e
2
3COMMIT=${CHARM_STORE_COMMIT:-}
4
5for i in *.yaml; do
6 revno=$(bzr revno)
7 target=$(basename $i .yaml)
8 if [ -e build/$target ]; then
9 echo "build/$target exists, please remove before continuing (make clean)"
10 exit 1
11 fi
12 mkdir -p build
13 bzr co lp:~landscape/charms/bundles/$target/bundle build/$target
14 cp $target.yaml build/$target/bundles.yaml
15 cp README.md build/$target/README.md
16 if [ "$COMMIT" == "" ]; then
17 echo "Diff from Charm Store: $target"
18 (cd build/$target && bzr diff) || /bin/true
19 else
20 echo "Committing to Charm Store: $target"
21 (cd build/$target && bzr commit -m "$COMMIT (stable: r$revno)")
22 fi
23done
024
=== added file 'landscape-dense-maas.yaml'
--- landscape-dense-maas.yaml 1970-01-01 00:00:00 +0000
+++ landscape-dense-maas.yaml 2016-01-29 22:57:08 +0000
@@ -0,0 +1,56 @@
1landscape-dense-maas:
2 series: trusty
3 services:
4 rabbitmq-server:
5 charm: cs:trusty/rabbitmq-server-26
6 constraints: root-disk=10G
7 to: lxc:0
8 num_units: 1
9 annotations:
10 "gui-x": "600"
11 "gui-y": "370"
12 postgresql:
13 charm: cs:trusty/postgresql-27
14 constraints: root-disk=10G mem=2048
15 to: lxc:0
16 num_units: 1
17 options:
18 extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
19 max_connections: 500
20 max_prepared_transactions: 500
21 annotations:
22 "gui-x": "600"
23 "gui-y": "120"
24 haproxy:
25 charm: cs:trusty/haproxy-10
26 constraints: root-disk=10G
27 to: lxc:0
28 expose: True
29 num_units: 1
30 options:
31 enable_monitoring: True
32 monitoring_allowed_cidr: "0.0.0.0/0"
33 monitoring_password: "haproxy"
34 default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
35 # Don't deploy default haproxy service on port 80
36 services: ""
37 source: backports
38 ssl_cert: SELFSIGNED
39 annotations:
40 "gui-x": "1200"
41 "gui-y": "120"
42 landscape-server:
43 charm: cs:trusty/landscape-server
44 constraints: root-disk=10G mem=2048
45 to: lxc:0
46 num_units: 1
47 options:
48 source: deb http://ppa.launchpad.net/landscape/15.11/ubuntu trusty main
49 key: 4652B4E6
50 annotations:
51 "gui-x": "950"
52 "gui-y": "120"
53 relations:
54 - [landscape-server, rabbitmq-server]
55 - [landscape-server, haproxy]
56 - ["landscape-server:db", "postgresql:db-admin"]
057
=== added file 'landscape-dense.yaml'
--- landscape-dense.yaml 1970-01-01 00:00:00 +0000
+++ landscape-dense.yaml 2016-01-29 22:57:08 +0000
@@ -0,0 +1,56 @@
1landscape-dense:
2 series: trusty
3 services:
4 rabbitmq-server:
5 charm: cs:trusty/rabbitmq-server-26
6 constraints: root-disk=10G
7 to: lxc:0
8 num_units: 1
9 annotations:
10 "gui-x": "600"
11 "gui-y": "370"
12 postgresql:
13 charm: cs:trusty/postgresql-27
14 constraints: root-disk=10G mem=2048
15 to: lxc:0
16 num_units: 1
17 options:
18 extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
19 max_connections: 500
20 max_prepared_transactions: 500
21 annotations:
22 "gui-x": "600"
23 "gui-y": "120"
24 haproxy:
25 charm: cs:trusty/haproxy-10
26 constraints: root-disk=10G
27 to: 0
28 expose: True
29 num_units: 1
30 options:
31 enable_monitoring: True
32 monitoring_allowed_cidr: "0.0.0.0/0"
33 monitoring_password: "haproxy"
34 default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
35 # Don't deploy default haproxy service on port 80
36 services: ""
37 source: backports
38 ssl_cert: SELFSIGNED
39 annotations:
40 "gui-x": "1200"
41 "gui-y": "120"
42 landscape-server:
43 charm: cs:trusty/landscape-server
44 constraints: root-disk=10G mem=2048
45 to: lxc:0
46 num_units: 1
47 options:
48 source: deb http://ppa.launchpad.net/landscape/15.11/ubuntu trusty main
49 key: 4652B4E6
50 annotations:
51 "gui-x": "950"
52 "gui-y": "120"
53 relations:
54 - [landscape-server, rabbitmq-server]
55 - [landscape-server, haproxy]
56 - ["landscape-server:db", "postgresql:db-admin"]
057
=== added file 'landscape-scalable.yaml'
--- landscape-scalable.yaml 1970-01-01 00:00:00 +0000
+++ landscape-scalable.yaml 2016-01-29 22:57:08 +0000
@@ -0,0 +1,52 @@
1landscape-scalable:
2 series: trusty
3 services:
4 rabbitmq-server:
5 charm: cs:trusty/rabbitmq-server-26
6 constraints: root-disk=10G
7 num_units: 1
8 annotations:
9 "gui-x": "600"
10 "gui-y": "370"
11 postgresql:
12 charm: cs:trusty/postgresql-27
13 constraints: root-disk=10G mem=2048
14 num_units: 1
15 options:
16 extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
17 max_connections: 500
18 max_prepared_transactions: 500
19 annotations:
20 "gui-x": "600"
21 "gui-y": "120"
22 haproxy:
23 charm: cs:trusty/haproxy-10
24 constraints: root-disk=10G
25 expose: True
26 num_units: 1
27 options:
28 enable_monitoring: True
29 monitoring_allowed_cidr: "0.0.0.0/0"
30 monitoring_password: "haproxy"
31 default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
32 # Don't deploy default haproxy service on port 80
33 services: ""
34 source: backports
35 ssl_cert: SELFSIGNED
36 annotations:
37 "gui-x": "1200"
38 "gui-y": "120"
39 landscape-server:
40 charm: cs:trusty/landscape-server
41 constraints: root-disk=10G mem=2048
42 num_units: 1
43 options:
44 source: deb http://ppa.launchpad.net/landscape/15.11/ubuntu trusty main
45 key: 4652B4E6
46 annotations:
47 "gui-x": "950"
48 "gui-y": "120"
49 relations:
50 - [landscape-server, rabbitmq-server]
51 - [landscape-server, haproxy]
52 - ["landscape-server:db", "postgresql:db-admin"]
053
=== added file 'landscape-template.jinja2'
--- landscape-template.jinja2 1970-01-01 00:00:00 +0000
+++ landscape-template.jinja2 2016-01-29 22:57:08 +0000
@@ -0,0 +1,94 @@
1landscape-{{ name }}:
2 series: trusty
3 services:
4 rabbitmq-server:
5 charm: cs:trusty/rabbitmq-server-26
6 constraints: root-disk=10G
7 {% if rabbitmq["to"] %}
8 to: {{ rabbitmq["to"] }}
9 {% endif %}
10 num_units: 1
11 annotations:
12 "gui-x": "600"
13 "gui-y": "370"
14 postgresql:
15 charm: cs:trusty/postgresql-27
16 {% if postgresql["memory"] %}
17 constraints: root-disk=10G mem={{ postgresql["memory"] }}
18 {% endif %}
19 {% if postgresql["to"] %}
20 to: {{ postgresql["to"] }}
21 {% endif %}
22 num_units: 1
23 options:
24 extra-packages: python-apt postgresql-contrib postgresql-.*-debversion
25 max_connections: {{ postgresql.max_connections }}
26 max_prepared_transactions: {{ postgresql.max_connections }}
27 {% if postgresql.manual_tuning %}
28 performance_tuning: manual
29 {% endif %}
30 {% if postgresql.shared_buffers %}
31 shared_buffers: {{ postgresql.shared_buffers }}
32 {% endif %}
33 {% if postgresql.checkpoint_segments %}
34 checkpoint_segments: {{ postgresql.checkpoint_segments }}
35 {% endif %}
36 {% if postgresql.maintenance_work_mem %}
37 maintenance_work_mem: {{ postgresql.maintenance_work_mem }}
38 {% endif %}
39 {% if postgresql.work_mem %}
40 work_mem: {{ postgresql.work_mem }}
41 {% endif %}
42 {% if postgresql.effective_cache_size %}
43 effective_cache_size: {{ postgresql.effective_cache_size }}
44 {% endif %}
45 annotations:
46 "gui-x": "600"
47 "gui-y": "120"
48 haproxy:
49 charm: cs:trusty/haproxy-10
50 constraints: root-disk=10G
51 {% if haproxy["to"] %}
52 to: {{ haproxy["to"] }}
53 {% endif %}
54 expose: True
55 num_units: 1
56 options:
57 enable_monitoring: True
58 monitoring_allowed_cidr: "0.0.0.0/0"
59 monitoring_password: "haproxy"
60 default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
61 # Don't deploy default haproxy service on port 80
62 services: ""
63 source: backports
64 ssl_cert: SELFSIGNED
65 annotations:
66 "gui-x": "1200"
67 "gui-y": "120"
68 landscape-server:
69 {% if landscape["branch"] %}
70 branch: {{ landscape["branch"] }}
71 {% else %}
72 charm: cs:trusty/landscape-server
73 {% endif %}
74 {% if landscape["memory"] %}
75 constraints: root-disk=10G mem={{ landscape["memory"] }}
76 {% endif %}
77 {% if landscape["to"] %}
78 to: {{ landscape["to"] }}
79 {% endif %}
80 num_units: 1
81 options:
82 source: {{ landscape["source"] }}
83 key: {{ landscape["key"] }}
84 {% if landscape["ssl-cert"] %}
85 ssl-cert: {{ landscape["ssl-cert"] }}
86 ssl-key: {{ landscape["ssl-key"] }}
87 {% endif %}
88 annotations:
89 "gui-x": "950"
90 "gui-y": "120"
91 relations:
92 - [landscape-server, rabbitmq-server]
93 - [landscape-server, haproxy]
94 - ["landscape-server:db", "postgresql:db-admin"]
095
=== added file 'render-bundles'
--- render-bundles 1970-01-01 00:00:00 +0000
+++ render-bundles 2016-01-29 22:57:08 +0000
@@ -0,0 +1,58 @@
1#!/usr/bin/python3
2
3import os
4
5from jinja2 import FileSystemLoader, Environment
6
7DEFAULTS = {
8 "rabbitmq": {},
9 "postgresql": {
10 "max_connections": 500,
11 "max_prepared_transactions": 500,
12 "memory": 2048},
13 "haproxy": {},
14 "landscape": {
15 "memory": 2048,
16 "source": "deb http://ppa.launchpad.net/landscape/15.11/ubuntu trusty main",
17 "key": "4652B4E6"}
18}
19
20FLAVORS = [
21 # scalable
22 {"name": "scalable"},
23
24 # dense
25 {"name": "dense",
26 "rabbitmq": {
27 "to": "lxc:0"},
28 "postgresql": {
29 "to": "lxc:0"},
30 "haproxy": {
31 "to": "0"},
32 "landscape": {
33 "to": "lxc:0"}},
34
35 # dense-maas
36 {"name": "dense-maas",
37 "rabbitmq": {
38 "to": "lxc:0"},
39 "postgresql": {
40 "to": "lxc:0"},
41 "haproxy": {
42 "to": "lxc:0"},
43 "landscape": {
44 "to": "lxc:0"}},
45]
46
47if __name__ == "__main__":
48 environment = Environment(
49 loader=FileSystemLoader("."), trim_blocks=True, lstrip_blocks=True,
50 keep_trailing_newline=True)
51 template = environment.get_template("landscape-template.jinja2")
52 for flavor in FLAVORS:
53 with open("landscape-%s.yaml" % flavor["name"], "w") as fd:
54 context = DEFAULTS.copy()
55 context["name"] = flavor["name"]
56 for key in DEFAULTS.keys():
57 context[key].update(flavor.get(key, {}))
58 fd.write(template.render(context))

Subscribers

People subscribed via source and target branches