1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
|
series: bionic
services:
rabbitmq-server:
charm: cs:rabbitmq-server-85
{% if rabbitmq["to"] %}
to:
- {{ rabbitmq["to"] }}
{% endif %}
num_units: 1
annotations:
"gui-x": "600"
"gui-y": "370"
postgresql:
charm: cs:postgresql-199
{% if postgresql["memory"] %}
constraints: mem={{ postgresql["memory"] }}
{% endif %}
{% if postgresql["to"] %}
to:
- {{ postgresql["to"] }}
{% endif %}
num_units: 1
options:
extra_packages: python-apt postgresql-contrib postgresql-.*-debversion postgresql-plpython-.*
max_connections: {{ postgresql.max_connections }}
max_prepared_transactions: {{ postgresql.max_connections }}
{% if postgresql.manual_tuning %}
performance_tuning: manual
{% endif %}
{% if postgresql.shared_buffers %}
shared_buffers: {{ postgresql.shared_buffers }}
{% endif %}
{% if postgresql.checkpoint_segments %}
checkpoint_segments: {{ postgresql.checkpoint_segments }}
{% endif %}
{% if postgresql.maintenance_work_mem %}
maintenance_work_mem: {{ postgresql.maintenance_work_mem }}
{% endif %}
{% if postgresql.work_mem %}
work_mem: {{ postgresql.work_mem }}
{% endif %}
{% if postgresql.effective_cache_size %}
effective_cache_size: {{ postgresql.effective_cache_size }}
{% endif %}
annotations:
"gui-x": "600"
"gui-y": "120"
haproxy:
charm: cs:haproxy-48
{% if haproxy["to"] %}
to:
- "{{ haproxy["to"] }}"
{% endif %}
expose: True
num_units: 1
options:
default_timeouts: "queue 60000, connect 5000, client 120000, server 120000"
# Don't deploy default haproxy service on port 80
services: ""
source: backports
ssl_cert: SELFSIGNED
global_default_bind_options: "no-tlsv10"
annotations:
"gui-x": "1200"
"gui-y": "120"
landscape-server:
{% if landscape["branch"] %}
branch: {{ landscape["branch"] }}
{% else %}
charm: {{ landscape["charm"] }}
{% endif %}
{% if landscape["memory"] %}
constraints: mem={{ landscape["memory"] }}
{% endif %}
{% if landscape["to"] %}
to:
- {{ landscape["to"] }}
{% endif %}
num_units: 1
options:
{% if landscape["install_sources"] %}
install_sources: {{ landscape["install_sources"] }}
{% endif %}
{% if landscape["install_keys"] %}
install_keys: {{ landscape["install_keys"] }}
{% endif %}
{% if landscape["ssl-cert"] %}
ssl-cert: {{ landscape["ssl-cert"] }}
ssl-key: {{ landscape["ssl-key"] }}
{% endif %}
annotations:
"gui-x": "950"
"gui-y": "120"
{% if landscape["to"] %}
machines:
"0":
constraints: "mem=4096 root-disk=30G"
{% endif %}
relations:
- [landscape-server, rabbitmq-server]
- [landscape-server, haproxy]
- ["landscape-server:db", "postgresql:db-admin"]
|