Merge lp:~roadmr/canonical-identity-provider/charm-xenial-minideploy into lp:~ubuntuone-pqm-team/canonical-identity-provider/charm

Proposed by Daniel Manrique
Status: Merged
Approved by: Daniel Manrique
Approved revision: 90
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: lp:~roadmr/canonical-identity-provider/charm-xenial-minideploy
Merge into: lp:~ubuntuone-pqm-team/canonical-identity-provider/charm
Diff against target: 140 lines (+26/-18)
4 files modified
Makefile (+3/-3)
charm.mk (+11/-3)
deploy.yaml (+10/-12)
metadata.yaml (+2/-0)
To merge this branch: bzr merge lp:~roadmr/canonical-identity-provider/charm-xenial-minideploy
Reviewer Review Type Date Requested Status
Guillermo Gonzalez Approve
Review via email: mp+371381@code.launchpad.net

Commit message

Modernize charm's mini-mojo deployment makefile so it works with the Xenial-enabled charm.

The only change to the actual charm is declaring the supported series; all the other changes are to the development-only tooling and should not affect actual deploys using the charm.

To post a comment you must log in.
Revision history for this message
Guillermo Gonzalez (verterok) wrote :

Looks good!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Makefile'
2--- Makefile 2016-11-30 13:52:59 +0000
3+++ Makefile 2019-08-15 21:51:25 +0000
4@@ -25,9 +25,9 @@
5
6 setup-environment:
7 ./scripts/create-dev-db
8- juju set sso-app db_host=$$(juju status sso-postgresql/0 | grep public-address | head -1 | awk '{print $$2}')
9+ juju config sso-app db_host=$$(juju status --format=yaml sso-postgresql/0 | grep public-address | head -1 | awk '{print $$2}')
10
11 deploy-build-label:
12- juju run --service sso-app "actions/preload build_label=$(BUILD_LABEL) force=true"
13+ juju run --application sso-app "actions/preload build_label=$(BUILD_LABEL) force=true"
14 juju run --unit sso-app/0 "actions/migrate build_label=$(BUILD_LABEL) db_user=ssoadmin db_password=ssoadmin"
15- juju set sso-app build_label=$(BUILD_LABEL)
16+ juju config sso-app build_label=$(BUILD_LABEL)
17
18=== modified file 'charm.mk'
19--- charm.mk 2018-05-24 19:13:37 +0000
20+++ charm.mk 2019-08-15 21:51:25 +0000
21@@ -42,7 +42,8 @@
22 DEPLOYER_TARGET ?=
23
24 CHARM ?= $(shell grep name: metadata.yaml | awk '{print $$2}')
25-CHARM_SERIES ?= trusty
26+CHARM_SERIES ?= xenial
27+COLLECT_FILE ?= $(PWD)/collect
28
29 # workarond for lack of multiline vars
30 define NEWLINE
31@@ -155,11 +156,13 @@
32 $(CACHE_DIR):
33 @echo Building charm workspace cache in $(CACHE_DIR)...
34 @mkdir -p $(CACHE_DIR) $(TARBALLS) $(CUSTOM_TARBALLS)
35+
36+$(LOCAL_TRUNK):
37 @bzr branch $(TRUNK) $(LOCAL_TRUNK)
38
39 # | means only will fire if dir doesn't exist, not if anything inside dir has changed
40 # http://www.gnu.org/software/make/manual/make.html#Prerequisite-Types
41-_pull-trunk: |$(CACHE_DIR)
42+_pull-trunk: $(LOCAL_TRUNK)|$(CACHE_DIR)
43 @echo Updating local copy for $(TRUNK)
44 @bzr pull -d $(LOCAL_TRUNK)
45
46@@ -191,8 +194,11 @@
47 @rm -f $(JUJU_REPOSITORY)/$(CHARM_SERIES)/$(CHARM)
48 @ln -sf $(PWD) $(JUJU_REPOSITORY)/$(CHARM_SERIES)/$(CHARM)
49
50+collect:
51+ test -s collect && cd $(JUJU_REPOSITORY)/$(CHARM_SERIES) && codetree $(COLLECT_FILE) || exit 0
52+
53 # deploy the env from scratch
54-deploy: payload | $(JUJU_REPOSITORY) exec.d/basenode
55+deploy: payload $(JUJU_REPOSITORY) exec.d/basenode collect
56 juju-deployer -d --local-mods -c $(DEPLOYER_CONFIG) $(DEPLOYER_TARGET)
57 $(MAKE) setup-environment # HOOK into your Makefile
58 $(MAKE) rollout SKIP_BUILD=true
59@@ -214,3 +220,5 @@
60 # TODO replace this with an action on the nrpe charm
61 nagios:
62 juju run --service $(SERVICE) "grep -E -oh '/(usr|srv).*' /etc/nagios/nrpe.d/check_* | grep -v etc_bzr | sudo -u nagios -s bash"
63+
64+.PHONY: collect
65
66=== modified file 'deploy.yaml'
67--- deploy.yaml 2016-02-19 11:32:08 +0000
68+++ deploy.yaml 2019-08-15 21:51:25 +0000
69@@ -1,8 +1,8 @@
70 sso-dev-minimal:
71- series: trusty
72+ series: xenial
73 services:
74 sso-app:
75- charm: local:trusty/canonical-identity-provider
76+ charm: local:xenial/canonical-identity-provider
77 options:
78 deployment: devel
79 oops_reporter: AS-DEVEL.SSO
80@@ -14,11 +14,11 @@
81 twofactor_mandatory_teams: "['ubuntuone-hackers']"
82 email_whitelist_regexp_list: "['testemail(\\+[^@]*)?@example\\.com']"
83 sso-postgresql:
84- charm: local:trusty/postgresql
85- branch: lp:~charmers/charms/trusty/postgresql/trunk
86+ charm: local:xenial/postgresql
87+ series: xenial
88 to: [sso-app]
89 options:
90- version: "9.3"
91+ version: "9.5" # Production uses 9.3 but 9.5 is ok for local deploys
92 # should cover lxc and openstack deploys
93 admin_addresses: 10.0.0.0/8,127.0.0.1
94 # dev settings, to make as fast as possible
95@@ -26,16 +26,15 @@
96 # borked in r143 of postgres charm
97 # synchronous_commit: false
98 standard_conforming_strings: false
99- extra_packages: postgresql-plpython-9.3
100+ extra_packages: postgresql-plpython-9.5
101 full_page_writes: false
102 ssl: "False"
103 # disable backups
104 backup_schedule: "0 0 1 1 *"
105 sso-memcached:
106- charm: local:trusty/memcached
107- branch: lp:~canonical-losas/canonical-is-charms/memcached
108+ charm: local:xenial/memcached
109 sso-wsgi:
110- charm: cs:~bloodearnest/trusty/gunicorn
111+ charm: local:xenial/gunicorn
112 options:
113 wsgi_workers: 2
114 relations:
115@@ -51,10 +50,9 @@
116 - sso-dev-minimal
117 services:
118 sso-nrpe:
119- charm: local:trusty/nrpe-external-master
120- branch: lp:~canonical-sysadmins/canonical-is-charms/nrpe-external-master
121+ charm: local:xenial/nrpe
122 sso-conn-check:
123- charm: cs:~ubuntuone-hackers/trusty/conn-check
124+ charm: local:xenial/conn-check
125 relations:
126 sso-nrpe:nrpe-external-master:
127 consumes:
128
129=== modified file 'metadata.yaml'
130--- metadata.yaml 2014-10-13 14:12:12 +0000
131+++ metadata.yaml 2019-08-15 21:51:25 +0000
132@@ -1,6 +1,8 @@
133 name: canonical-identity-provider
134 summary: Canonical Identity Provider is an OpenID and OAuth 1.0 authentication service, for single sign on.
135 maintainer: Simon Davy <simon.davy@canonical.com>
136+series:
137+ - xenial
138 description: ""
139 categories:
140 - authentication

Subscribers

People subscribed via source and target branches