Merge lp:~barryprice/mojo/mojo-specs-canonical-livepatch into lp:mojo/mojo-specs

Proposed by Barry Price
Status: Merged
Merged at revision: 47
Proposed branch: lp:~barryprice/mojo/mojo-specs-canonical-livepatch
Merge into: lp:mojo/mojo-specs
Diff against target: 70 lines (+50/-0)
4 files modified
charm-testing/livepatch/collect (+3/-0)
charm-testing/livepatch/deploy (+19/-0)
charm-testing/livepatch/manifest (+21/-0)
charm-testing/livepatch/pre-deploy (+7/-0)
To merge this branch: bzr merge lp:~barryprice/mojo/mojo-specs-canonical-livepatch
Reviewer Review Type Date Requested Status
Tom Haddon Approve
Review via email: mp+324308@code.launchpad.net

Description of the change

To post a comment you must log in.
Revision history for this message
Tom Haddon (mthaddon) wrote :

Looks good to me - let me know when it's ready for review

Revision history for this message
Barry Price (barryprice) wrote :

> Looks good to me - let me know when it's ready for review

Sorry, missed this one - as far as I can see it's ready now.

Revision history for this message
Tom Haddon (mthaddon) wrote :

Looks good, will merge.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== added directory 'charm-testing/livepatch'
2=== added file 'charm-testing/livepatch/collect'
3--- charm-testing/livepatch/collect 1970-01-01 00:00:00 +0000
4+++ charm-testing/livepatch/collect 2017-05-19 10:24:02 +0000
5@@ -0,0 +1,3 @@
6+ubuntu cs:{{ series }}/ubuntu
7+canonical-livepatch cs:{{ series }}/canonical-livepatch
8+nrpe cs:{{ series }}/nrpe
9
10=== added file 'charm-testing/livepatch/deploy'
11--- charm-testing/livepatch/deploy 1970-01-01 00:00:00 +0000
12+++ charm-testing/livepatch/deploy 2017-05-19 10:24:02 +0000
13@@ -0,0 +1,19 @@
14+ubuntu:
15+ series: {{series}}
16+ services:
17+ ubuntu:
18+ charm: ubuntu
19+ livepatch:
20+ charm: canonical-livepatch
21+ options:
22+ livepatch_key: include-file://{{local_dir}}/canonical-is-livepatch.key
23+ nrpe:
24+ charm: nrpe
25+ {% if series == "xenial" %}options:
26+ procs: '-w 200 -c 250'
27+ swap: '-w 90% -c 75% -n ok'{% endif %}
28+
29+ relations:
30+ - ["ubuntu", "nrpe"]
31+ - ["ubuntu", "livepatch"]
32+ - ["livepatch", "nrpe"]
33
34=== added file 'charm-testing/livepatch/manifest'
35--- charm-testing/livepatch/manifest 1970-01-01 00:00:00 +0000
36+++ charm-testing/livepatch/manifest 2017-05-19 10:24:02 +0000
37@@ -0,0 +1,21 @@
38+# Collect, pre-deploy (lint, etc.) deploy and check the initial charm
39+collect config=collect
40+script config=pre-deploy
41+## Deploy using deploy-secrets so we can specify an http_proxy in certain environments
42+deploy config=deploy local=deploy-secrets wait=true
43+nagios-check retry=3 sleep=60
44+verify config=post-deploy
45+# Now test an upgrade to the new charm if UPGRADE_CHARM is set
46+stop-on return-code=99 config=check-upgrade-charm UPGRADE_CHARM=${UPGRADE_CHARM}
47+script config=create-upgrade-collect UPGRADE_CHARM=${UPGRADE_CHARM}
48+collect config=collect-upgrade
49+script config=upgrade-charm
50+juju-check-wait
51+nagios-check
52+verify config=post-deploy
53+# Now remove the application, and test a deployment from scratch (with the updated charm in place)
54+script config=remove-application
55+script config=pre-deploy
56+deploy config=deploy local=deploy-secrets wait=true
57+nagios-check retry=3 sleep=60
58+verify config=post-deploy
59
60=== added file 'charm-testing/livepatch/pre-deploy'
61--- charm-testing/livepatch/pre-deploy 1970-01-01 00:00:00 +0000
62+++ charm-testing/livepatch/pre-deploy 2017-05-19 10:24:02 +0000
63@@ -0,0 +1,7 @@
64+#!/bin/bash
65+
66+# If we don't have a secrets file, just copy the deploy file to deploy-secrets
67+if [ ! -f ${MOJO_LOCAL_DIR}/deploy-secrets ]; then
68+ echo "Copying ${MOJO_REPO_DIR}/charm-testing/livepatch/deploy to ${MOJO_LOCAL_DIR}/deploy-secrets"
69+ cp ${MOJO_REPO_DIR}/charm-testing/livepatch/deploy ${MOJO_LOCAL_DIR}/deploy-secrets
70+fi

Subscribers

People subscribed via source and target branches

to all changes: