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
=== modified file 'Makefile'
--- Makefile 2016-11-30 13:52:59 +0000
+++ Makefile 2019-08-15 21:51:25 +0000
@@ -25,9 +25,9 @@
2525
26setup-environment:26setup-environment:
27 ./scripts/create-dev-db27 ./scripts/create-dev-db
28 juju set sso-app db_host=$$(juju status sso-postgresql/0 | grep public-address | head -1 | awk '{print $$2}')28 juju config sso-app db_host=$$(juju status --format=yaml sso-postgresql/0 | grep public-address | head -1 | awk '{print $$2}')
2929
30deploy-build-label: 30deploy-build-label:
31 juju run --service sso-app "actions/preload build_label=$(BUILD_LABEL) force=true"31 juju run --application sso-app "actions/preload build_label=$(BUILD_LABEL) force=true"
32 juju run --unit sso-app/0 "actions/migrate build_label=$(BUILD_LABEL) db_user=ssoadmin db_password=ssoadmin"32 juju run --unit sso-app/0 "actions/migrate build_label=$(BUILD_LABEL) db_user=ssoadmin db_password=ssoadmin"
33 juju set sso-app build_label=$(BUILD_LABEL)33 juju config sso-app build_label=$(BUILD_LABEL)
3434
=== modified file 'charm.mk'
--- charm.mk 2018-05-24 19:13:37 +0000
+++ charm.mk 2019-08-15 21:51:25 +0000
@@ -42,7 +42,8 @@
42DEPLOYER_TARGET ?= 42DEPLOYER_TARGET ?=
4343
44CHARM ?= $(shell grep name: metadata.yaml | awk '{print $$2}')44CHARM ?= $(shell grep name: metadata.yaml | awk '{print $$2}')
45CHARM_SERIES ?= trusty45CHARM_SERIES ?= xenial
46COLLECT_FILE ?= $(PWD)/collect
4647
47# workarond for lack of multiline vars48# workarond for lack of multiline vars
48define NEWLINE49define NEWLINE
@@ -155,11 +156,13 @@
155$(CACHE_DIR):156$(CACHE_DIR):
156 @echo Building charm workspace cache in $(CACHE_DIR)...157 @echo Building charm workspace cache in $(CACHE_DIR)...
157 @mkdir -p $(CACHE_DIR) $(TARBALLS) $(CUSTOM_TARBALLS)158 @mkdir -p $(CACHE_DIR) $(TARBALLS) $(CUSTOM_TARBALLS)
159
160$(LOCAL_TRUNK):
158 @bzr branch $(TRUNK) $(LOCAL_TRUNK)161 @bzr branch $(TRUNK) $(LOCAL_TRUNK)
159162
160# | means only will fire if dir doesn't exist, not if anything inside dir has changed163# | means only will fire if dir doesn't exist, not if anything inside dir has changed
161# http://www.gnu.org/software/make/manual/make.html#Prerequisite-Types164# http://www.gnu.org/software/make/manual/make.html#Prerequisite-Types
162_pull-trunk: |$(CACHE_DIR)165_pull-trunk: $(LOCAL_TRUNK)|$(CACHE_DIR)
163 @echo Updating local copy for $(TRUNK)166 @echo Updating local copy for $(TRUNK)
164 @bzr pull -d $(LOCAL_TRUNK)167 @bzr pull -d $(LOCAL_TRUNK)
165168
@@ -191,8 +194,11 @@
191 @rm -f $(JUJU_REPOSITORY)/$(CHARM_SERIES)/$(CHARM)194 @rm -f $(JUJU_REPOSITORY)/$(CHARM_SERIES)/$(CHARM)
192 @ln -sf $(PWD) $(JUJU_REPOSITORY)/$(CHARM_SERIES)/$(CHARM)195 @ln -sf $(PWD) $(JUJU_REPOSITORY)/$(CHARM_SERIES)/$(CHARM)
193196
197collect:
198 test -s collect && cd $(JUJU_REPOSITORY)/$(CHARM_SERIES) && codetree $(COLLECT_FILE) || exit 0
199
194# deploy the env from scratch200# deploy the env from scratch
195deploy: payload | $(JUJU_REPOSITORY) exec.d/basenode201deploy: payload $(JUJU_REPOSITORY) exec.d/basenode collect
196 juju-deployer -d --local-mods -c $(DEPLOYER_CONFIG) $(DEPLOYER_TARGET)202 juju-deployer -d --local-mods -c $(DEPLOYER_CONFIG) $(DEPLOYER_TARGET)
197 $(MAKE) setup-environment # HOOK into your Makefile203 $(MAKE) setup-environment # HOOK into your Makefile
198 $(MAKE) rollout SKIP_BUILD=true204 $(MAKE) rollout SKIP_BUILD=true
@@ -214,3 +220,5 @@
214# TODO replace this with an action on the nrpe charm220# TODO replace this with an action on the nrpe charm
215nagios:221nagios:
216 juju run --service $(SERVICE) "grep -E -oh '/(usr|srv).*' /etc/nagios/nrpe.d/check_* | grep -v etc_bzr | sudo -u nagios -s bash"222 juju run --service $(SERVICE) "grep -E -oh '/(usr|srv).*' /etc/nagios/nrpe.d/check_* | grep -v etc_bzr | sudo -u nagios -s bash"
223
224.PHONY: collect
217225
=== modified file 'deploy.yaml'
--- deploy.yaml 2016-02-19 11:32:08 +0000
+++ deploy.yaml 2019-08-15 21:51:25 +0000
@@ -1,8 +1,8 @@
1sso-dev-minimal:1sso-dev-minimal:
2 series: trusty2 series: xenial
3 services:3 services:
4 sso-app:4 sso-app:
5 charm: local:trusty/canonical-identity-provider5 charm: local:xenial/canonical-identity-provider
6 options:6 options:
7 deployment: devel7 deployment: devel
8 oops_reporter: AS-DEVEL.SSO8 oops_reporter: AS-DEVEL.SSO
@@ -14,11 +14,11 @@
14 twofactor_mandatory_teams: "['ubuntuone-hackers']"14 twofactor_mandatory_teams: "['ubuntuone-hackers']"
15 email_whitelist_regexp_list: "['testemail(\\+[^@]*)?@example\\.com']"15 email_whitelist_regexp_list: "['testemail(\\+[^@]*)?@example\\.com']"
16 sso-postgresql:16 sso-postgresql:
17 charm: local:trusty/postgresql17 charm: local:xenial/postgresql
18 branch: lp:~charmers/charms/trusty/postgresql/trunk18 series: xenial
19 to: [sso-app]19 to: [sso-app]
20 options:20 options:
21 version: "9.3"21 version: "9.5" # Production uses 9.3 but 9.5 is ok for local deploys
22 # should cover lxc and openstack deploys22 # should cover lxc and openstack deploys
23 admin_addresses: 10.0.0.0/8,127.0.0.123 admin_addresses: 10.0.0.0/8,127.0.0.1
24 # dev settings, to make as fast as possible24 # dev settings, to make as fast as possible
@@ -26,16 +26,15 @@
26 # borked in r143 of postgres charm26 # borked in r143 of postgres charm
27 # synchronous_commit: false27 # synchronous_commit: false
28 standard_conforming_strings: false28 standard_conforming_strings: false
29 extra_packages: postgresql-plpython-9.329 extra_packages: postgresql-plpython-9.5
30 full_page_writes: false30 full_page_writes: false
31 ssl: "False"31 ssl: "False"
32 # disable backups32 # disable backups
33 backup_schedule: "0 0 1 1 *"33 backup_schedule: "0 0 1 1 *"
34 sso-memcached:34 sso-memcached:
35 charm: local:trusty/memcached35 charm: local:xenial/memcached
36 branch: lp:~canonical-losas/canonical-is-charms/memcached
37 sso-wsgi:36 sso-wsgi:
38 charm: cs:~bloodearnest/trusty/gunicorn37 charm: local:xenial/gunicorn
39 options:38 options:
40 wsgi_workers: 239 wsgi_workers: 2
41 relations:40 relations:
@@ -51,10 +50,9 @@
51 - sso-dev-minimal50 - sso-dev-minimal
52 services:51 services:
53 sso-nrpe:52 sso-nrpe:
54 charm: local:trusty/nrpe-external-master53 charm: local:xenial/nrpe
55 branch: lp:~canonical-sysadmins/canonical-is-charms/nrpe-external-master
56 sso-conn-check:54 sso-conn-check:
57 charm: cs:~ubuntuone-hackers/trusty/conn-check55 charm: local:xenial/conn-check
58 relations:56 relations:
59 sso-nrpe:nrpe-external-master:57 sso-nrpe:nrpe-external-master:
60 consumes:58 consumes:
6159
=== modified file 'metadata.yaml'
--- metadata.yaml 2014-10-13 14:12:12 +0000
+++ metadata.yaml 2019-08-15 21:51:25 +0000
@@ -1,6 +1,8 @@
1name: canonical-identity-provider1name: canonical-identity-provider
2summary: Canonical Identity Provider is an OpenID and OAuth 1.0 authentication service, for single sign on.2summary: Canonical Identity Provider is an OpenID and OAuth 1.0 authentication service, for single sign on.
3maintainer: Simon Davy <simon.davy@canonical.com>3maintainer: Simon Davy <simon.davy@canonical.com>
4series:
5 - xenial
4description: ""6description: ""
5categories:7categories:
6 - authentication8 - authentication

Subscribers

People subscribed via source and target branches