Merge lp:~verterok/charms/trusty/tanuki-spec-manager/install-only-once into lp:~tanuki/charms/trusty/tanuki-spec-manager/trunk

Proposed by Guillermo Gonzalez
Status: Merged
Approved by: Guillermo Gonzalez
Approved revision: 17
Merged at revision: 16
Proposed branch: lp:~verterok/charms/trusty/tanuki-spec-manager/install-only-once
Merge into: lp:~tanuki/charms/trusty/tanuki-spec-manager/trunk
Diff against target: 33 lines (+15/-2)
2 files modified
hooks/install (+15/-0)
hooks/services.py (+0/-2)
To merge this branch: bzr merge lp:~verterok/charms/trusty/tanuki-spec-manager/install-only-once
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+267532@code.launchpad.net

Commit message

split install into a separate script to only install basenode/run apt-get during the install hook

Description of the change

split install into a separate script to only install basenode/run apt-get during the install hook

To post a comment you must log in.
17. By Guillermo Gonzalez

add comment on install hook about only doing install once because we don't support upgrade-charm

Revision history for this message
Samuele Pedroni (pedronis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified symlink 'hooks/install' (properties changed: -x to +x)
2=== target was u'hooks.py'
3--- hooks/install 1970-01-01 00:00:00 +0000
4+++ hooks/install 2015-08-10 16:17:31 +0000
5@@ -0,0 +1,15 @@
6+#!/usr/bin/python
7+import actions
8+
9+from charmhelpers.core import hookenv
10+
11+
12+def install():
13+ """Only executed once, as we never do upgrade-charm but deploy a new unit/service"""
14+ hookenv.log('Installing spec-manager')
15+ actions.basenode('spec-manager')
16+ actions.install_packages('spec-manager')
17+
18+
19+if __name__ == "__main__":
20+ install()
21
22=== modified file 'hooks/services.py'
23--- hooks/services.py 2015-08-04 12:30:43 +0000
24+++ hooks/services.py 2015-08-10 16:17:31 +0000
25@@ -17,8 +17,6 @@
26 'required_data': [config,
27 actions.PostgresqlRelation(required=True)],
28 'data_ready': [
29- actions.basenode,
30- actions.install_packages,
31 actions.ensure_directories,
32 actions.get_cloud_service_from_tarball,
33 actions.install_python_packages,

Subscribers

People subscribed via source and target branches