Merge lp:~azulcharmers/charms/trusty/zulu8/trunk into lp:charms/trusty/zulu8
- Trusty Tahr (14.04)
- trunk
- Merge into trunk
Proposed by
Sergey Grinev
Status: | Superseded | ||||||||
---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~azulcharmers/charms/trusty/zulu8/trunk | ||||||||
Merge into: | lp:charms/trusty/zulu8 | ||||||||
Diff against target: |
866 lines (+683/-1) (has conflicts) 26 files modified
.build.manifest (+200/-0) .gitignore (+5/-0) Makefile (+8/-0) Makefile.moved (+23/-0) config.yaml (+6/-0) hooks/config-changed (+14/-0) hooks/install (+28/-0) hooks/java-relation-broken (+14/-0) hooks/java-relation-changed (+14/-0) hooks/java-relation-departed (+14/-0) hooks/java-relation-joined (+14/-0) hooks/relations/java/README.md (+58/-0) hooks/relations/java/copyright (+16/-0) hooks/relations/java/interface.yaml (+4/-0) hooks/relations/java/provides.py (+36/-0) hooks/relations/java/requires.py (+42/-0) hooks/start (+14/-0) hooks/stop (+14/-0) hooks/upgrade-charm (+14/-0) layer.yaml (+4/-0) metadata.yaml (+10/-1) reactive/install (+86/-0) requirements.txt (+2/-0) tests/01-deploy.py (+33/-0) tests/tests.yaml (+2/-0) tox.ini (+8/-0) Conflict adding file .build.manifest. Moved existing file to .build.manifest.moved. Conflict adding file .gitignore. Moved existing file to .gitignore.moved. Conflict adding file Makefile. Moved existing file to Makefile.moved.moved. Conflict adding file Makefile.moved. Moved existing file to Makefile.moved.moved. Conflict adding file config.yaml. Moved existing file to config.yaml.moved. Conflict: can't delete hooks.moved because it is not empty. Not deleting. Conflict adding file hooks. Moved existing file to hooks.moved. Conflict because hooks.moved is not versioned, but has versioned children. Versioned directory. Conflict adding file layer.yaml. Moved existing file to layer.yaml.moved. Text conflict in metadata.yaml Conflict adding file reactive. Moved existing file to reactive.moved. Conflict adding file requirements.txt. Moved existing file to requirements.txt.moved. Conflict: can't delete tests.moved because it is not empty. Not deleting. Conflict adding file tests. Moved existing file to tests.moved. Conflict because tests.moved is not versioned, but has versioned children. Versioned directory. Conflict adding file tox.ini. Moved existing file to tox.ini.moved. Conflict adding file wheelhouse. Moved existing file to wheelhouse.moved. |
||||||||
To merge this branch: | bzr merge lp:~azulcharmers/charms/trusty/zulu8/trunk | ||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
charmers | Pending | ||
Review via email:
|
Commit message
Description of the change
updating from charmers repo
To post a comment you must log in.
Unmerged revisions
- 21. By Sergey Grinev
-
updating metadata: new site address
- 20. By Dmitriy Kozorez
-
merged with Kevin's update
- 19. By Dmitriy Kozorez
-
merge with lp:~kwmonroe/charms/trusty/zulu8/add-tests
- 18. By Dmitriy Kozorez
-
edited contact info
- 17. By Dmitriy Kozorez
-
merge with Kevin. created deployable charm
- 16. By Dmitriy Kozorez
-
merge with Kevin during review for 1519858
- 15. By Dmitriy Kozorez
-
added laeyred-specific files
- 14. By Dmitriy Kozorez
-
rewritten charm to fit layered approach
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file '.build.manifest' | |||
2 | --- .build.manifest 1970-01-01 00:00:00 +0000 | |||
3 | +++ .build.manifest 2017-08-09 15:38:57 +0000 | |||
4 | @@ -0,0 +1,200 @@ | |||
5 | 1 | { | ||
6 | 2 | "layers": [ | ||
7 | 3 | "layer:basic", | ||
8 | 4 | "zulu8", | ||
9 | 5 | "interface:java", | ||
10 | 6 | "build" | ||
11 | 7 | ], | ||
12 | 8 | "signatures": { | ||
13 | 9 | "hooks/java-relation-joined": [ | ||
14 | 10 | "interface:java", | ||
15 | 11 | "dynamic", | ||
16 | 12 | "b7e88ef72bd7a04a749faa425dd31f348700f5041f0bd0518a3bba37063bff2c" | ||
17 | 13 | ], | ||
18 | 14 | "hooks/stop": [ | ||
19 | 15 | "layer:basic", | ||
20 | 16 | "static", | ||
21 | 17 | "e3341fbab061efd2040de288e97715d7d3c0f2e3dfdd84a2d1e35fc43cec48d9" | ||
22 | 18 | ], | ||
23 | 19 | "wheelhouse/six-1.10.0-py2.py3-none-any.whl": [ | ||
24 | 20 | "layer:basic", | ||
25 | 21 | "dynamic", | ||
26 | 22 | "ae8b909ea725ca108c9a8c4e897acc4621b6b421e8b04bc8036be9cf99efc909" | ||
27 | 23 | ], | ||
28 | 24 | "hooks/relations/java/interface.yaml": [ | ||
29 | 25 | "interface:java", | ||
30 | 26 | "static", | ||
31 | 27 | "483a0485f8fc110629f4cc10fffa9fc5fc6a7d8e9fec0816c6980603b3266c88" | ||
32 | 28 | ], | ||
33 | 29 | "hooks/relations/java/provides.py": [ | ||
34 | 30 | "interface:java", | ||
35 | 31 | "static", | ||
36 | 32 | "f6364ab4c1b22b5b581bd9c40e1985d82ac7a3c3c26c32b76d858cd6032daa6a" | ||
37 | 33 | ], | ||
38 | 34 | "wheelhouse/MarkupSafe-0.23-cp27-none-linux_x86_64.whl": [ | ||
39 | 35 | "layer:basic", | ||
40 | 36 | "dynamic", | ||
41 | 37 | "e16e1bfc22cd748a6b8b253bb4207493d107a0573570d32d032a4260301e84b0" | ||
42 | 38 | ], | ||
43 | 39 | "wheelhouse/pyaml-15.8.2-py2-none-any.whl": [ | ||
44 | 40 | "layer:basic", | ||
45 | 41 | "dynamic", | ||
46 | 42 | "d143b28c16637e8a283e529dd69e1635521e45fa7cb0cddea41ed61449e02e7b" | ||
47 | 43 | ], | ||
48 | 44 | "Makefile": [ | ||
49 | 45 | "layer:basic", | ||
50 | 46 | "static", | ||
51 | 47 | "f91213a68bc5edce9ebe0615b70cc908ea45466c2e205fb6cfe9c35d9c3fde4b" | ||
52 | 48 | ], | ||
53 | 49 | "reactive/__init__.py": [ | ||
54 | 50 | "layer:basic", | ||
55 | 51 | "static", | ||
56 | 52 | "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" | ||
57 | 53 | ], | ||
58 | 54 | "hooks/relations/java/requires.py": [ | ||
59 | 55 | "interface:java", | ||
60 | 56 | "static", | ||
61 | 57 | "fa2eca6fb016bf3e5073ed88790179f1f82b0eb5daa20f7dbe4c759fca697d12" | ||
62 | 58 | ], | ||
63 | 59 | "hooks/java-relation-changed": [ | ||
64 | 60 | "interface:java", | ||
65 | 61 | "dynamic", | ||
66 | 62 | "b7e88ef72bd7a04a749faa425dd31f348700f5041f0bd0518a3bba37063bff2c" | ||
67 | 63 | ], | ||
68 | 64 | "hooks/upgrade-charm": [ | ||
69 | 65 | "layer:basic", | ||
70 | 66 | "static", | ||
71 | 67 | "e3341fbab061efd2040de288e97715d7d3c0f2e3dfdd84a2d1e35fc43cec48d9" | ||
72 | 68 | ], | ||
73 | 69 | "wheelhouse/netaddr-0.7.18-py2-none-any.whl": [ | ||
74 | 70 | "layer:basic", | ||
75 | 71 | "dynamic", | ||
76 | 72 | "1ace3d06a4995b955b787bc82f04c4bb0195d7fed7efc4d3c41e7896a988b196" | ||
77 | 73 | ], | ||
78 | 74 | "wheelhouse/Tempita-0.5.2-py2-none-any.whl": [ | ||
79 | 75 | "layer:basic", | ||
80 | 76 | "dynamic", | ||
81 | 77 | "8375d1fb299ab8cd66f9cd322e53f2474bea519ed20038869480c38312f723f0" | ||
82 | 78 | ], | ||
83 | 79 | "reactive/install": [ | ||
84 | 80 | "zulu8", | ||
85 | 81 | "static", | ||
86 | 82 | "1df6bd78388182d22efdead95d33f5176a18d3504a5a0cea3bf7aff01566ba37" | ||
87 | 83 | ], | ||
88 | 84 | "README.md": [ | ||
89 | 85 | "zulu8", | ||
90 | 86 | "static", | ||
91 | 87 | "c76ae8e55ae4ce74a9b46c1d82a10df4f439a3c05375a75d1e85d21715fcf0bc" | ||
92 | 88 | ], | ||
93 | 89 | "tox.ini": [ | ||
94 | 90 | "layer:basic", | ||
95 | 91 | "static", | ||
96 | 92 | "5efb9280763f1f4cb861485e80863caafc9cd5ab1176543e911c27519436de7a" | ||
97 | 93 | ], | ||
98 | 94 | "metadata.yaml": [ | ||
99 | 95 | "zulu8", | ||
100 | 96 | "dynamic", | ||
101 | 97 | "e89bfcdd0b0c6bddecc219cd30656e2c482558f197200ed3bb2b0f4917c937ce" | ||
102 | 98 | ], | ||
103 | 99 | "wheelhouse/pip-7.1.2-py2.py3-none-any.whl": [ | ||
104 | 100 | "layer:basic", | ||
105 | 101 | "dynamic", | ||
106 | 102 | "8272f38ad219a6af3b97490859d0f4497683d8372995b8a34ac056c03dafa243" | ||
107 | 103 | ], | ||
108 | 104 | "copyright": [ | ||
109 | 105 | "zulu8", | ||
110 | 106 | "static", | ||
111 | 107 | "cc92fa52ff579376afbf222c78c333f82f275651712a76ec9cc143828db25475" | ||
112 | 108 | ], | ||
113 | 109 | "hooks/relations/java/README.md": [ | ||
114 | 110 | "interface:java", | ||
115 | 111 | "static", | ||
116 | 112 | "d8bdd132abb116a52fcb1db548d3c75e2a5ec3cdd873742c89be212030bc566f" | ||
117 | 113 | ], | ||
118 | 114 | "wheelhouse/PyYAML-3.11-cp27-none-linux_x86_64.whl": [ | ||
119 | 115 | "layer:basic", | ||
120 | 116 | "dynamic", | ||
121 | 117 | "e5e14bca3d05c41127b72656f96cf3c2e5e9e9b9a2f2c9a207efef74a9fb359c" | ||
122 | 118 | ], | ||
123 | 119 | "hooks/start": [ | ||
124 | 120 | "layer:basic", | ||
125 | 121 | "static", | ||
126 | 122 | "e3341fbab061efd2040de288e97715d7d3c0f2e3dfdd84a2d1e35fc43cec48d9" | ||
127 | 123 | ], | ||
128 | 124 | "wheelhouse/Jinja2-2.8-py2.py3-none-any.whl": [ | ||
129 | 125 | "layer:basic", | ||
130 | 126 | "dynamic", | ||
131 | 127 | "6329846ce408fc32dba509275a94597b9e56beb78a8743931ef38cf0189748cb" | ||
132 | 128 | ], | ||
133 | 129 | ".gitignore": [ | ||
134 | 130 | "layer:basic", | ||
135 | 131 | "static", | ||
136 | 132 | "0da5c4dcda27cd6406e5bb81cbf68ddccaf728ac764ec15053a165c1449d87d9" | ||
137 | 133 | ], | ||
138 | 134 | "hooks/relations/java/__init__.py": [ | ||
139 | 135 | "interface:java", | ||
140 | 136 | "static", | ||
141 | 137 | "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855" | ||
142 | 138 | ], | ||
143 | 139 | "hooks/install": [ | ||
144 | 140 | "layer:basic", | ||
145 | 141 | "static", | ||
146 | 142 | "5f1bf2a89d26e56e57f56456d1390c55803c5f33c0c65f414692555c508283ea" | ||
147 | 143 | ], | ||
148 | 144 | "config.yaml": [ | ||
149 | 145 | "zulu8", | ||
150 | 146 | "dynamic", | ||
151 | 147 | "d47282e928f04305946b22781e0ad9f3c2eb76138addb5d69f606a904f76203c" | ||
152 | 148 | ], | ||
153 | 149 | "layer.yaml": [ | ||
154 | 150 | "zulu8", | ||
155 | 151 | "dynamic", | ||
156 | 152 | "4fa777c2efbbfe13f0e26c468b6ab09d0eebd6fbc9b36aece6764a643a568d5e" | ||
157 | 153 | ], | ||
158 | 154 | "wheelhouse/charms.reactive-0.3.6-py2-none-any.whl": [ | ||
159 | 155 | "layer:basic", | ||
160 | 156 | "dynamic", | ||
161 | 157 | "196f8005f275e5d17ccaeb19e5a98d006fa75941ca7c81e09d2a021cacdd9ba4" | ||
162 | 158 | ], | ||
163 | 159 | "wheelhouse/charmhelpers-0.6.0-py2-none-any.whl": [ | ||
164 | 160 | "layer:basic", | ||
165 | 161 | "dynamic", | ||
166 | 162 | "4a3a0bf726f45d3ac05f33d4e4cc6f43175af404f6dccfaa1b4850985e2d8670" | ||
167 | 163 | ], | ||
168 | 164 | "hooks/relations/java/copyright": [ | ||
169 | 165 | "interface:java", | ||
170 | 166 | "static", | ||
171 | 167 | "188b8b4aa4477e8d2a0b4c290c451326456a0ddf58e1f314c3f5bf151ddbd8a8" | ||
172 | 168 | ], | ||
173 | 169 | "hooks/java-relation-broken": [ | ||
174 | 170 | "interface:java", | ||
175 | 171 | "dynamic", | ||
176 | 172 | "b7e88ef72bd7a04a749faa425dd31f348700f5041f0bd0518a3bba37063bff2c" | ||
177 | 173 | ], | ||
178 | 174 | ".build.manifest": [ | ||
179 | 175 | "build", | ||
180 | 176 | "dynamic", | ||
181 | 177 | "unchecked" | ||
182 | 178 | ], | ||
183 | 179 | "icon.svg": [ | ||
184 | 180 | "zulu8", | ||
185 | 181 | "static", | ||
186 | 182 | "b9bb876dd399b42e25201f0bb073dd6e6981a0f6a13601262f0985d84b8f09bb" | ||
187 | 183 | ], | ||
188 | 184 | "hooks/java-relation-departed": [ | ||
189 | 185 | "interface:java", | ||
190 | 186 | "dynamic", | ||
191 | 187 | "b7e88ef72bd7a04a749faa425dd31f348700f5041f0bd0518a3bba37063bff2c" | ||
192 | 188 | ], | ||
193 | 189 | "requirements.txt": [ | ||
194 | 190 | "layer:basic", | ||
195 | 191 | "static", | ||
196 | 192 | "0f1c70d27e26005a96d66ad54482877ae20f7737693c833e29dd72bd6ac24892" | ||
197 | 193 | ], | ||
198 | 194 | "hooks/config-changed": [ | ||
199 | 195 | "layer:basic", | ||
200 | 196 | "static", | ||
201 | 197 | "e3341fbab061efd2040de288e97715d7d3c0f2e3dfdd84a2d1e35fc43cec48d9" | ||
202 | 198 | ] | ||
203 | 199 | } | ||
204 | 200 | } | ||
205 | 0 | \ No newline at end of file | 201 | \ No newline at end of file |
206 | 1 | 202 | ||
207 | === renamed file '.build.manifest' => '.build.manifest.moved' | |||
208 | === added file '.gitignore' | |||
209 | --- .gitignore 1970-01-01 00:00:00 +0000 | |||
210 | +++ .gitignore 2017-08-09 15:38:57 +0000 | |||
211 | @@ -0,0 +1,5 @@ | |||
212 | 1 | *.pyc | ||
213 | 2 | *~ | ||
214 | 3 | .ropeproject | ||
215 | 4 | .settings | ||
216 | 5 | .tox | ||
217 | 0 | 6 | ||
218 | === renamed file '.gitignore' => '.gitignore.moved' | |||
219 | === added file 'Makefile' | |||
220 | --- Makefile 1970-01-01 00:00:00 +0000 | |||
221 | +++ Makefile 2017-08-09 15:38:57 +0000 | |||
222 | @@ -0,0 +1,8 @@ | |||
223 | 1 | #!/usr/bin/make | ||
224 | 2 | PYTHON := /usr/bin/env python | ||
225 | 3 | |||
226 | 4 | all: lint | ||
227 | 5 | |||
228 | 6 | lint: | ||
229 | 7 | @flake8 --exclude hooks/charmhelpers hooks tests | ||
230 | 8 | @charm proof | ||
231 | 0 | 9 | ||
232 | === added file 'Makefile.moved' | |||
233 | --- Makefile.moved 1970-01-01 00:00:00 +0000 | |||
234 | +++ Makefile.moved 2017-08-09 15:38:57 +0000 | |||
235 | @@ -0,0 +1,23 @@ | |||
236 | 1 | #!/usr/bin/make | ||
237 | 2 | PYTHON := /usr/bin/env python | ||
238 | 3 | |||
239 | 4 | all: lint test build | ||
240 | 5 | |||
241 | 6 | |||
242 | 7 | build: unit_test | ||
243 | 8 | juju-compose -o ~/charms . | ||
244 | 9 | |||
245 | 10 | lint: | ||
246 | 11 | @flake8 --exclude hooks/charmhelpers hooks unit_tests tests | ||
247 | 12 | @charm proof | ||
248 | 13 | |||
249 | 14 | unit_test: | ||
250 | 15 | @echo Starting tests... | ||
251 | 16 | tox | ||
252 | 17 | |||
253 | 18 | test: | ||
254 | 19 | @echo Starting Amulet tests... | ||
255 | 20 | # coreycb note: The -v should only be temporary until Amulet sends | ||
256 | 21 | # raise_status() messages to stderr: | ||
257 | 22 | # https://bugs.launchpad.net/amulet/+bug/1320357 | ||
258 | 23 | @juju test -v -p AMULET_HTTP_PROXY,AMULET_OS_VIP --timeout 2700 | ||
259 | 0 | 24 | ||
260 | === renamed file 'Makefile' => 'Makefile.moved.moved' | |||
261 | === added file 'config.yaml' | |||
262 | --- config.yaml 1970-01-01 00:00:00 +0000 | |||
263 | +++ config.yaml 2017-08-09 15:38:57 +0000 | |||
264 | @@ -0,0 +1,6 @@ | |||
265 | 1 | options: | ||
266 | 2 | java-major: | ||
267 | 3 | type: string | ||
268 | 4 | default: '8' | ||
269 | 5 | description: | | ||
270 | 6 | Major version of Java. Defaults to 8. | ||
271 | 0 | 7 | ||
272 | === renamed file 'config.yaml' => 'config.yaml.moved' | |||
273 | === added directory 'hooks' | |||
274 | === renamed directory 'hooks' => 'hooks.moved' | |||
275 | === added file 'hooks/config-changed' | |||
276 | --- hooks/config-changed 1970-01-01 00:00:00 +0000 | |||
277 | +++ hooks/config-changed 2017-08-09 15:38:57 +0000 | |||
278 | @@ -0,0 +1,14 @@ | |||
279 | 1 | #!/usr/bin/env python | ||
280 | 2 | |||
281 | 3 | # Load modules from $CHARM_DIR/lib | ||
282 | 4 | import sys | ||
283 | 5 | sys.path.append('lib') | ||
284 | 6 | |||
285 | 7 | # This will load and run the appropriate @hook and other decorated | ||
286 | 8 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
287 | 9 | # and $CHARM_DIR/hooks/relations. | ||
288 | 10 | # | ||
289 | 11 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
290 | 12 | # for more information on this pattern. | ||
291 | 13 | from charms.reactive import main | ||
292 | 14 | main() | ||
293 | 0 | 15 | ||
294 | === added file 'hooks/install' | |||
295 | --- hooks/install 1970-01-01 00:00:00 +0000 | |||
296 | +++ hooks/install 2017-08-09 15:38:57 +0000 | |||
297 | @@ -0,0 +1,28 @@ | |||
298 | 1 | #!/usr/bin/env python | ||
299 | 2 | |||
300 | 3 | from glob import glob | ||
301 | 4 | import os | ||
302 | 5 | import sys | ||
303 | 6 | from subprocess import check_call | ||
304 | 7 | |||
305 | 8 | |||
306 | 9 | # Load modules from $CHARM_DIR/lib | ||
307 | 10 | sys.path.append('lib') | ||
308 | 11 | |||
309 | 12 | # bootstrap wheelhouse | ||
310 | 13 | if os.path.exists('wheelhouse'): | ||
311 | 14 | check_call(['apt-get', 'install', '-yq', 'python-pip']) | ||
312 | 15 | # need newer pip, to fix spurious Double Requirement error https://github.com/pypa/pip/issues/56 | ||
313 | 16 | check_call(['pip', 'install', '-U', '--no-index', '-f', 'wheelhouse', 'pip']) | ||
314 | 17 | # install the rest of the wheelhouse deps | ||
315 | 18 | check_call(['pip', 'install', '-U', '--no-index'] + glob('wheelhouse/*')) | ||
316 | 19 | |||
317 | 20 | |||
318 | 21 | # This will load and run the appropriate @hook and other decorated | ||
319 | 22 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
320 | 23 | # and $CHARM_DIR/hooks/relations. | ||
321 | 24 | # | ||
322 | 25 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
323 | 26 | # for more information on this pattern. | ||
324 | 27 | from charms.reactive import main | ||
325 | 28 | main() | ||
326 | 0 | 29 | ||
327 | === added file 'hooks/java-relation-broken' | |||
328 | --- hooks/java-relation-broken 1970-01-01 00:00:00 +0000 | |||
329 | +++ hooks/java-relation-broken 2017-08-09 15:38:57 +0000 | |||
330 | @@ -0,0 +1,14 @@ | |||
331 | 1 | #!/usr/bin/env python | ||
332 | 2 | |||
333 | 3 | # Load modules from $CHARM_DIR/lib | ||
334 | 4 | import sys | ||
335 | 5 | sys.path.append('lib') | ||
336 | 6 | |||
337 | 7 | # This will load and run the appropriate @hook and other decorated | ||
338 | 8 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
339 | 9 | # and $CHARM_DIR/hooks/relations. | ||
340 | 10 | # | ||
341 | 11 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
342 | 12 | # for more information on this pattern. | ||
343 | 13 | from charms.reactive import main | ||
344 | 14 | main('java') | ||
345 | 0 | 15 | ||
346 | === added file 'hooks/java-relation-changed' | |||
347 | --- hooks/java-relation-changed 1970-01-01 00:00:00 +0000 | |||
348 | +++ hooks/java-relation-changed 2017-08-09 15:38:57 +0000 | |||
349 | @@ -0,0 +1,14 @@ | |||
350 | 1 | #!/usr/bin/env python | ||
351 | 2 | |||
352 | 3 | # Load modules from $CHARM_DIR/lib | ||
353 | 4 | import sys | ||
354 | 5 | sys.path.append('lib') | ||
355 | 6 | |||
356 | 7 | # This will load and run the appropriate @hook and other decorated | ||
357 | 8 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
358 | 9 | # and $CHARM_DIR/hooks/relations. | ||
359 | 10 | # | ||
360 | 11 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
361 | 12 | # for more information on this pattern. | ||
362 | 13 | from charms.reactive import main | ||
363 | 14 | main('java') | ||
364 | 0 | 15 | ||
365 | === added file 'hooks/java-relation-departed' | |||
366 | --- hooks/java-relation-departed 1970-01-01 00:00:00 +0000 | |||
367 | +++ hooks/java-relation-departed 2017-08-09 15:38:57 +0000 | |||
368 | @@ -0,0 +1,14 @@ | |||
369 | 1 | #!/usr/bin/env python | ||
370 | 2 | |||
371 | 3 | # Load modules from $CHARM_DIR/lib | ||
372 | 4 | import sys | ||
373 | 5 | sys.path.append('lib') | ||
374 | 6 | |||
375 | 7 | # This will load and run the appropriate @hook and other decorated | ||
376 | 8 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
377 | 9 | # and $CHARM_DIR/hooks/relations. | ||
378 | 10 | # | ||
379 | 11 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
380 | 12 | # for more information on this pattern. | ||
381 | 13 | from charms.reactive import main | ||
382 | 14 | main('java') | ||
383 | 0 | 15 | ||
384 | === added file 'hooks/java-relation-joined' | |||
385 | --- hooks/java-relation-joined 1970-01-01 00:00:00 +0000 | |||
386 | +++ hooks/java-relation-joined 2017-08-09 15:38:57 +0000 | |||
387 | @@ -0,0 +1,14 @@ | |||
388 | 1 | #!/usr/bin/env python | ||
389 | 2 | |||
390 | 3 | # Load modules from $CHARM_DIR/lib | ||
391 | 4 | import sys | ||
392 | 5 | sys.path.append('lib') | ||
393 | 6 | |||
394 | 7 | # This will load and run the appropriate @hook and other decorated | ||
395 | 8 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
396 | 9 | # and $CHARM_DIR/hooks/relations. | ||
397 | 10 | # | ||
398 | 11 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
399 | 12 | # for more information on this pattern. | ||
400 | 13 | from charms.reactive import main | ||
401 | 14 | main('java') | ||
402 | 0 | 15 | ||
403 | === added directory 'hooks/relations' | |||
404 | === added directory 'hooks/relations/java' | |||
405 | === added file 'hooks/relations/java/README.md' | |||
406 | --- hooks/relations/java/README.md 1970-01-01 00:00:00 +0000 | |||
407 | +++ hooks/relations/java/README.md 2017-08-09 15:38:57 +0000 | |||
408 | @@ -0,0 +1,58 @@ | |||
409 | 1 | # Overview | ||
410 | 2 | |||
411 | 3 | This interface layer handles the communication with Java related services via | ||
412 | 4 | the `java` interface protocol. It sets two states when appropriate: | ||
413 | 5 | |||
414 | 6 | * `{relation_name}.connected` indicates that a Java relation is present | ||
415 | 7 | * `{relation_name}.ready` indicates that Java is installed and ready | ||
416 | 8 | |||
417 | 9 | The charm implementing this relation (e.g., [openjdk][]) will install and | ||
418 | 10 | configure the Java environment. It also sets two pieces of relation data: | ||
419 | 11 | |||
420 | 12 | * `java-home` is equivalent to the $JAVA_HOME environment variable | ||
421 | 13 | * `java-version` is the numeric version string (e.g. "1.7.0_85") | ||
422 | 14 | |||
423 | 15 | The charm consuming this relation (e.g., [ubuntu-java][]) will use the above | ||
424 | 16 | relation data to configure its Java based service. | ||
425 | 17 | |||
426 | 18 | |||
427 | 19 | # Example Usage | ||
428 | 20 | |||
429 | 21 | An example of a charm using this interface would be: | ||
430 | 22 | |||
431 | 23 | ```python | ||
432 | 24 | @when('java.connected') | ||
433 | 25 | @when_not('java.installed') | ||
434 | 26 | def install(): | ||
435 | 27 | status_set('maintenance', 'Installing JRE') | ||
436 | 28 | java.install_jre() | ||
437 | 29 | reactive.set_state('java.installed') | ||
438 | 30 | hookenv.status_set('active', 'JRE is installed') | ||
439 | 31 | |||
440 | 32 | @when('java.connected', 'java.installed') | ||
441 | 33 | def configure(): | ||
442 | 34 | # update /etc/environment, call update-alternatives, etc | ||
443 | 35 | java.configure_jre() | ||
444 | 36 | hookenv.status_set('active', 'JRE is ready') | ||
445 | 37 | |||
446 | 38 | @when_not('java.connected') | ||
447 | 39 | @when('java.installed') | ||
448 | 40 | def uninstall(): | ||
449 | 41 | java.uninstall_jre() | ||
450 | 42 | reactive.remove_state('java.installed') | ||
451 | 43 | hookenv.status_set('blocked', 'No JRE available') | ||
452 | 44 | ``` | ||
453 | 45 | |||
454 | 46 | |||
455 | 47 | # Contact Information | ||
456 | 48 | |||
457 | 49 | - <bigdata@lists.ubuntu.com> | ||
458 | 50 | |||
459 | 51 | |||
460 | 52 | # OpenJDK | ||
461 | 53 | |||
462 | 54 | - [OpenJDK](http://openjdk.java.net/) home page | ||
463 | 55 | |||
464 | 56 | |||
465 | 57 | [openjdk]: https://jujucharms.com/u/kwmonroe/openjdk | ||
466 | 58 | [ubuntu-java]: https://jujucharms.com/u/kwmonroe/ubuntu-java | ||
467 | 0 | 59 | ||
468 | === added file 'hooks/relations/java/__init__.py' | |||
469 | === added file 'hooks/relations/java/copyright' | |||
470 | --- hooks/relations/java/copyright 1970-01-01 00:00:00 +0000 | |||
471 | +++ hooks/relations/java/copyright 2017-08-09 15:38:57 +0000 | |||
472 | @@ -0,0 +1,16 @@ | |||
473 | 1 | Format: http://dep.debian.net/deps/dep5/ | ||
474 | 2 | |||
475 | 3 | Files: * | ||
476 | 4 | Copyright: Copyright 2015, Canonical Ltd., All Rights Reserved. | ||
477 | 5 | License: Apache License 2.0 | ||
478 | 6 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
479 | 7 | you may not use this file except in compliance with the License. | ||
480 | 8 | You may obtain a copy of the License at | ||
481 | 9 | . | ||
482 | 10 | http://www.apache.org/licenses/LICENSE-2.0 | ||
483 | 11 | . | ||
484 | 12 | Unless required by applicable law or agreed to in writing, software | ||
485 | 13 | distributed under the License is distributed on an "AS IS" BASIS, | ||
486 | 14 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
487 | 15 | See the License for the specific language governing permissions and | ||
488 | 16 | limitations under the License. | ||
489 | 0 | 17 | ||
490 | === added file 'hooks/relations/java/interface.yaml' | |||
491 | --- hooks/relations/java/interface.yaml 1970-01-01 00:00:00 +0000 | |||
492 | +++ hooks/relations/java/interface.yaml 2017-08-09 15:38:57 +0000 | |||
493 | @@ -0,0 +1,4 @@ | |||
494 | 1 | name: java | ||
495 | 2 | summary: Interface for relating to Java | ||
496 | 3 | version: 1 | ||
497 | 4 | maintainer: "Big Data Team <bigdata@lists.ubuntu.com>" | ||
498 | 0 | 5 | ||
499 | === added file 'hooks/relations/java/provides.py' | |||
500 | --- hooks/relations/java/provides.py 1970-01-01 00:00:00 +0000 | |||
501 | +++ hooks/relations/java/provides.py 2017-08-09 15:38:57 +0000 | |||
502 | @@ -0,0 +1,36 @@ | |||
503 | 1 | # Licensed under the Apache License, Version 2.0 (the "License"); | ||
504 | 2 | # you may not use this file except in compliance with the License. | ||
505 | 3 | # You may obtain a copy of the License at | ||
506 | 4 | # | ||
507 | 5 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
508 | 6 | # | ||
509 | 7 | # Unless required by applicable law or agreed to in writing, software | ||
510 | 8 | # distributed under the License is distributed on an "AS IS" BASIS, | ||
511 | 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
512 | 10 | # See the License for the specific language governing permissions and | ||
513 | 11 | # limitations under the License. | ||
514 | 12 | |||
515 | 13 | from charms.reactive import hook | ||
516 | 14 | from charms.reactive import RelationBase | ||
517 | 15 | from charms.reactive import scopes | ||
518 | 16 | |||
519 | 17 | |||
520 | 18 | class JavaProvides(RelationBase): | ||
521 | 19 | scope = scopes.GLOBAL | ||
522 | 20 | |||
523 | 21 | # convenient way to provide accessor methods | ||
524 | 22 | auto_accessors = ['java-home', 'java-version'] | ||
525 | 23 | |||
526 | 24 | def java_ready(self): | ||
527 | 25 | return self.get_remote('java-ready', 'false').lower() == 'true' | ||
528 | 26 | |||
529 | 27 | @hook('{provides:java}-relation-changed') | ||
530 | 28 | def changed(self): | ||
531 | 29 | if self.java_ready(): | ||
532 | 30 | self.set_state('{relation_name}.ready') | ||
533 | 31 | else: | ||
534 | 32 | self.remove_state('{relation_name}.ready') | ||
535 | 33 | |||
536 | 34 | @hook('{provides:java}-relation-departed') | ||
537 | 35 | def departed(self): | ||
538 | 36 | self.remove_state('{relation_name}.ready') | ||
539 | 0 | 37 | ||
540 | === added file 'hooks/relations/java/requires.py' | |||
541 | --- hooks/relations/java/requires.py 1970-01-01 00:00:00 +0000 | |||
542 | +++ hooks/relations/java/requires.py 2017-08-09 15:38:57 +0000 | |||
543 | @@ -0,0 +1,42 @@ | |||
544 | 1 | # Licensed under the Apache License, Version 5.0 (the "License"); | ||
545 | 2 | # you may not use this file except in compliance with the License. | ||
546 | 3 | # You may obtain a copy of the License at | ||
547 | 4 | # | ||
548 | 5 | # http://www.apache.org/licenses/LICENSE-2.0 | ||
549 | 6 | # | ||
550 | 7 | # Unless required by applicable law or agreed to in writing, software | ||
551 | 8 | # distributed under the License is distributed on an "AS IS" BASIS, | ||
552 | 9 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
553 | 10 | # See the License for the specific language governing permissions and | ||
554 | 11 | # limitations under the License. | ||
555 | 12 | |||
556 | 13 | from charms.reactive import hook | ||
557 | 14 | from charms.reactive import RelationBase | ||
558 | 15 | from charms.reactive import scopes | ||
559 | 16 | |||
560 | 17 | |||
561 | 18 | class JavaRequires(RelationBase): | ||
562 | 19 | scope = scopes.GLOBAL | ||
563 | 20 | |||
564 | 21 | @hook('{requires:java}-relation-joined') | ||
565 | 22 | def joined(self): | ||
566 | 23 | self.set_state('{relation_name}.connected') | ||
567 | 24 | |||
568 | 25 | @hook('{requires:java}-relation-departed') | ||
569 | 26 | def departed(self): | ||
570 | 27 | self.remove_state('{relation_name}.connected') | ||
571 | 28 | |||
572 | 29 | # Send relation data when java is ready | ||
573 | 30 | def set_ready(self, java_home, java_version): | ||
574 | 31 | self.set_remote(data={ | ||
575 | 32 | 'java-ready': True, | ||
576 | 33 | 'java-home': java_home, | ||
577 | 34 | 'java-version': java_version, | ||
578 | 35 | }) | ||
579 | 36 | |||
580 | 37 | # For minor upgrades, provide a way to set java-version independently | ||
581 | 38 | def set_version(self, version): | ||
582 | 39 | self.set_remote('java-version', version) | ||
583 | 40 | |||
584 | 41 | def unset_ready(self): | ||
585 | 42 | self.set_remote('java-ready', False) | ||
586 | 0 | 43 | ||
587 | === added file 'hooks/start' | |||
588 | --- hooks/start 1970-01-01 00:00:00 +0000 | |||
589 | +++ hooks/start 2017-08-09 15:38:57 +0000 | |||
590 | @@ -0,0 +1,14 @@ | |||
591 | 1 | #!/usr/bin/env python | ||
592 | 2 | |||
593 | 3 | # Load modules from $CHARM_DIR/lib | ||
594 | 4 | import sys | ||
595 | 5 | sys.path.append('lib') | ||
596 | 6 | |||
597 | 7 | # This will load and run the appropriate @hook and other decorated | ||
598 | 8 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
599 | 9 | # and $CHARM_DIR/hooks/relations. | ||
600 | 10 | # | ||
601 | 11 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
602 | 12 | # for more information on this pattern. | ||
603 | 13 | from charms.reactive import main | ||
604 | 14 | main() | ||
605 | 0 | 15 | ||
606 | === added file 'hooks/stop' | |||
607 | --- hooks/stop 1970-01-01 00:00:00 +0000 | |||
608 | +++ hooks/stop 2017-08-09 15:38:57 +0000 | |||
609 | @@ -0,0 +1,14 @@ | |||
610 | 1 | #!/usr/bin/env python | ||
611 | 2 | |||
612 | 3 | # Load modules from $CHARM_DIR/lib | ||
613 | 4 | import sys | ||
614 | 5 | sys.path.append('lib') | ||
615 | 6 | |||
616 | 7 | # This will load and run the appropriate @hook and other decorated | ||
617 | 8 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
618 | 9 | # and $CHARM_DIR/hooks/relations. | ||
619 | 10 | # | ||
620 | 11 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
621 | 12 | # for more information on this pattern. | ||
622 | 13 | from charms.reactive import main | ||
623 | 14 | main() | ||
624 | 0 | 15 | ||
625 | === added file 'hooks/upgrade-charm' | |||
626 | --- hooks/upgrade-charm 1970-01-01 00:00:00 +0000 | |||
627 | +++ hooks/upgrade-charm 2017-08-09 15:38:57 +0000 | |||
628 | @@ -0,0 +1,14 @@ | |||
629 | 1 | #!/usr/bin/env python | ||
630 | 2 | |||
631 | 3 | # Load modules from $CHARM_DIR/lib | ||
632 | 4 | import sys | ||
633 | 5 | sys.path.append('lib') | ||
634 | 6 | |||
635 | 7 | # This will load and run the appropriate @hook and other decorated | ||
636 | 8 | # handlers from $CHARM_DIR/reactive, $CHARM_DIR/hooks/reactive, | ||
637 | 9 | # and $CHARM_DIR/hooks/relations. | ||
638 | 10 | # | ||
639 | 11 | # See https://jujucharms.com/docs/stable/getting-started-with-charms-reactive | ||
640 | 12 | # for more information on this pattern. | ||
641 | 13 | from charms.reactive import main | ||
642 | 14 | main() | ||
643 | 0 | 15 | ||
644 | === added file 'layer.yaml' | |||
645 | --- layer.yaml 1970-01-01 00:00:00 +0000 | |||
646 | +++ layer.yaml 2017-08-09 15:38:57 +0000 | |||
647 | @@ -0,0 +1,4 @@ | |||
648 | 1 | includes: | ||
649 | 2 | - layer:basic | ||
650 | 3 | - interface:java | ||
651 | 4 | is: zulu8 | ||
652 | 0 | 5 | ||
653 | === renamed file 'layer.yaml' => 'layer.yaml.moved' | |||
654 | === modified file 'metadata.yaml' | |||
655 | --- metadata.yaml 2016-03-10 23:04:24 +0000 | |||
656 | +++ metadata.yaml 2017-08-09 15:38:57 +0000 | |||
657 | @@ -1,13 +1,22 @@ | |||
658 | 1 | name: zulu8 | 1 | name: zulu8 |
659 | 2 | summary: Azul implementation of OpenJDK | 2 | summary: Azul implementation of OpenJDK |
661 | 3 | maintainer: Azul Systems <azul_openjdk@azulsystems.com> | 3 | maintainer: Azul Systems <azul_openjdk@azul.com> |
662 | 4 | description: | | 4 | description: | |
663 | 5 | Azul Zulu is open source implementation of OpenJDK. | 5 | Azul Zulu is open source implementation of OpenJDK. |
664 | 6 | It provides both JRE and JDK. | 6 | It provides both JRE and JDK. |
665 | 7 | <<<<<<< TREE | ||
666 | 7 | More information at http://www.azulsystems.com/products/zulu | 8 | More information at http://www.azulsystems.com/products/zulu |
667 | 8 | tags: [java] | 9 | tags: [java] |
668 | 9 | requires: | 10 | requires: |
669 | 10 | java: | 11 | java: |
670 | 11 | interface: java | 12 | interface: java |
671 | 12 | scope: container | 13 | scope: container |
672 | 14 | ======= | ||
673 | 15 | More information at http://www.azul.com/products/zulu | ||
674 | 16 | tags: [java] | ||
675 | 17 | requires: | ||
676 | 18 | java: | ||
677 | 19 | interface: java | ||
678 | 20 | scope: container | ||
679 | 21 | >>>>>>> MERGE-SOURCE | ||
680 | 13 | subordinate: true | 22 | subordinate: true |
681 | 14 | 23 | ||
682 | === added directory 'reactive' | |||
683 | === renamed directory 'reactive' => 'reactive.moved' | |||
684 | === added file 'reactive/__init__.py' | |||
685 | === added file 'reactive/install' | |||
686 | --- reactive/install 1970-01-01 00:00:00 +0000 | |||
687 | +++ reactive/install 2017-08-09 15:38:57 +0000 | |||
688 | @@ -0,0 +1,86 @@ | |||
689 | 1 | #!/bin/bash | ||
690 | 2 | set -e | ||
691 | 3 | |||
692 | 4 | source charms.reactive.sh | ||
693 | 5 | |||
694 | 6 | # Remove any previous mention of JAVA_HOME, then append the appropriate value | ||
695 | 7 | # based on the source of our /usr/bin/java symlink (if it exists). | ||
696 | 8 | function update_java_home() { | ||
697 | 9 | sed -i -e '/JAVA_HOME/d' /etc/environment | ||
698 | 10 | |||
699 | 11 | if [[ -L "/usr/bin/java" ]]; then | ||
700 | 12 | java_home=$(readlink -f /usr/bin/java | sed "s:/bin/java::") | ||
701 | 13 | echo "JAVA_HOME=${java_home}" >> /etc/environment | ||
702 | 14 | fi | ||
703 | 15 | } | ||
704 | 16 | |||
705 | 17 | @when 'java.connected' | ||
706 | 18 | @when_not 'java.installed' | ||
707 | 19 | function install() { | ||
708 | 20 | java_major=$(config-get 'java-major') | ||
709 | 21 | |||
710 | 22 | # Add Azul key and repo | ||
711 | 23 | apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0x219BD9C9 | ||
712 | 24 | apt-key list | grep -i azul && juju-log "Key added successfully" | ||
713 | 25 | apt-add-repository "deb http://repos.azulsystems.com/ubuntu stable main" | ||
714 | 26 | |||
715 | 27 | status-set maintenance "Installing Zulu ${java_major}" | ||
716 | 28 | juju-log "zulu8: installing zulu ${java_major}" | ||
717 | 29 | apt-get update -q | ||
718 | 30 | apt-get install -qqy zulu-${java_major} | ||
719 | 31 | update_java_home | ||
720 | 32 | |||
721 | 33 | # Send relation data | ||
722 | 34 | java_home=$(readlink -f /usr/bin/java | sed "s:/bin/java::") | ||
723 | 35 | java_version=$(java -version 2>&1 | grep -i version | head -1 | awk -F '"' {'print $2'}) | ||
724 | 36 | relation_call --state=java.connected set_ready $java_home $java_version | ||
725 | 37 | |||
726 | 38 | set_state 'java.installed' | ||
727 | 39 | status-set active "Zulu ${java_major} installed" | ||
728 | 40 | juju-log "zulu8: zulu ${java_major} installed" | ||
729 | 41 | } | ||
730 | 42 | |||
731 | 43 | @when 'java.connected' 'java.installed' | ||
732 | 44 | function check_version() { | ||
733 | 45 | java_major=$(config-get 'java-major') | ||
734 | 46 | java_major_installed=$(java -version 2>&1 | grep -i version | head -1 | awk -F '.' {'print $2'}) | ||
735 | 47 | |||
736 | 48 | # Install new major version if the user has set 'java-major' to something | ||
737 | 49 | # different than the version we have installed. | ||
738 | 50 | if [[ $java_major != $java_major_installed ]]; then | ||
739 | 51 | #Let's remove all available Zulu versions to avoid using java and langtools from different packets | ||
740 | 52 | status-set maintenance "Uninstalling all Zulu versions before installing new one" | ||
741 | 53 | juju-log "zulu8: uninstalling all zulu versions before installing new one" | ||
742 | 54 | apt-get remove --purge -qqy zulu* | ||
743 | 55 | |||
744 | 56 | #no need to add repo once again, so let's just install latest available package | ||
745 | 57 | status-set maintenance "Installing Zulu ${java_major}" | ||
746 | 58 | juju-log "zulu8: installing zulu ${java_major}" | ||
747 | 59 | apt-get install -qqy zulu-${java_major} | ||
748 | 60 | update_java_home | ||
749 | 61 | |||
750 | 62 | # Send relation data | ||
751 | 63 | java_home=$(readlink -f /usr/bin/java | sed "s:/bin/java::") | ||
752 | 64 | java_version=$(java -version 2>&1 | grep -i version | head -1 | awk -F '"' {'print $2'}) | ||
753 | 65 | relation_call --state=java.connected set_ready $java_home $java_version | ||
754 | 66 | |||
755 | 67 | status-set active "Zulu ${java_major} installed" | ||
756 | 68 | juju-log "zulu8: zulu ${java_major} installed" | ||
757 | 69 | fi | ||
758 | 70 | } | ||
759 | 71 | |||
760 | 72 | @when 'java.installed' | ||
761 | 73 | @when_not 'java.connected' | ||
762 | 74 | function uninstall() { | ||
763 | 75 | # Uninstall all versions of Zulu | ||
764 | 76 | status-set maintenance "Uninstalling all Zulu versions" | ||
765 | 77 | juju-log "zulu8: uninstalling all zulu versions" | ||
766 | 78 | apt-get remove --purge -qqy zulu* | ||
767 | 79 | update_java_home | ||
768 | 80 | |||
769 | 81 | remove_state 'java.installed' | ||
770 | 82 | status-set blocked "Zulu (all versions) uninstalled" | ||
771 | 83 | juju-log "zulu8: zulu (all versions) uninstalled" | ||
772 | 84 | } | ||
773 | 85 | |||
774 | 86 | reactive_handler_main | ||
775 | 0 | 87 | ||
776 | === added file 'requirements.txt' | |||
777 | --- requirements.txt 1970-01-01 00:00:00 +0000 | |||
778 | +++ requirements.txt 2017-08-09 15:38:57 +0000 | |||
779 | @@ -0,0 +1,2 @@ | |||
780 | 1 | flake8 | ||
781 | 2 | pytest | ||
782 | 0 | 3 | ||
783 | === renamed file 'requirements.txt' => 'requirements.txt.moved' | |||
784 | === added directory 'tests' | |||
785 | === renamed directory 'tests' => 'tests.moved' | |||
786 | === added file 'tests/01-deploy.py' | |||
787 | --- tests/01-deploy.py 1970-01-01 00:00:00 +0000 | |||
788 | +++ tests/01-deploy.py 2017-08-09 15:38:57 +0000 | |||
789 | @@ -0,0 +1,33 @@ | |||
790 | 1 | #!/usr/bin/env python3 | ||
791 | 2 | |||
792 | 3 | import unittest | ||
793 | 4 | import amulet | ||
794 | 5 | |||
795 | 6 | |||
796 | 7 | class TestDeploy(unittest.TestCase): | ||
797 | 8 | """ | ||
798 | 9 | Deployment test for the Zulu8 java charm. | ||
799 | 10 | |||
800 | 11 | This charm is subordinate and requires a principal that provides the | ||
801 | 12 | 'java' relation. Use ubuntu-devenv and ensure java -version works. | ||
802 | 13 | """ | ||
803 | 14 | |||
804 | 15 | @classmethod | ||
805 | 16 | def setUpClass(cls): | ||
806 | 17 | cls.d = amulet.Deployment(series='trusty') | ||
807 | 18 | cls.d.add('ubuntu-devenv', 'cs:~kwmonroe/trusty/ubuntu-devenv') | ||
808 | 19 | cls.d.add('zulu8', 'cs:trusty/zulu8') | ||
809 | 20 | cls.d.relate('ubuntu-devenv:java', 'zulu8:java') | ||
810 | 21 | cls.d.setup(timeout=900) | ||
811 | 22 | cls.d.sentry.wait(timeout=1800) | ||
812 | 23 | cls.unit = cls.d.sentry['ubuntu-devenv'][0] | ||
813 | 24 | |||
814 | 25 | def test_java(self): | ||
815 | 26 | cmd = "java -version 2>&1" | ||
816 | 27 | print("running {}".format(cmd)) | ||
817 | 28 | output, rc = self.unit.run(cmd) | ||
818 | 29 | print("output from cmd: {}".format(output)) | ||
819 | 30 | assert rc == 0, "Unexpected return code: {}".format(rc) | ||
820 | 31 | |||
821 | 32 | if __name__ == '__main__': | ||
822 | 33 | unittest.main() | ||
823 | 0 | 34 | ||
824 | === added file 'tests/tests.yaml' | |||
825 | --- tests/tests.yaml 1970-01-01 00:00:00 +0000 | |||
826 | +++ tests/tests.yaml 2017-08-09 15:38:57 +0000 | |||
827 | @@ -0,0 +1,2 @@ | |||
828 | 1 | packages: | ||
829 | 2 | - amulet | ||
830 | 0 | 3 | ||
831 | === added file 'tox.ini' | |||
832 | --- tox.ini 1970-01-01 00:00:00 +0000 | |||
833 | +++ tox.ini 2017-08-09 15:38:57 +0000 | |||
834 | @@ -0,0 +1,8 @@ | |||
835 | 1 | [tox] | ||
836 | 2 | skipsdist=True | ||
837 | 3 | envlist = py34 | ||
838 | 4 | |||
839 | 5 | [testenv] | ||
840 | 6 | commands = py.test -v | ||
841 | 7 | deps = | ||
842 | 8 | -r{toxinidir}/requirements.txt | ||
843 | 0 | 9 | ||
844 | === renamed file 'tox.ini' => 'tox.ini.moved' | |||
845 | === added directory 'wheelhouse' | |||
846 | === renamed directory 'wheelhouse' => 'wheelhouse.moved' | |||
847 | === added file 'wheelhouse/Jinja2-2.8-py2.py3-none-any.whl' | |||
848 | 1 | Binary files wheelhouse/Jinja2-2.8-py2.py3-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/Jinja2-2.8-py2.py3-none-any.whl 2017-08-09 15:38:57 +0000 differ | 10 | Binary files wheelhouse/Jinja2-2.8-py2.py3-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/Jinja2-2.8-py2.py3-none-any.whl 2017-08-09 15:38:57 +0000 differ |
849 | === added file 'wheelhouse/MarkupSafe-0.23-cp27-none-linux_x86_64.whl' | |||
850 | 2 | Binary files wheelhouse/MarkupSafe-0.23-cp27-none-linux_x86_64.whl 1970-01-01 00:00:00 +0000 and wheelhouse/MarkupSafe-0.23-cp27-none-linux_x86_64.whl 2017-08-09 15:38:57 +0000 differ | 11 | Binary files wheelhouse/MarkupSafe-0.23-cp27-none-linux_x86_64.whl 1970-01-01 00:00:00 +0000 and wheelhouse/MarkupSafe-0.23-cp27-none-linux_x86_64.whl 2017-08-09 15:38:57 +0000 differ |
851 | === added file 'wheelhouse/PyYAML-3.11-cp27-none-linux_x86_64.whl' | |||
852 | 3 | Binary files wheelhouse/PyYAML-3.11-cp27-none-linux_x86_64.whl 1970-01-01 00:00:00 +0000 and wheelhouse/PyYAML-3.11-cp27-none-linux_x86_64.whl 2017-08-09 15:38:57 +0000 differ | 12 | Binary files wheelhouse/PyYAML-3.11-cp27-none-linux_x86_64.whl 1970-01-01 00:00:00 +0000 and wheelhouse/PyYAML-3.11-cp27-none-linux_x86_64.whl 2017-08-09 15:38:57 +0000 differ |
853 | === added file 'wheelhouse/Tempita-0.5.2-py2-none-any.whl' | |||
854 | 4 | Binary files wheelhouse/Tempita-0.5.2-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/Tempita-0.5.2-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ | 13 | Binary files wheelhouse/Tempita-0.5.2-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/Tempita-0.5.2-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ |
855 | === added file 'wheelhouse/charmhelpers-0.6.0-py2-none-any.whl' | |||
856 | 5 | Binary files wheelhouse/charmhelpers-0.6.0-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/charmhelpers-0.6.0-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ | 14 | Binary files wheelhouse/charmhelpers-0.6.0-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/charmhelpers-0.6.0-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ |
857 | === added file 'wheelhouse/charms.reactive-0.3.6-py2-none-any.whl' | |||
858 | 6 | Binary files wheelhouse/charms.reactive-0.3.6-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/charms.reactive-0.3.6-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ | 15 | Binary files wheelhouse/charms.reactive-0.3.6-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/charms.reactive-0.3.6-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ |
859 | === added file 'wheelhouse/netaddr-0.7.18-py2-none-any.whl' | |||
860 | 7 | Binary files wheelhouse/netaddr-0.7.18-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/netaddr-0.7.18-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ | 16 | Binary files wheelhouse/netaddr-0.7.18-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/netaddr-0.7.18-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ |
861 | === added file 'wheelhouse/pip-7.1.2-py2.py3-none-any.whl' | |||
862 | 8 | Binary files wheelhouse/pip-7.1.2-py2.py3-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/pip-7.1.2-py2.py3-none-any.whl 2017-08-09 15:38:57 +0000 differ | 17 | Binary files wheelhouse/pip-7.1.2-py2.py3-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/pip-7.1.2-py2.py3-none-any.whl 2017-08-09 15:38:57 +0000 differ |
863 | === added file 'wheelhouse/pyaml-15.8.2-py2-none-any.whl' | |||
864 | 9 | Binary files wheelhouse/pyaml-15.8.2-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/pyaml-15.8.2-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ | 18 | Binary files wheelhouse/pyaml-15.8.2-py2-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/pyaml-15.8.2-py2-none-any.whl 2017-08-09 15:38:57 +0000 differ |
865 | === added file 'wheelhouse/six-1.10.0-py2.py3-none-any.whl' | |||
866 | 10 | Binary files wheelhouse/six-1.10.0-py2.py3-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/six-1.10.0-py2.py3-none-any.whl 2017-08-09 15:38:57 +0000 differ | 19 | Binary files wheelhouse/six-1.10.0-py2.py3-none-any.whl 1970-01-01 00:00:00 +0000 and wheelhouse/six-1.10.0-py2.py3-none-any.whl 2017-08-09 15:38:57 +0000 differ |