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
=== added directory 'charm-testing/livepatch'
=== added file 'charm-testing/livepatch/collect'
--- charm-testing/livepatch/collect 1970-01-01 00:00:00 +0000
+++ charm-testing/livepatch/collect 2017-05-19 10:24:02 +0000
@@ -0,0 +1,3 @@
1ubuntu cs:{{ series }}/ubuntu
2canonical-livepatch cs:{{ series }}/canonical-livepatch
3nrpe cs:{{ series }}/nrpe
04
=== added file 'charm-testing/livepatch/deploy'
--- charm-testing/livepatch/deploy 1970-01-01 00:00:00 +0000
+++ charm-testing/livepatch/deploy 2017-05-19 10:24:02 +0000
@@ -0,0 +1,19 @@
1ubuntu:
2 series: {{series}}
3 services:
4 ubuntu:
5 charm: ubuntu
6 livepatch:
7 charm: canonical-livepatch
8 options:
9 livepatch_key: include-file://{{local_dir}}/canonical-is-livepatch.key
10 nrpe:
11 charm: nrpe
12 {% if series == "xenial" %}options:
13 procs: '-w 200 -c 250'
14 swap: '-w 90% -c 75% -n ok'{% endif %}
15
16 relations:
17 - ["ubuntu", "nrpe"]
18 - ["ubuntu", "livepatch"]
19 - ["livepatch", "nrpe"]
020
=== added file 'charm-testing/livepatch/manifest'
--- charm-testing/livepatch/manifest 1970-01-01 00:00:00 +0000
+++ charm-testing/livepatch/manifest 2017-05-19 10:24:02 +0000
@@ -0,0 +1,21 @@
1# Collect, pre-deploy (lint, etc.) deploy and check the initial charm
2collect config=collect
3script config=pre-deploy
4## Deploy using deploy-secrets so we can specify an http_proxy in certain environments
5deploy config=deploy local=deploy-secrets wait=true
6nagios-check retry=3 sleep=60
7verify config=post-deploy
8# Now test an upgrade to the new charm if UPGRADE_CHARM is set
9stop-on return-code=99 config=check-upgrade-charm UPGRADE_CHARM=${UPGRADE_CHARM}
10script config=create-upgrade-collect UPGRADE_CHARM=${UPGRADE_CHARM}
11collect config=collect-upgrade
12script config=upgrade-charm
13juju-check-wait
14nagios-check
15verify config=post-deploy
16# Now remove the application, and test a deployment from scratch (with the updated charm in place)
17script config=remove-application
18script config=pre-deploy
19deploy config=deploy local=deploy-secrets wait=true
20nagios-check retry=3 sleep=60
21verify config=post-deploy
022
=== added file 'charm-testing/livepatch/pre-deploy'
--- charm-testing/livepatch/pre-deploy 1970-01-01 00:00:00 +0000
+++ charm-testing/livepatch/pre-deploy 2017-05-19 10:24:02 +0000
@@ -0,0 +1,7 @@
1#!/bin/bash
2
3# If we don't have a secrets file, just copy the deploy file to deploy-secrets
4if [ ! -f ${MOJO_LOCAL_DIR}/deploy-secrets ]; then
5 echo "Copying ${MOJO_REPO_DIR}/charm-testing/livepatch/deploy to ${MOJO_LOCAL_DIR}/deploy-secrets"
6 cp ${MOJO_REPO_DIR}/charm-testing/livepatch/deploy ${MOJO_LOCAL_DIR}/deploy-secrets
7fi

Subscribers

People subscribed via source and target branches

to all changes: