Merge lp:~mthaddon/mojo/mojo-how-to-focal into lp:mojo/mojo-specs

Proposed by Tom Haddon
Status: Work in progress
Proposed branch: lp:~mthaddon/mojo/mojo-how-to-focal
Merge into: lp:mojo/mojo-specs
Diff against target: 213 lines (+66/-68)
7 files modified
mojo-how-to/devel/build (+1/-4)
mojo-how-to/devel/collect (+3/-3)
mojo-how-to/devel/relations (+25/-12)
mojo-how-to/devel/services (+20/-23)
mojo-how-to/manifest (+3/-5)
mojo-how-to/production/collect (+3/-12)
mojo-how-to/scripts/utils/configure-apache2-vhosts-autocert (+11/-9)
To merge this branch: bzr merge lp:~mthaddon/mojo/mojo-how-to-focal
Reviewer Review Type Date Requested Status
Mojo Maintainers Pending
Review via email: mp+379814@code.launchpad.net

Commit message

mojo-how-to: switch to focal and bundles

Description of the change

mojo-how-to: switch to focal and bundles

To post a comment you must log in.
lp:~mthaddon/mojo/mojo-how-to-focal updated
163. By Tom Haddon

Update autocert to not run in devel

164. By Tom Haddon

Fix template location for production

165. By Tom Haddon

Fix up location of http templates

166. By Tom Haddon

Don't try to set the vhost config twice in devel

Unmerged revisions

166. By Tom Haddon

Don't try to set the vhost config twice in devel

165. By Tom Haddon

Fix up location of http templates

164. By Tom Haddon

Fix template location for production

163. By Tom Haddon

Update autocert to not run in devel

162. By Tom Haddon

Don't overwrite apache config in devel phase with secrets

161. By Tom Haddon

Use the plural of application in bundles

160. By Tom Haddon

Secrets file needs at least one application specified

159. By Tom Haddon

Use local config for services-secret

158. By Tom Haddon

Switch to upstream apache2 charm now it supports focal as well

157. By Tom Haddon

mojo-how-to: prep for focal, switch to bundles

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'mojo-how-to/devel/build'
--- mojo-how-to/devel/build 2020-01-15 09:58:51 +0000
+++ mojo-how-to/devel/build 2020-02-25 15:42:42 +0000
@@ -18,8 +18,5 @@
18 # We don't deploy landscape in non-production environments, but we need a18 # We don't deploy landscape in non-production environments, but we need a
19 # dummy secrets file19 # dummy secrets file
20 echo "Creating dummy services-secret file in ${MOJO_LOCAL_DIR}"20 echo "Creating dummy services-secret file in ${MOJO_LOCAL_DIR}"
21 echo "mojo-how-to:21 echo "series: ${MOJO_SERIES}" > ${MOJO_LOCAL_DIR}/services-secret
22 services:
23 nrpe:
24 charm: nrpe" > ${MOJO_LOCAL_DIR}/services-secret
25fi22fi
2623
=== modified file 'mojo-how-to/devel/collect'
--- mojo-how-to/devel/collect 2016-03-30 10:00:49 +0000
+++ mojo-how-to/devel/collect 2020-02-25 15:42:42 +0000
@@ -1,8 +1,8 @@
1apache2 lp:charms/trusty/apache21apache2 cs:apache2
22
3# subordinates3# subordinates
4content-fetcher lp:~mthaddon/charms/trusty/content-fetcher/trunk4content-fetcher cs:~mthaddon/content-fetcher
5nrpe lp:charms/trusty/nrpe5nrpe cs:nrpe
66
7# content to publish7# content to publish
8mojo lp:mojo8mojo lp:mojo
99
=== removed file 'mojo-how-to/devel/pre-deploy'
=== modified file 'mojo-how-to/devel/relations'
--- mojo-how-to/devel/relations 2016-03-30 10:00:49 +0000
+++ mojo-how-to/devel/relations 2020-02-25 15:42:42 +0000
@@ -1,12 +1,25 @@
1mojo-how-to:1series: {{ series }}
2 series: {{ series }}2applications:
3 services:3 apache2:
4 apache2:4 charm: {{ charm_dir }}/apache2
5 charm: apache25 expose: true
6 content-fetcher:6 num_units: 1
7 charm: content-fetcher7 options:
8 nrpe:8 servername: mojo-how-to.example.com
9 charm: nrpe9 enable_modules: "ssl"
10 relations:10 nagios_check_http_params: "-I 127.0.0.1 -H mojo-how-to-example.com -e '200' -s 'Mojo'"
11 - ["apache2", "content-fetcher"]11 vhost_http_template: 'include-base64://{{spec_dir}}/{{stage}}/../configs/mojo-how-to-vhost-http.template'
12 - ["apache2:nrpe-external-master", "nrpe:nrpe-external-master"]12 ssl_cert: SELFSIGNED
13 content-fetcher:
14 charm: {{ charm_dir }}/content-fetcher
15 options:
16 archive_location: file:///home/ubuntu/mojo.tar
17 dest_dir: /srv/mojo
18 nrpe:
19 charm: {{ charm_dir }}/nrpe
20 options:
21 procs: '-w 150 -c 200'
22 swap: '-w 90% -c 75% -n ok'
23relations:
24 - ["apache2", "content-fetcher"]
25 - ["apache2:nrpe-external-master", "nrpe:nrpe-external-master"]
1326
=== modified file 'mojo-how-to/devel/services'
--- mojo-how-to/devel/services 2016-03-30 10:00:49 +0000
+++ mojo-how-to/devel/services 2020-02-25 15:42:42 +0000
@@ -1,23 +1,20 @@
1mojo-how-to:1series: {{ series }}
2 series: {{ series }}2applications:
3 services:3 apache2:
4 apache2:4 charm: {{ charm_dir }}/apache2
5 charm: apache25 expose: true
6 expose: true6 num_units: 1
7 num_units: 17 options:
8 options:8 servername: mojo-how-to.example.com
9 servername: mojo-how-to.example.com9 nagios_check_http_params: "-I 127.0.0.1 -H mojo-how-to-example.com -e '200' -s 'Mojo'"
10 enable_modules: "ssl"10 vhost_http_template: 'include-base64://{{spec_dir}}/{{stage}}/../configs/mojo-how-to-vhost-http.template'
11 nagios_check_http_params: "-I 127.0.0.1 -H mojo-how-to-example.com -e '200' -s 'Mojo'"11 content-fetcher:
12 vhost_http_template: 'include-base64://{{spec_dir}}/{{stage}}/../configs/mojo-how-to-vhost-http.template'12 charm: {{ charm_dir }}/content-fetcher
13 ssl_cert: SELFSIGNED13 options:
14 content-fetcher:14 archive_location: file:///home/ubuntu/mojo.tar
15 charm: content-fetcher15 dest_dir: /srv/mojo
16 options:16 nrpe:
17 archive_location: file:///home/ubuntu/mojo.tar17 charm: {{ charm_dir }}/nrpe
18 dest_dir: /srv/mojo18 options:
19 nrpe:19 procs: '-w 150 -c 200'
20 charm: nrpe20 swap: '-w 90% -c 75% -n ok'
21 {% if series == "xenial" %}options:
22 procs: '-w 150 -c 200'
23 swap: '-w 90% -c 75% -n ok'{% endif %}
2421
=== modified file 'mojo-how-to/manifest'
--- mojo-how-to/manifest 2020-01-15 08:25:40 +0000
+++ mojo-how-to/manifest 2020-02-25 15:42:42 +0000
@@ -3,16 +3,14 @@
3# We need the markdown package to be able to generate the docs for Mojo3# We need the markdown package to be able to generate the docs for Mojo
4# Run the build step4# Run the build step
5script config=build5script config=build
6# Run pre-deploy script
7script config=pre-deploy
8# Deploy services only6# Deploy services only
9deploy config=services local=services-secret delay=07bundle config=services local=services-secret
10# Copy our built resources to the instances8# Copy our built resources to the instances
11script config=upload-built-content9script config=upload-built-content
12# And now deploy relations as well10# And now deploy relations as well
13deploy config=relations11bundle config=relations
14# Configure deploy autocert managed apache212# Configure deploy autocert managed apache2
15script config=scripts/utils/configure-apache2-vhosts-autocert APPLICATION=apache2 HTTP_TEMPLATE=${MOJO_STAGE}/../configs//mojo-how-to-production-vhost-http.tmpl HTTPS_TEMPLATE=${MOJO_STAGE}/../configs//mojo-how-to-production-vhost-https.tmpl13script config=scripts/utils/configure-apache2-vhosts-autocert APPLICATION=apache2
16# Run verify steps14# Run verify steps
17include config=manifest-verify15include config=manifest-verify
18# Run post deploy steps16# Run post deploy steps
1917
=== modified file 'mojo-how-to/production/collect'
--- mojo-how-to/production/collect 2019-02-04 04:28:17 +0000
+++ mojo-how-to/production/collect 2020-02-25 15:42:42 +0000
@@ -1,19 +1,10 @@
1apache2 lp:charms/trusty/apache21apache2 cs:apache2
2ubuntu lp:~canonical-sysadmins/charms/trusty/ubuntu/trunk
32
43
5# subordinates4# subordinates
6autocert cs:~autocert-charmers/autocert5autocert cs:~autocert-charmers/autocert
7content-fetcher lp:~mthaddon/charms/trusty/content-fetcher/trunk6content-fetcher cs:~content-fetcher
8nrpe lp:charms/trusty/nrpe7nrpe cs:nrpe
9landscape-client cs:{{ series }}/landscape-client
10ksplice lp:~anthony-fappiano/charms/trusty/ksplice/trunk
11
12# basenode
13apache2/exec.d @
14apache2/exec.d/basenode lp:~canonical-sysadmins/basenode/trunk
15ubuntu/exec.d @
16ubuntu/exec.d/basenode lp:~canonical-sysadmins/basenode/trunk
178
18# content to publish9# content to publish
19mojo lp:mojo10mojo lp:mojo
2011
=== removed symlink 'mojo-how-to/production/pre-deploy'
=== target was '../devel/pre-deploy'
=== modified file 'mojo-how-to/scripts/utils/configure-apache2-vhosts-autocert'
--- mojo-how-to/scripts/utils/configure-apache2-vhosts-autocert 2019-02-04 07:38:29 +0000
+++ mojo-how-to/scripts/utils/configure-apache2-vhosts-autocert 2020-02-25 15:42:42 +0000
@@ -2,16 +2,18 @@
22
3set -eu3set -eu
44
5if [ -z "${HTTP_TEMPLATE:-}" ]; then5if [ ${MOJO_STAGE##*/} != "production" ]; then
6 HTTP_TEMPLATE="${MOJO_STAGE}/templates/vhost-http.tmpl"6 # We've already set our vhost config, so just exit
7fi7 exit 0
88fi
9if [ -z "${HTTPS_TEMPLATE:-}" ]; then9
10 HTTPS_TEMPLATE="${MOJO_STAGE}/templates/vhost-https.tmpl"10HTTP_TEMPLATE="${MOJO_STAGE}/../configs/mojo-how-to-production-vhost-http.template"
11fi11HTTPS_TEMPLATE="${MOJO_STAGE}/../configs/mojo-how-to-production-vhost-https.template"
12
13JUJU_VERSION=$(juju version)
1214
13echo "Checking Juju version..."15echo "Checking Juju version..."
14case $(juju version) in16case ${JUJU_VERSION} in
15 1.*)17 1.*)
16 juju_get="juju get"18 juju_get="juju get"
17 juju_set="juju set"19 juju_set="juju set"
@@ -23,7 +25,7 @@
23 juju_run='juju run --application'25 juju_run='juju run --application'
24 ;;26 ;;
25 *)27 *)
26 echo "Unknown Juju version $(juju version) detected! Exiting." >&228 echo "Unknown Juju version ${JUJU_VERSION} detected! Exiting." >&2
27 exit 129 exit 1
28 ;;30 ;;
29esac31esac

Subscribers

People subscribed via source and target branches

to all changes: