Merge lp:~ibmcharmers/charms/trusty/ibmwxs/devel into lp:~saran110/charms/trusty/ibmwxs/ibmwxs-fix
- Trusty Tahr (14.04)
- devel
- Merge into ibmwxs-fix
Proposed by
sharan
Status: | Needs review |
---|---|
Proposed branch: | lp:~ibmcharmers/charms/trusty/ibmwxs/devel |
Merge into: | lp:~saran110/charms/trusty/ibmwxs/ibmwxs-fix |
Diff against target: |
1069 lines (+987/-0) (has conflicts) 14 files modified
README.md (+131/-0) config.yaml (+74/-0) copyright (+14/-0) hooks/config-changed (+441/-0) hooks/install (+23/-0) hooks/quorum-relation-changed (+21/-0) hooks/quorum-relation-joined (+33/-0) hooks/start (+50/-0) hooks/stop (+25/-0) icon.svg (+40/-0) metadata.yaml (+11/-0) tests/00-setup (+28/-0) tests/10-bundles-test.py (+88/-0) tests/local.yaml (+8/-0) Conflict adding file README.md. Moved existing file to README.md.moved. Conflict adding file config.yaml. Moved existing file to config.yaml.moved. Conflict adding file copyright. Moved existing file to copyright.moved. Conflict adding file files. Moved existing file to files.moved. Conflict adding file hooks. Moved existing file to hooks.moved. Conflict adding file icon.svg. Moved existing file to icon.svg.moved. Conflict adding file metadata.yaml. Moved existing file to metadata.yaml.moved. Conflict adding file tests. Moved existing file to tests.moved. |
To merge this branch: | bzr merge lp:~ibmcharmers/charms/trusty/ibmwxs/devel |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
vsr | Pending | ||
Review via email: mp+276864@code.launchpad.net |
Commit message
Description of the change
Unmerged revisions
- 16. By <sharan><email address hidden>
-
Updated files
- 15. By <sharan><email address hidden>
-
Updated files for IBMWXS
- 14. By sharan
-
Updated README.md
- 13. By sharan
-
Initial Check for IBMWXS
- 12. By sharan
-
Initial Check for IBMWXS
- 11. By sharan
-
Initial Check for IBMWXS
- 10. By <email address hidden>
-
Initial Check up for IBMWXS
- 9. By sharan
-
Initial Checkup for IBMWXS
- 8. By sharan
-
Initial Check up for IBMWXS
- 7. By sharan
-
Initial Check for IBMWXS
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'README.md' |
2 | --- README.md 1970-01-01 00:00:00 +0000 |
3 | +++ README.md 2015-11-11 11:37:05 +0000 |
4 | @@ -0,0 +1,131 @@ |
5 | +Charm for IBM® WebSphere® eXtreme Scale V8.6.0.7 |
6 | + |
7 | +# Overview |
8 | +IBM® WebSphere® eXtreme Scale is an elastic, scalable, in-memory data grid (IMDG). It is designed to help you handle exponential growth of transactions. With WebSphere eXtreme Scale, you can expect an enhanced quality of service in high-performance computing environments. |
9 | + |
10 | +For details on IBM Websphere Extreme Scale please visit [WXS Product page][wxs-installation-step]. |
11 | +This charm installs IBM® WebSphere® eXtreme Scale V8.6.0.7 in standalone mode on amd64 architecture. |
12 | + |
13 | +# Usage |
14 | +Download your licensed IBM® WebSphere® eXtreme Scale software for Ubuntu and put up its contents on a web server like Apache and configure Apache to serve this package.This package can be then accessed using a URL from the web server. |
15 | + |
16 | +Download your licensed IBM Installation Manager software version 1.8 and above and upload to your apache repository |
17 | + |
18 | +Download your licensed IBM Websphere eXtreme Scale Base software 8.6.0 and upload to your apache repository |
19 | + |
20 | +Download your licensed IBM Websphere eXtreme Scale software fixpack version 8.6.0.7 version and upload to your apache repository |
21 | + |
22 | +# Creating the repositories in Apache |
23 | +Run steps below with admin access |
24 | + |
25 | +Install needed packages |
26 | + ```apt-get install dpkg-dev apache2``` |
27 | +Create a repository on Apache server under your Apache repository directory. |
28 | +Configure Apache server to allow access to the repository. |
29 | + |
30 | +To install IBM Websphere Extreme Scale you need to install IBM Installation Manager software as prerequisite. |
31 | +To install IBM Installation Manager you need to get the packages for ubuntu, for information about the software and builds please visit |
32 | +[IBM Installation Manager Steps][im-installation-step]. |
33 | + |
34 | +To install IBM products you must agree to the license. License information can be found [WXS Software license agreement][wxs-license]. |
35 | + |
36 | +To install Websphere Extreme Scale product you need to get the packages for ubuntu, please visit |
37 | +[WXS Installation Steps][wxs-installation-step]. |
38 | + |
39 | +Deploy charms as below: |
40 | +```juju deploy ibmwxs``` This will execute Websphere Extreme Scale software install prerequisite steps(it will install IBM Installation Manager) and install Websphere Extreme Scale product |
41 | + |
42 | +At this point the charm will wait until the user accepts the license. If you agree to the license for IBM Installation Manager and IBM Websphere Extreme Scale products, run the following commands: |
43 | + |
44 | +```juju set ibmwxs accept-ibm-im-license=True``` |
45 | + |
46 | +```juju set ibmwxs accept-ibm-wxs-license=True``` |
47 | + |
48 | +In case after installing the product if you set license to "False", Product will get uninstalled and to reinstall the product you need to accept the license first using ```juju set wxs accept-ibm-wxs-license=True``` command. |
49 | + |
50 | +If you need a relation between the WXS charm, add a unit on different container as |
51 | +```juju add-unit ibmwxs``` but adding a unit on the same container can not be done. |
52 | + |
53 | +# Configuration |
54 | + |
55 | +See config.yaml file for more information. |
56 | + |
57 | + `accept-ibm-wxs-license` |
58 | +Before you can use or install IBM Websphere Extreme Scale, |
59 | +you must accept the terms of International License |
60 | +Agreement for Non-Warranted Programs and additional license information. |
61 | +Please read the license agreement carefully. |
62 | + |
63 | +Set the value of accept-ibm-wxs-license to True if you agree to IBM Websphere Extreme Scale license. |
64 | + |
65 | +**The IBM Websphere Extreme Scale software cannot be installed until the terms and |
66 | +conditions are accepted. The charm will not function correctly until |
67 | +this configuration option is set to True.** |
68 | + |
69 | +`url`: |
70 | +The web server URL from which IBM IM, IBM WXS base and fixpack install packages can be downloaded. |
71 | + |
72 | +`im_file_name`: |
73 | +The IBM Installation Manager Package name. If not set, it is assigned the value "agent.installer.linux.gtk.x86_64_1.8.2000.20150303_1526.zip" for x86_64 based machine. |
74 | + |
75 | +`wxs_base_file_name`: |
76 | +The WXS Base Package name. If not set, it is assigned the value "WS_XSCALE_V8.6_MP_ML.zip" for x86_64 based machine. |
77 | + |
78 | +`wxs_fixpack_file_name`: |
79 | +The WXS Base Package name. If not set, it is assigned the value "8.6.0-WS-WXS-FP0000007.zip" for x86_64 based machine. |
80 | + |
81 | +`sha_im`: |
82 | +Checksum value to check integrity of IBM IM package. The Charm uses sha1sum to check the integrity. For example, run the command: |
83 | +<sha1sum agent.installer.linux.gtk.x86_64_1.8.2000.20150303_1526.zip | cut -d " " -f1> to get the checksum value for IBM Installation Manager package. If empty, it does not carry out the integrity check. The user should not change this value unless the corresponding installer package changes. |
84 | + |
85 | +`sha_base`: |
86 | +Checksum value to check integrity of IBM WXS base package. The Charm uses sha1sum to check the integrity. For example, run the command: <sha1sum WS_XSCALE_V8.6_MP_ML.zip | cut -d " " -f1> to get the checksum value for IBM WXS base package. If empty, it does not carry out the integrity check. The user should not change this value unless the corresponding installer package changes. |
87 | + |
88 | +`sha_fixpack`: |
89 | +Checksum value to check integrity of IBM WXS fixpack package. The Charm uses sha1sum to check the integrity. For example, run the command: <sha1sum 8.6.0-WS-WXS-FP0000007.zip | cut -d " " -f1> to get the checksum value for IBM WXS fixpack package. If empty, it does not carry out the integrity check. The user should not change this value unless the corresponding installer package changes. |
90 | + |
91 | +After deploying IBMWXS, to test whether the product is working or not, run the runclient.sh command which is present in /opt/ibm/WXS/ObjectGrid/gettingstarted/. Now run the script as below |
92 | + |
93 | +for insertion of the record |
94 | + |
95 | +./runclient.sh i key value |
96 | + |
97 | +to get the record |
98 | + |
99 | +./runclient.sh g key |
100 | + |
101 | +when you run the above script, you will get the corresponding value from the grid. |
102 | + |
103 | +IBM WXS Information |
104 | +------------------- |
105 | + |
106 | +(1) General Information |
107 | + |
108 | +Information on IBM WXS available at the [WXS Infocenter][product-page] |
109 | + |
110 | +(2) Download Information |
111 | + |
112 | +Information on procuring WXS product is available at the [Passport Advantage Site][passport-wxs] |
113 | + |
114 | +(3) Peer Relation Information |
115 | + |
116 | +Information on peer relation for catalogServer and containerServer at the [WXS Infocenter][wxs-relation] |
117 | + |
118 | +(4) Contact Information |
119 | + |
120 | +For issues with this charm, please contact IBM Juju Support Team <jujusupp@us.ibm.com> |
121 | + |
122 | + |
123 | +<!-- Links --> |
124 | + |
125 | +[product-page]: http://www-01.ibm.com/support/knowledgecenter/SSTVLU_8.6.0/com.ibm.websphere.extremescale.doc/kc_welcome-xs.html |
126 | + |
127 | +[passport-wxs]: http://www-01.ibm.com/software/passportadvantage/ |
128 | + |
129 | +[wxs-relation]: http://www-01.ibm.com/support/knowledgecenter/SSTVLU_8.6.0/com.ibm.websphere.extremescale.doc/cxscatservbp.html?lang=en |
130 | + |
131 | +[wxs-installation-step]: http://www.ibm.com/software/products/en/websphere-extreme-scale |
132 | + |
133 | +[im-installation-step]:http://www-01.ibm.com/support/docview.wss?uid=swg27025142 |
134 | + |
135 | +[wxs-license]: http://www-03.ibm.com/software/sla/sladb.nsf/lilookup/53D234CCEB5C2EC585257E3C0062B9F6?OpenDocument |
136 | |
137 | === renamed file 'README.md' => 'README.md.moved' |
138 | === added file 'config.yaml' |
139 | --- config.yaml 1970-01-01 00:00:00 +0000 |
140 | +++ config.yaml 2015-11-11 11:37:05 +0000 |
141 | @@ -0,0 +1,74 @@ |
142 | +options: |
143 | + url: |
144 | + type: string |
145 | + default: "" |
146 | + description: | |
147 | + URL to download IBM Websphere Extreme Scale packages. If not set or set |
148 | + incorrectly, the charm cannot install the IBM WXS software. |
149 | + wxs_base_file_name: |
150 | + type: string |
151 | + default: "" |
152 | + description: | |
153 | + Name of the WXS base package. If not set, the Charm uses a predefined |
154 | + package name for download from the url location. If the predefined |
155 | + package is not available at url location or if set incorrectly, |
156 | + the charm cannot install the IBM WXS software. |
157 | + wxs_fixpack_file_name: |
158 | + type: string |
159 | + default: "" |
160 | + description: | |
161 | + Name of the WXS fix pack package. If not set, the Charm uses a predefined |
162 | + package name for download from the url location. If the predefined |
163 | + package is not available at url location or if set incorrectly, |
164 | + the charm cannot install the IBM WXS software. |
165 | + im_file_name: |
166 | + type: string |
167 | + default: "" |
168 | + description: | |
169 | + Name of the IBM IM package. If not set, the Charm uses a predefined |
170 | + package name for download from the url location. If the predefined |
171 | + package is not available at url location or if set incorrectly, |
172 | + the charm cannot install the IBM IM software. |
173 | + accept-ibm-wxs-license: |
174 | + type: boolean |
175 | + default: False |
176 | + description: | |
177 | + The IBM Websphere Extreme Scale (WXS) software can only be used by |
178 | + accepting the terms and conditions for IBM Websphere Extreme Scale License. |
179 | + Setting this option to True |
180 | + indicates that you have read and accepted the IBM WXS terms and |
181 | + conditions found in the license file. The details about accessing |
182 | + the license(s) can be found in the README. |
183 | + Do not set this to False if a relation exists |
184 | + accept-ibm-im-license: |
185 | + type: boolean |
186 | + default: False |
187 | + description: | |
188 | + The IBM Installation Manager software comes with special terms and |
189 | + conditions from IBM. The Installation Manager software can only be used by |
190 | + accepting the license terms and conditions. |
191 | + sha_im: |
192 | + type: string |
193 | + default: "f35653e20c7925d43007a1cff83623c979109ac5" |
194 | + description: | |
195 | + Checksum value to check integrity of IBM IM pacakage. The Charm uses |
196 | + sha1sum to check the integrity. For example, run the command: |
197 | + <sha1sum agent.installer.linux.gtk.x86_64_1.8.2000.20150303_1526.zip | cut -d " " -f1> |
198 | + to get the checksum value for IBM Installation Manager pacakage. |
199 | + If empty, it does not carry out the integrity check. |
200 | + sha_base: |
201 | + type: string |
202 | + default: "801bb88913e90413a271b6102d67276a9129dcf3" |
203 | + description: | |
204 | + Checksum value to check integrity of IBM WXS base pacakage. The Charm uses |
205 | + sha1sum to check the integrity. For example, run the command: |
206 | + <sha1sum WS_XSCALE_V8.6_MP_ML.zip | cut -d " " -f1> to get the checksum value |
207 | + for IBM WXS base pacakage. If empty, it does not carry out the integrity check. |
208 | + sha_fixpack: |
209 | + type: string |
210 | + default: "6e99ec379ed99521a184fbe0086c9d16055a67db" |
211 | + description: | |
212 | + Checksum value to check integrity of IBM WXS fixpack pacakage. The Charm uses |
213 | + sha1sum to check the integrity. For example, run the command: |
214 | + <sha1sum 8.6.0-WS-WXS-FP0000007.zip | cut -d " " -f1> to get the checksum value |
215 | + for IBM WXS fixpack pacakage. If empty, it does not carry out the integrity check. |
216 | |
217 | === renamed file 'config.yaml' => 'config.yaml.moved' |
218 | === added file 'copyright' |
219 | --- copyright 1970-01-01 00:00:00 +0000 |
220 | +++ copyright 2015-11-11 11:37:05 +0000 |
221 | @@ -0,0 +1,14 @@ |
222 | +Copyright 2015 IBM Corporation |
223 | + |
224 | +This Charm is licensed under the Apache License, Version 2.0 (the "License"); |
225 | +you may not use this file except in compliance with the License. |
226 | +You may obtain a copy of the License at |
227 | + |
228 | + http://www.apache.org/licenses/LICENSE-2.0 |
229 | + |
230 | +Unless required by applicable law or agreed to in writing, software |
231 | +distributed under the License is distributed on an "AS IS" BASIS, |
232 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
233 | +See the License for the specific language governing permissions and |
234 | +limitations under the License. |
235 | + |
236 | |
237 | === renamed file 'copyright' => 'copyright.moved' |
238 | === added directory 'files' |
239 | === renamed directory 'files' => 'files.moved' |
240 | === added directory 'files/archives' |
241 | === added directory 'files/archives/IM' |
242 | === added directory 'hooks' |
243 | === renamed directory 'hooks' => 'hooks.moved' |
244 | === added file 'hooks/config-changed' |
245 | --- hooks/config-changed 1970-01-01 00:00:00 +0000 |
246 | +++ hooks/config-changed 2015-11-11 11:37:05 +0000 |
247 | @@ -0,0 +1,441 @@ |
248 | +#!/bin/bash |
249 | +# config-changed occurs everytime a new configuration value is updated (juju set) |
250 | + |
251 | +set -e |
252 | +IM_INSTALL_PATH=/opt/IBM/InstallationManager |
253 | +WXS_INSTALL_PATH=/opt/ibm/WXS |
254 | +ARCHIVE_DIR=$CHARM_DIR/files/archives |
255 | +# Check whether IM is installed |
256 | +is_im_installed() |
257 | +{ |
258 | + if [ -f $IM_INSTALL_PATH/eclipse/IBMIM ]; then |
259 | + echo "True" |
260 | + else |
261 | + echo "False" |
262 | + fi |
263 | +} |
264 | + |
265 | +#Remove IM, if installed |
266 | +remove_im_software() |
267 | +{ |
268 | + im_installed=`is_im_installed` |
269 | + if [ $im_installed == True ]; then |
270 | + #Uninstalling IM |
271 | + /root/var/ibm/InstallationManager/uninstall/uninstallc |
272 | + fi |
273 | +} |
274 | + |
275 | +stop_wxs_servers() |
276 | +{ |
277 | +if [ -d $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/ ]; then |
278 | + set +e |
279 | + ps -ef | grep "[c]ontainer" |
280 | + ipaddress=`unit-get private-address` |
281 | + if [ $? == 0 ]; then |
282 | + $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/stopcontainer.sh c1 |
283 | + if [ $? == 0 ]; then |
284 | + juju-log "containerServer stopped successfully" |
285 | + else |
286 | + juju-log "Error while stopping containerServer" |
287 | + exit 1 |
288 | + fi |
289 | + else |
290 | + juju-log "containerServer is not running" |
291 | + fi |
292 | + |
293 | + ps -ef | grep "[c]atalog" |
294 | + if [ $? == 0 ]; then |
295 | + $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/stopcat.sh |
296 | + if [ $? == 0 ]; then |
297 | + juju-log "catalogServer stopped successfully" |
298 | + else |
299 | + juju-log "Error while stopping catalogServer" |
300 | + exit 1 |
301 | + fi |
302 | + else |
303 | + juju-log "catalogServer is not running" |
304 | + fi |
305 | + set -e |
306 | +fi |
307 | +} |
308 | + |
309 | +is_wxs_installed() |
310 | +{ |
311 | + if [ -d $WXS_INSTALL_PATH ]; then |
312 | + echo "True" |
313 | + else |
314 | + echo "False" |
315 | + fi |
316 | +} |
317 | + |
318 | +#remove IBM IM if license not accepted |
319 | + |
320 | +remove_unaccepted_im_software() |
321 | +{ |
322 | + if [ $1 == False ]; then |
323 | + wxs_installed=`is_wxs_installed` |
324 | + if [ "$wxs_installed" == "True" ]; then |
325 | + juju-log "Can not uninstall IM as it has WXS product installed" |
326 | + exit 0 |
327 | + fi |
328 | + juju-log "Removing IBM IM (if installed) as the license agreement is not accepted." |
329 | + remove_im_software |
330 | + fi |
331 | +} |
332 | + |
333 | +# Remove Websphere Extreme Scale, if installed |
334 | +remove_wxs_software() |
335 | +{ |
336 | + im_installed=`is_im_installed` |
337 | + # Check IM package availability |
338 | + if [ $im_installed == False ]; then |
339 | + juju-log "IM is not present. Cannot proceed with WXS uninstall." |
340 | + exit 0 |
341 | + fi |
342 | + wxs_installed=`is_wxs_installed` |
343 | + if [ "$wxs_installed" == "True" ]; then |
344 | + juju-log "Stop WXS servers" |
345 | + stop_wxs_servers |
346 | + juju-log "Uninstall Websphere Extreme Scale" |
347 | + $IM_INSTALL_PATH/eclipse/tools/imcl uninstall com.ibm.websphere.WXS.v86 -acceptLicense -installationDirectory $WXS_INSTALL_PATH |
348 | + if [ "$?" != "0" ]; then |
349 | + juju-log "Websphere Extreme Scale could not be uninstalled" |
350 | + exit 1 |
351 | + fi |
352 | + rm -rf $WXS_INSTALL_PATH |
353 | + fi |
354 | + juju-log "Removing Websphere Extreme Scale software completed" |
355 | +} |
356 | +# Remove Websphere Extreme Scale if license not accpeted |
357 | +remove_unaccepted_software() |
358 | +{ |
359 | + if [ $1 == False ]; then |
360 | + juju-log "Remove IBM Websphere Extreme Scale (if installed) as the license agreement is not accepted." |
361 | + wxs_installed=`is_wxs_installed` |
362 | + if [ "$wxs_installed" == "True" ]; then |
363 | + remove_wxs_software |
364 | + fi |
365 | + fi |
366 | +} |
367 | + |
368 | +wxs_base_installable=`config-get wxs_base_file_name` |
369 | +wxs_fixpack_installable=`config-get wxs_fixpack_file_name` |
370 | +im_installable=`config-get im_file_name` |
371 | +URL=`config-get url` |
372 | +im_license_accepted=`config-get accept-ibm-im-license` |
373 | +wxs_license_accepted=`config-get accept-ibm-wxs-license` |
374 | +ARCHITECTURE=`uname -m` |
375 | +cfg_base_pkg_name="" |
376 | +cfg_fixpack_pkg_name="" |
377 | + |
378 | +#Download IM Package |
379 | +download_IM() |
380 | +{ |
381 | + juju-log "Checking for the IM and archive dir is $ARCHIVE_DIR and if[ -f $ARCHIVE_DIR/IM/*.zip]" |
382 | + #Exit if URL to download package is null |
383 | + if [ "$URL" == "" ]; then |
384 | + juju-log "IBM WXS: URL to download IBM IM package is not configured." |
385 | + exit 0 |
386 | + fi |
387 | + |
388 | + # If an install was done, get the name of the package from which it was done |
389 | + if [ -f $ARCHIVE_DIR/IM/*.zip ]; then |
390 | + impkg_name=`ls $ARCHIVE_DIR/IM/*.zip` |
391 | + |
392 | + if [ $? == 0 ]; then |
393 | + impkg_name=`basename $impkg_name` |
394 | + fi |
395 | + fi |
396 | + |
397 | + # Get the package name to check whether the user wants to install a different package |
398 | + cfg_im_pkg_name=`config-get im_file_name` |
399 | + |
400 | + # Set package name to a predefined value if the user has not provided a package name |
401 | + if [ "$cfg_im_pkg_name" == "" ]; then |
402 | + if [ "$ARCHITECTURE" == "x86_64" ]; then |
403 | + cfg_im_pkg_name="agent.installer.linux.gtk.x86_64_1.8.2000.20150303_1526.zip" |
404 | + else |
405 | + juju-log "IBM WXS: Platform not supported." |
406 | + exit 1 |
407 | + fi |
408 | + fi |
409 | + |
410 | + # The user has configured a different package name |
411 | + if [ "$impkg_name" != "$cfg_im_pkg_name" ]; then |
412 | + |
413 | + #Download the new IM package |
414 | + set +e |
415 | + juju-log "IBM WXS: Downloading IM package." |
416 | + wget -t 2 -P $ARCHIVE_DIR/IM $URL/$cfg_im_pkg_name |
417 | + |
418 | + if [ $? == 0 ]; then |
419 | + juju-log "IBM WXS: Downloaded IM package." |
420 | + # Delete previously downloaded and installed IM software |
421 | + if [ "$impkg_name" != "" ]; then |
422 | + juju-log "IBM WXS: Deleting the older IM package." |
423 | + rm -rf $ARCHIVE_DIR/IM/$impkg_name |
424 | + remove_unaccepted_im_software "False" |
425 | + fi |
426 | + |
427 | + else |
428 | + juju-log "IBM WXS: Download of IM package failed." |
429 | + juju-log "IBM WXS: Ensure the download URL and package name are correctly set in the charm configuration." |
430 | + exit 0 |
431 | + fi |
432 | + set -e |
433 | + |
434 | + fi |
435 | + |
436 | + # Check integrity of downloaded package |
437 | + SHA_IM=`config-get sha_im` |
438 | + if [ "$SHA_IM" == "" ]; then |
439 | + juju-log "IBM WXS: Please provide valid sha_im value for your package." |
440 | + exit 0 |
441 | + elif [ "$SHA_IM" != "`sha1sum $ARCHIVE_DIR/IM/$cfg_im_pkg_name | cut -d" " -f1`" ]; then |
442 | + juju-log "IBM WXS: IBM IM package is corrupt." |
443 | + exit 0 |
444 | + fi |
445 | +} |
446 | + |
447 | +# Downlaod WXS package |
448 | +download_WXS() |
449 | +{ |
450 | + #Exit if URL to download package is null |
451 | + if [ "$URL" == "" ]; then |
452 | + juju-log "IBM WXS: URL to download IBM WXS package is not configured." |
453 | + exit 0 |
454 | + fi |
455 | + |
456 | + # If an install was done, get the name of the base package from which it was done |
457 | + if [ -f $ARCHIVE_DIR/*V8.6*.zip ]; then |
458 | + base_pkg_name=`ls $ARCHIVE_DIR/*V8.6*.zip` |
459 | + if [ $? == 0 ]; then |
460 | + base_pkg_name=`basename $base_pkg_name` |
461 | + fi |
462 | + fi |
463 | + |
464 | + # If an install was done, get the name of the fixpack package from which it was done |
465 | + if [ -f $ARCHIVE_DIR/*FP*.zip ]; then |
466 | + fixpack_pkg_name=`ls $ARCHIVE_DIR/*FP*.zip` |
467 | + if [ $? == 0 ]; then |
468 | + fixpack_pkg_name=`basename $fixpack_pkg_name` |
469 | + fi |
470 | + fi |
471 | + |
472 | + # Get the package name to check whether the user wants to install a different package |
473 | + cfg_base_pkg_name=`config-get wxs_base_file_name` |
474 | + cfg_fixpack_pkg_name=`config-get wxs_fixpack_file_name` |
475 | + |
476 | + # Set base package name to a predefined value if the user has not provided a package name |
477 | + if [ "$cfg_base_pkg_name" == "" ]; then |
478 | + if [ "$ARCHITECTURE" == "x86_64" ]; then |
479 | + cfg_base_pkg_name="WS_XSCALE_V8.6_MP_ML.zip" |
480 | + else |
481 | + juju-log "IBM WXS: Platform not supported." |
482 | + exit 1 |
483 | + fi |
484 | + fi |
485 | + |
486 | + # Set fixpack package name to a predefined value if the user has not provided a package name |
487 | + if [ "$cfg_fixpack_pkg_name" == "" ]; then |
488 | + if [ "$ARCHITECTURE" == "x86_64" ]; then |
489 | + cfg_fixpack_pkg_name="8.6.0-WS-WXS-FP0000007.zip" |
490 | + else |
491 | + juju-log "IBM WXS: Platform not supported." |
492 | + exit 1 |
493 | + fi |
494 | + fi |
495 | + |
496 | + # The user has configured a different package name |
497 | + if [ "$base_pkg_name" != "$cfg_base_pkg_name" ]; then |
498 | + |
499 | + #Download the new WXS package |
500 | + set +e |
501 | + juju-log "IBM WXS: Download WXS Base package." |
502 | + |
503 | + wget -t 2 -P $ARCHIVE_DIR/ $URL/$cfg_base_pkg_name |
504 | + |
505 | + if [ $? == 0 ]; then |
506 | + # Delete previously downloaded and installed WXS software |
507 | + if [ "$base_pkg_name" != "" ]; then |
508 | + juju-log "IBM WXS: Deleting the older WXS package." |
509 | + rm $ARCHIVE_DIR/$base_pkg_name |
510 | + rm -rf $WXS_INSTALL_PATH |
511 | + fi |
512 | + else |
513 | + juju-log "IBM WXS: Download of WXS base package failed." |
514 | + exit 0 |
515 | + fi |
516 | + set -e |
517 | + fi |
518 | + |
519 | + # The user has configured a different package name |
520 | + if [ "$fixpack_pkg_name" != "$cfg_fixpack_pkg_name" ]; then |
521 | + |
522 | + #Download the new WXS package |
523 | + set +e |
524 | + juju-log "IBM WXS: Download WXS Fix Pack package." |
525 | + |
526 | + wget -t 2 -P $ARCHIVE_DIR/ $URL/$cfg_fixpack_pkg_name |
527 | + |
528 | + if [ $? == 0 ]; then |
529 | + # Delete previously downloaded and installed WXS software |
530 | + if [ "$fixpack_pkg_name" != "" ]; then |
531 | + juju-log "IBM WXS: Deleting the older WXS package." |
532 | + rm $ARCHIVE_DIR/$fixpack_pkg_name |
533 | + rm -rf $WXS_INSTALL_PATH |
534 | + fi |
535 | + else |
536 | + juju-log "IBM WXS: Download of WXS fixpack package failed." |
537 | + exit 0 |
538 | + fi |
539 | + set -e |
540 | + fi |
541 | + |
542 | + # Check integrity of downloaded packages |
543 | + SHA_BASE=`config-get sha_base` |
544 | + if [ "$SHA_BASE" == "" ]; then |
545 | + juju-log "IBM WXS: Please provide valid sha_base value for your package." |
546 | + exit 0 |
547 | + elif [ "$SHA_BASE" != "`sha1sum $ARCHIVE_DIR/$cfg_base_pkg_name | cut -d" " -f1`" ]; then |
548 | + juju-log "IBM WXS: IBM WXS Base package is corrupt." |
549 | + exit 0 |
550 | + fi |
551 | + SHA_FIXPACK=`config-get sha_fixpack` |
552 | + if [ "$SHA_FIXPACK" == "" ]; then |
553 | + juju-log "IBM WXS: Please provide valid sha_fixpack value for your package." |
554 | + exit 0 |
555 | + elif [ "$SHA_FIXPACK" != "`sha1sum $ARCHIVE_DIR/$cfg_fixpack_pkg_name | cut -d" " -f1`" ]; then |
556 | + juju-log "IBM WXS: IBM WXS Fix Pack package is corrupt." |
557 | + exit 0 |
558 | + fi |
559 | +} |
560 | + |
561 | +juju-log "IBM IM for WXS install: Begin config-changed" |
562 | +# Remove IM if license not accepted abase exit. Else install it |
563 | +remove_unaccepted_im_software $im_license_accepted |
564 | + |
565 | +if [ $im_license_accepted == False ]; then |
566 | + juju-log "IBM IM License not accepted." |
567 | +elif [ $im_license_accepted == True ]; then |
568 | + juju-log "IBM IM License accepted" |
569 | + im_inst=`is_im_installed` |
570 | + if [ $im_inst == False ]; then |
571 | + juju-log "Download and extract IM packages" |
572 | + download_IM |
573 | + #extract IM package if download succeeded |
574 | + if [ -f $ARCHIVE_DIR/IM/*.zip ]; then |
575 | + if [ -f $ARCHIVE_DIR/IM/userinstc ]; then |
576 | + juju-log "IBM WXS: IM binary package is already extracted" |
577 | + else |
578 | + juju-log "IBM WXS: Extracting IM binary package" |
579 | + unzip $ARCHIVE_DIR/IM/*.zip -d $ARCHIVE_DIR/IM |
580 | + if [ $? != 0 ]; then |
581 | + juju-log "IBM WXS: Unable to extract the IM package content. Verify whether the package is corrupt." |
582 | + #Remove corrupt archive file |
583 | + rm -rf $ARCHIVE_DIR/IM/*.zip |
584 | + exit 0 |
585 | + fi |
586 | + fi |
587 | + fi |
588 | + juju-log "IM installation started" |
589 | + # Check IM package availability |
590 | + if [ -f $ARCHIVE_DIR/IM/userinstc ]; then |
591 | + juju-log "IM Packages available for installation."; |
592 | + cp $ARCHIVE_DIR/IM/install.xml $ARCHIVE_DIR/IM/silent_install.xml |
593 | + sed -i "2 a \<profile kind='self' installLocation='$IM_INSTALL_PATH' id='IBM Installation Manager'>\n <data key='eclipseLocation' value='$IM_INSTALL_PATH' />\n</profile>" $ARCHIVE_DIR/IM/silent_install.xml |
594 | + $ARCHIVE_DIR/IM/userinstc -input $ARCHIVE_DIR/IM/silent_install.xml -acceptlicense |
595 | + if [ $? == 0 ]; then |
596 | + juju-log "IM is installed successfully" |
597 | + else |
598 | + juju-log "Error while installing IM" |
599 | + exit 1 |
600 | + fi |
601 | + else |
602 | + juju-log "IM Packages missing. Please check README file."; |
603 | + juju-log "Upgrade IM charm after adding the IM packages"; |
604 | + exit 1 |
605 | + fi |
606 | + fi |
607 | +else |
608 | + juju-log " Acceptable values for license are 'True' or 'False'" |
609 | +fi |
610 | + |
611 | +# Remove Websphere Extreme Scale if license not accepted and exit. Else install it |
612 | +remove_unaccepted_software $wxs_license_accepted |
613 | +if [ $wxs_license_accepted == False ]; then |
614 | + juju-log "IBM WXS: IBM WXS License not accepted." |
615 | +elif [ $wxs_license_accepted == True ]; then |
616 | + juju-log "IBM WXS: IBM WXS License accepted." |
617 | + |
618 | + wxs_inst=`is_wxs_installed` |
619 | + im_installed=`is_im_installed` |
620 | + if [ $wxs_inst == False ]; then |
621 | + # Check IM package availability |
622 | + if [ $im_installed == False ]; then |
623 | + juju-log "IM is not present. You should make sure that you accepted License for both IM and WXS" |
624 | + exit 0 |
625 | + fi |
626 | + download_WXS |
627 | + |
628 | + #extract WXS packages if download succeeded |
629 | + if [ -f $ARCHIVE_DIR/$cfg_base_pkg_name ]; then |
630 | + if [ -d $ARCHIVE_DIR/WXS_8600 ]; then |
631 | + juju-log "WXS base binary package is already extracted" |
632 | + else |
633 | + juju-log "IBM WXS: Extracting WXS base binary package" |
634 | + unzip $ARCHIVE_DIR/$cfg_base_pkg_name -d $ARCHIVE_DIR |
635 | + if [ $? != 0 ]; then |
636 | + juju-log "IBM WXS: Unable to extract the WXS package content. Verify whether the package is corrupt." |
637 | + #Remove corrupt archive file |
638 | + rm -rf $ARCHIVE_DIR/$cfg_base_pkg_name |
639 | + exit 0 |
640 | + fi |
641 | + fi |
642 | + fi |
643 | + |
644 | + if [ -f $ARCHIVE_DIR/$cfg_fixpack_pkg_name ]; then |
645 | + if [ -d $ARCHIVE_DIR/8607 ]; then |
646 | + juju-log "WXS fixpack binary package is already extracted" |
647 | + else |
648 | + juju-log "IBM WXS: Extracting WXS fixpack binary package" |
649 | + unzip $ARCHIVE_DIR/$cfg_fixpack_pkg_name -d $ARCHIVE_DIR |
650 | + if [ $? != 0 ]; then |
651 | + juju-log "IBM WXS: Unable to extract the WXS fixpack package content. Verify whether the package is corrupt." |
652 | + #Remove corrupt archive file |
653 | + rm -rf $ARCHIVE_DIR/$cfg_fixpack_pkg_name |
654 | + exit 0 |
655 | + fi |
656 | + fi |
657 | + fi |
658 | + |
659 | + juju-log "WXS Base Installation started" |
660 | + $IM_INSTALL_PATH/eclipse/tools/imcl install com.ibm.websphere.WXS.v86 -acceptLicense -installationDirectory $WXS_INSTALL_PATH -repositories $ARCHIVE_DIR/WXS_8600 |
661 | + if [ $? == 0 ]; then |
662 | + juju-log "WXS Base is installed successfully" |
663 | + else |
664 | + juju-log "Error while installing WXS Base" |
665 | + exit 1 |
666 | + fi |
667 | + |
668 | + juju-log "WXS Fix Pack Installation started" |
669 | + $IM_INSTALL_PATH/eclipse/tools/imcl install com.ibm.websphere.WXS.v86 -acceptLicense -installationDirectory $WXS_INSTALL_PATH -repositories $ARCHIVE_DIR |
670 | + if [ $? == 0 ]; then |
671 | + juju-log "WXS Fix Pack is installed successfully" |
672 | + else |
673 | + juju-log "Error while installing WXS Fix Pack" |
674 | + exit 1 |
675 | + fi |
676 | + fi |
677 | + |
678 | + set +e |
679 | + serverstareted=`ps -ef | grep "[c]atalog"` |
680 | + if [ -z "$serverstareted" ]; then |
681 | + $CHARM_DIR/hooks/start |
682 | + else |
683 | + juju-log "Server already started " |
684 | + fi |
685 | + set -e |
686 | +fi |
687 | + |
688 | +juju-log "Websphere WXS: End config-changed" |
689 | |
690 | === added file 'hooks/install' |
691 | --- hooks/install 1970-01-01 00:00:00 +0000 |
692 | +++ hooks/install 2015-11-11 11:37:05 +0000 |
693 | @@ -0,0 +1,23 @@ |
694 | +#!/bin/bash |
695 | + |
696 | +set -e |
697 | +juju-log "IBM WXS: Begin Install." |
698 | + |
699 | +# Install wget |
700 | +juju-log "IBM WXS: Download and install wget package" |
701 | +apt-get install -y wget |
702 | +juju-log "IBM WXS: wget downloaded and installed." |
703 | + |
704 | +private_address=`unit-get private-address` |
705 | +echo "$private_address `hostname`" >> /etc/hosts |
706 | +juju-log "IBM WXS: Download and install unzip package" |
707 | +apt-get install unzip |
708 | +juju-log "IBM WXS: unzip downloaded and installed." |
709 | + |
710 | +ARCHITECTURE=`uname -m` |
711 | +if [ "$ARCHITECTURE" != "x86_64" ]; then |
712 | + juju-log "IBM WXS: Unsupported platform. IBM WXS installed with this Charm supports only the x86_64 platform." |
713 | + exit 1 |
714 | +fi |
715 | + |
716 | +juju-log "IBM WXS: End Install." |
717 | |
718 | === added file 'hooks/quorum-relation-changed' |
719 | --- hooks/quorum-relation-changed 1970-01-01 00:00:00 +0000 |
720 | +++ hooks/quorum-relation-changed 2015-11-11 11:37:05 +0000 |
721 | @@ -0,0 +1,21 @@ |
722 | +#!/bin/bash |
723 | +set -e |
724 | +WXS_INSTALL_PATH=/opt/ibm/WXS |
725 | +juju-log "quorum-relation-changed started" |
726 | +catalogEndPoints=`relation-get catEndPoints` |
727 | + |
728 | +if [ $catalogEndPoints == "" ]; then |
729 | + exit 0 |
730 | +fi |
731 | + |
732 | +private_address=`unit-get private-address` |
733 | +set +e |
734 | +serverstareted=`ps -ef | grep "[c]atalog"` |
735 | +if [ -z "$serverstareted" ]; then |
736 | + juju-log "$private_address catalogServer is not started now starting" |
737 | + $WXS_INSTALL_PATH/ObjectGrid/bin/startXsServer.sh "$private_address-cs" -catalogServiceEndPoints $catalogEndPoints -quorum true -jvmArgs -Xmx256m |
738 | +else |
739 | + juju-log "$private_address catalogServer is already started" |
740 | +fi |
741 | +set -e |
742 | +juju-log "quorum-relation-changed stopped" |
743 | |
744 | === added file 'hooks/quorum-relation-joined' |
745 | --- hooks/quorum-relation-joined 1970-01-01 00:00:00 +0000 |
746 | +++ hooks/quorum-relation-joined 2015-11-11 11:37:05 +0000 |
747 | @@ -0,0 +1,33 @@ |
748 | +#!/bin/bash |
749 | +set -e |
750 | +WXS_INSTALL_PATH=/opt/ibm/WXS |
751 | +juju-log "quorum-relation-joined started" |
752 | +private_address=`unit-get private-address` |
753 | +catalogEndPoints="" |
754 | +relation_id=$(relation-ids quorum) |
755 | +clientPort="6601" |
756 | +listenerPort="2809" |
757 | +peerPort="6602" |
758 | +catEndPoints="" |
759 | + |
760 | +for relation_lis in $(relation-list); do |
761 | + ip_address=`relation-get -r $relation_id private-address $relation_lis` |
762 | + catalogEndPoints="$catalogEndPoints$ip_address-cs:$ip_address:$clientPort:$peerPort," |
763 | +done |
764 | + |
765 | +catalogEndPoints="$catalogEndPoints$private_address-cs:$private_address:$clientPort:$peerPort" |
766 | +set +e |
767 | +serverstareted=`ps -ef | grep "[c]atalog"` |
768 | + |
769 | +if [ -z "$serverstareted" ]; then |
770 | + juju-log "catalogServer not yet all started" |
771 | +else |
772 | + $WXS_INSTALL_PATH/ObjectGrid/bin/xscmd.sh -c teardown -sl "$private_address-cs" |
773 | + while [ "`sudo fuser -n tcp 2809`" != "" ]; do |
774 | + sudo fuser -n tcp -k 2809 |
775 | + done |
776 | +fi |
777 | + |
778 | +relation-set catEndPoints=$catalogEndPoints |
779 | +set -e |
780 | +juju-log "quorum-relation-joined ended" |
781 | |
782 | === added file 'hooks/start' |
783 | --- hooks/start 1970-01-01 00:00:00 +0000 |
784 | +++ hooks/start 2015-11-11 11:37:05 +0000 |
785 | @@ -0,0 +1,50 @@ |
786 | +#!/bin/bash |
787 | + |
788 | +set -e |
789 | +WXS_INSTALL_PATH=/opt/ibm/WXS |
790 | + |
791 | + |
792 | +if [ -d $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/ ]; then |
793 | + juju-log "Start catalog server" |
794 | + set +e |
795 | + serverstareted=`ps -ef | grep "[c]atalog"` |
796 | + if [ -z "$serverstareted" ]; then |
797 | + |
798 | + $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/startcat.sh |
799 | + if [ $? == 0 ]; then |
800 | + juju-log "catalogServer started successfully" |
801 | + else |
802 | + juju-log "Error while starting catalogServer" |
803 | + exit 1 |
804 | + fi |
805 | + |
806 | + juju-log "Start container server" |
807 | + $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/startcontainer.sh c1 |
808 | + if [ $? == 0 ]; then |
809 | + juju-log "containerServer started successfully" |
810 | + else |
811 | + juju-log "Error while starting containerServer" |
812 | + exit 1 |
813 | + fi |
814 | + |
815 | + $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/runclient.sh i key1 value1 |
816 | + if [ $? == 0 ]; then |
817 | + juju-log "Inserted TestValue [value=value1] with key TestKey [key=key1] successfully" |
818 | + else |
819 | + juju-log "Error while inserting TestValue [value=value1] with key TestKey [key=key1]" |
820 | + exit 1 |
821 | + fi |
822 | + |
823 | + $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/runclient.sh g key1 |
824 | + if [ $? == 0 ]; then |
825 | + juju-log "Value is TestValue [value=value1]" |
826 | + else |
827 | + juju-log "Error while retrieving TestValue" |
828 | + exit 1 |
829 | + fi |
830 | + else |
831 | + juju-log "Servers alrealdy started no need to start in start hook" |
832 | + fi |
833 | + set -e |
834 | +fi |
835 | +juju-log "IBM WXS: End Start hook." |
836 | |
837 | === added file 'hooks/stop' |
838 | --- hooks/stop 1970-01-01 00:00:00 +0000 |
839 | +++ hooks/stop 2015-11-11 11:37:05 +0000 |
840 | @@ -0,0 +1,25 @@ |
841 | +#!/bin/bash |
842 | +set -e |
843 | +WXS_INSTALL_PATH=/opt/ibm/WXS |
844 | +juju-log "IBM WXS: Begin Stop hook." |
845 | + |
846 | +if [ -d $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/ ]; then |
847 | + |
848 | + $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/stopcontainer.sh c1 |
849 | + if [ $? == 0 ]; then |
850 | + juju-log "containerServer stopped successfully" |
851 | + else |
852 | + juju-log "Error while stopping containerServer" |
853 | + exit 1 |
854 | + fi |
855 | + |
856 | + $WXS_INSTALL_PATH/ObjectGrid/gettingstarted/stopcat.sh |
857 | + if [ $? == 0 ]; then |
858 | + juju-log "catalogServer stopped successfully" |
859 | + else |
860 | + juju-log "Error while stopping catalogServer" |
861 | + exit 1 |
862 | + fi |
863 | +fi |
864 | + |
865 | +juju-log "IBM WXS: End Stop hook." |
866 | |
867 | === added file 'icon.svg' |
868 | --- icon.svg 1970-01-01 00:00:00 +0000 |
869 | +++ icon.svg 2015-11-11 11:37:05 +0000 |
870 | @@ -0,0 +1,40 @@ |
871 | +<?xml version="1.0" encoding="UTF-8"?> |
872 | +<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> |
873 | +<!-- Creator: CorelDRAW X6 --> |
874 | +<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="1in" height="0.999996in" version="1.1" shape-rendering="geometricPrecision" text-rendering="geometricPrecision" image-rendering="optimizeQuality" fill-rule="evenodd" clip-rule="evenodd" |
875 | +viewBox="0 0 1000 1000" |
876 | + xmlns:xlink="http://www.w3.org/1999/xlink"> |
877 | + <defs> |
878 | + <linearGradient id="id0" gradientUnits="userSpaceOnUse" x1="500.002" y1="999.996" x2="500.002" y2="0"> |
879 | + <stop offset="0" stop-color="#0465B2"/> |
880 | + <stop offset="1" stop-color="#7ED3F7"/> |
881 | + </linearGradient> |
882 | + <mask id="id1"> |
883 | + <linearGradient id="id2" gradientUnits="userSpaceOnUse" x1="500.002" y1="58.4805" x2="500.002" y2="307.017"> |
884 | + <stop offset="0" stop-opacity="1" stop-color="white"/> |
885 | + <stop offset="0.141176" stop-opacity="48.6863" stop-color="white"/> |
886 | + <stop offset="1" stop-opacity="0" stop-color="white"/> |
887 | + </linearGradient> |
888 | + <rect fill="url(#id2)" width="1000" height="365"/> |
889 | + </mask> |
890 | + <radialGradient id="id3" gradientUnits="userSpaceOnUse" cx="613.782" cy="372.832" r="261.194" fx="613.782" fy="372.832"> |
891 | + <stop offset="0" stop-color="#7ED3F7"/> |
892 | + <stop offset="1" stop-color="#0465B2"/> |
893 | + </radialGradient> |
894 | + <radialGradient id="id4" gradientUnits="userSpaceOnUse" cx="613.782" cy="372.832" r="261.194" fx="613.782" fy="372.832"> |
895 | + <stop offset="0" stop-color="#0465B2"/> |
896 | + <stop offset="1" stop-color="#07425A"/> |
897 | + </radialGradient> |
898 | + </defs> |
899 | + <g id="Layer_x0020_1"> |
900 | + <metadata id="CorelCorpID_0Corel-Layer"/> |
901 | + <g id="_927323728"> |
902 | + <path id="Background" fill="url(#id0)" d="M0 676l0 -352c0,-283 41,-324 324,-324l352 0c284,0 324,41 324,324l0 352c0,283 -40,324 -324,324l-352 0c-283,0 -324,-41 -324,-324z"/> |
903 | + <path fill="#999999" mask="url(#id1)" d="M0 365l0 -41c0,-283 41,-324 324,-324l352 0c284,0 324,41 324,324l0 41c0,-283 -40,-324 -324,-324l-352 0c-283,0 -324,41 -324,324z"/> |
904 | + <path fill="#7ED3F7" fill-rule="nonzero" d="M500 126c103,0 197,42 264,110 68,67 110,161 110,264 0,103 -42,197 -110,264 -67,68 -161,110 -264,110 -103,0 -197,-42 -264,-110 -68,-67 -110,-161 -110,-264 0,-103 42,-197 110,-264 67,-68 161,-110 264,-110zm237 137c-61,-60 -145,-98 -237,-98 -92,0 -176,38 -237,98 -60,61 -98,145 -98,237 0,92 38,176 98,237 61,60 145,98 237,98 92,0 176,-38 237,-98 60,-61 98,-145 98,-237 0,-92 -38,-176 -98,-237z"/> |
905 | + <circle fill="url(#id3)" cx="500" cy="500" r="335"/> |
906 | + <circle fill="url(#id4)" cx="500" cy="500" r="335"/> |
907 | + <polygon fill="#C9EFFF" fill-rule="nonzero" points="616,687 559,687 500,479 442,687 386,687 311,422 279,422 279,372 407,372 407,422 373,422 418,588 474,372 525,372 586,586 628,422 593,422 593,372 721,372 721,422 686,422 "/> |
908 | + </g> |
909 | + </g> |
910 | +</svg> |
911 | |
912 | === renamed file 'icon.svg' => 'icon.svg.moved' |
913 | === added file 'metadata.yaml' |
914 | --- metadata.yaml 1970-01-01 00:00:00 +0000 |
915 | +++ metadata.yaml 2015-11-11 11:37:05 +0000 |
916 | @@ -0,0 +1,11 @@ |
917 | +name: ibmwxs |
918 | +summary: IBM WebSphere Extreme Scale |
919 | +maintainer: IBM Juju Support Team <jujusupp@us.ibm.com> |
920 | +description: IBM® WebSphere® eXtreme Scale is an elastic, scalable, in-memory data grid (IMDG). It is designed to help you handle exponential growth of transactions. With WebSphere eXtreme Scale, you can expect an enhanced quality of service in high-performance computing environments. |
921 | +tags: |
922 | + - misc |
923 | + - IBM |
924 | +subordinate: false |
925 | +peers: |
926 | + quorum: |
927 | + interface: wxs-quorum |
928 | |
929 | === renamed file 'metadata.yaml' => 'metadata.yaml.moved' |
930 | === added directory 'tests' |
931 | === renamed directory 'tests' => 'tests.moved' |
932 | === added file 'tests/00-setup' |
933 | --- tests/00-setup 1970-01-01 00:00:00 +0000 |
934 | +++ tests/00-setup 2015-11-11 11:37:05 +0000 |
935 | @@ -0,0 +1,28 @@ |
936 | +#!/bin/bash |
937 | + |
938 | +# ATTENTION: wxs_url must contain the repository with |
939 | +# your WXS packages |
940 | + |
941 | +WXS_URL=${WXS_URL?Error: IBM WXS repository must be defined in tests/00-setup} |
942 | +WXS_BASE_PKG=${WXS_BASE_PKG?Error: IBM WXS base package be defined in tests/00-setup} |
943 | +WXS_FIX_PKG=${WXS_FIX_PKG?Error: IBM WXS fix package be defined in tests/00-setup} |
944 | +IM_NAME=${IM_NAME?Error: IBM IM file name to be defined in tests/00-setup} |
945 | +SHA_BASE_PKG=${SHA_BASE_PKG?Error: IBM WXS sha base package be defined in tests/00-setup} |
946 | +SHA_FIX_PKG=${SHA_FIX_PKG?Error: IBM WXS sha fixpack package be defined in tests/00-setup} |
947 | +SHA_IM_PKG=${SHA_IM_PKG?Error: IBM WXS sha IM package be defined in tests/00-setup} |
948 | + |
949 | +# Add a local configuration file |
950 | +cat << EOF > local.yaml |
951 | +wxs: |
952 | + wxs_url: "$WXS_URL" |
953 | + wxs_base_package: "$WXS_BASE_PKG" |
954 | + wxs_fix_pkg: "$WXS_FIX_PKG" |
955 | + im_name: "$IM_NAME" |
956 | + sha_base_pkg: "$SHA_BASE_PKG" |
957 | + sha_fix_pkg: "$SHA_FIX_PKG" |
958 | + sha_im_pkg: "$SHA_IM_PKG" |
959 | +EOF |
960 | + |
961 | +add-apt-repository ppa:juju/stable -y |
962 | +apt-get update |
963 | +apt-get install amulet -y |
964 | |
965 | === added file 'tests/10-bundles-test.py' |
966 | --- tests/10-bundles-test.py 1970-01-01 00:00:00 +0000 |
967 | +++ tests/10-bundles-test.py 2015-11-11 11:37:05 +0000 |
968 | @@ -0,0 +1,88 @@ |
969 | +#!/usr/bin/env python3 |
970 | + |
971 | +# This amulet test deploys the bundles.yaml file in this directory. |
972 | + |
973 | +import os |
974 | +import unittest |
975 | +import yaml |
976 | +import amulet |
977 | +import sys |
978 | +#import urllib |
979 | + |
980 | +# Lots of prereqs on this charm (eg: java), so give it a large timeout |
981 | +seconds_to_wait = 1000 |
982 | + |
983 | + |
984 | +class BundleTest(unittest.TestCase): |
985 | + """ Create a class for testing the charm in the unit test framework. """ |
986 | + @classmethod |
987 | + def setUpClass(cls): |
988 | + """ Set up an amulet deployment using the bundle. """ |
989 | + d = amulet.Deployment(series='trusty') |
990 | + # We have a contextual test, if no config is present, initialze the |
991 | + # test with an empty configuration set |
992 | + config = {} |
993 | + local_path = os.path.join(os.path.dirname(__file__), 'local.yaml') |
994 | + with open(local_path, "r") as fd: |
995 | + config = yaml.safe_load(fd) |
996 | + |
997 | + url = config.get('wxs').get('wxs_url') |
998 | + print('Using URL %s' % url) |
999 | + # Test if a WXS url for the repository is defined |
1000 | + if not url: |
1001 | + print("You need to define a url for the IBMWXS packages repository.\n" |
1002 | + "Edit local.yaml or tests/00-setup and run it again.") |
1003 | + sys.exit(1) |
1004 | + |
1005 | + basepkg = config.get('wxs').get('wxs_base_package') |
1006 | + print('Using IBMWXS base package %s' % basepkg) |
1007 | + if not basepkg: |
1008 | + print("You need to define a base package name for IBM WXS.\n" |
1009 | + "Edit local.yaml or tests/00-setup and run it again.") |
1010 | + sys.exit(1) |
1011 | + |
1012 | + fixpkg = config.get('wxs').get('wxs_fix_pkg') |
1013 | + print('Using IBMWXS fix package %s' % fixpkg) |
1014 | + if not fixpkg: |
1015 | + print("You need to define a fix package name for IBM WXS.\n" |
1016 | + "Edit local.yaml or tests/00-setup and run it again.") |
1017 | + sys.exit(1) |
1018 | + |
1019 | + imname = config.get('wxs').get('im_name') |
1020 | + print('Using IBMWXS IM package %s' % imname) |
1021 | + if not imname: |
1022 | + print("You need to define a IM package name for IBM WXS.\n" |
1023 | + "Edit local.yaml or tests/00-setup and run it again.") |
1024 | + sys.exit(1) |
1025 | + sha_base_pkg = config.get('wxs').get('sha_base_pkg') |
1026 | + print('Using IBMWXS sha base package %s' % sha_base_pkg) |
1027 | + if not sha_base_pkg: |
1028 | + print("You need to define a SHA Base package for IBM WXS.\n" |
1029 | + "Edit local.yaml or tests/00-setup and run it again.") |
1030 | + sys.exit(1) |
1031 | + sha_fix_pkg = config.get('wxs').get('sha_fix_pkg') |
1032 | + print('Using IBMWXS sha fix package %s' % sha_fix_pkg) |
1033 | + if not sha_fix_pkg: |
1034 | + print("You need to define a SHA FIX package for IBM WXS.\n" |
1035 | + "Edit local.yaml or tests/00-setup and run it again.") |
1036 | + sys.exit(1) |
1037 | + sha_im_pkg = config.get('wxs').get('sha_im_pkg') |
1038 | + print('Using IBMWXS sha IM package %s' % sha_im_pkg) |
1039 | + if not sha_im_pkg: |
1040 | + print("You need to define a SHA IM package for IBM WXS.\n" |
1041 | + "Edit local.yaml or tests/00-setup and run it again.") |
1042 | + sys.exit(1) |
1043 | + # Software doesn't actually install until you accept the license |
1044 | + d.add('wxs') |
1045 | + d.configure('wxs', { 'accept-ibm-wxs-license': True, 'accept-ibm-im-license':True , 'wxs_url': url, 'wxs_base_package' : basepkg, 'wxs_fix_pkg':fixpkg, 'im_name':imname, 'sha_base_pkg':sha_base_pkg, 'sha_fix_pkg':sha_fix_pkg, 'sha_im_pkg':sha_im_pkg }) |
1046 | + |
1047 | + d.setup(seconds_to_wait) |
1048 | + d.sentry.wait(seconds_to_wait) |
1049 | + cls.d = d |
1050 | + |
1051 | + def test_deployed(self): |
1052 | + """ Test to see if the bundle deployed successfully. """ |
1053 | + self.assertTrue(self.d.deployed) |
1054 | + |
1055 | +if __name__ == '__main__': |
1056 | + unittest.main() |
1057 | |
1058 | === added file 'tests/local.yaml' |
1059 | --- tests/local.yaml 1970-01-01 00:00:00 +0000 |
1060 | +++ tests/local.yaml 2015-11-11 11:37:05 +0000 |
1061 | @@ -0,0 +1,8 @@ |
1062 | +wxs: |
1063 | + wxs_url: "http://9.124.100.99/debs/WXS/" |
1064 | + wxs_base_package: "WS_XSCALE_V8.6_MP_ML.zip" |
1065 | + wxs_fix_pkg: "8.6.0-WS-WXS-FP0000007.zip" |
1066 | + im_name: "agent.installer.linux.gtk.x86_64_1.8.2000.20150303_1526.zip" |
1067 | + sha_base_pkg: "801bb88913e90413a271b6102d67276a9129dcf3" |
1068 | + sha_fix_pkg: "6e99ec379ed99521a184fbe0086c9d16055a67db" |
1069 | + sha_im_pkg: "f35653e20c7925d43007a1cff83623c979109ac5" |