Merge lp:~sradhara/charms/trusty/mobilefirst-server/mobilefirst-serverfix into lp:~ibmcharmers/charms/trusty/mobilefirst-server/devel

Proposed by sunitha
Status: Merged
Approved by: vsr
Approved revision: 38
Merged at revision: 39
Proposed branch: lp:~sradhara/charms/trusty/mobilefirst-server/mobilefirst-serverfix
Merge into: lp:~ibmcharmers/charms/trusty/mobilefirst-server/devel
Diff against target: 956 lines (+327/-250)
13 files modified
README.md (+183/-147)
config.yaml (+8/-3)
files/archives/install-MFS-responsefile.xml (+4/-4)
files/archives/uninstall-worklight-responsefile.xml (+2/-2)
hooks/config-changed (+3/-1)
hooks/db-relation-changed (+26/-23)
hooks/db-relation-departed (+16/-8)
hooks/stop (+22/-14)
hooks/website-relation-changed (+51/-46)
metadata.yaml (+2/-0)
tests/00-setup (+3/-0)
tests/10-deploy.py (+4/-1)
tests/local.yaml (+3/-1)
To merge this branch: bzr merge lp:~sradhara/charms/trusty/mobilefirst-server/mobilefirst-serverfix
Reviewer Review Type Date Requested Status
vsr Approve
Review via email: mp+265948@code.launchpad.net
To post a comment you must log in.
Revision history for this message
vsr (vsasi) :
review: Approve
39. By sunitha

mobilefirst-server charm code checkin

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'README.md'
2--- README.md 2015-07-23 09:25:57 +0000
3+++ README.md 2015-10-09 16:12:21 +0000
4@@ -2,161 +2,195 @@
5
6 Overview
7 --------
8-
9- IBM MobileFirst Server 7.0
10-
11- IBM MobileFirst Server is the middleware tier that provides a gateway between back-end systems and services and the mobile client applications.
12- The server enables application authentication, data endpoints/services, data optimization and transformation, push notification management.
13-
14- This charm installs IBM Installation Manager and IBM MoobileFirst Server product.
15-
16-
17- IBM Installation Manager
18-
19- IBM Installation Manager is a tool that you can use to install and maintain your IBM software packages.
20+This charm installs IBM Installation Manager and IBM MobileFirst Server products.
21+
22+IBM MobileFirst Server 7.0
23+
24+IBM MobileFirst Server is the middleware tier that provides a gateway between back-end systems and services and the mobile client applications.
25+The server enables application authentication, data endpoints/services, data optimization and transformation, push notification management.
26+
27+For details on IBM MobileFirst Server, as well as information on purchasing the product,
28+please visit: [Product Page] [mfs-product-page] and [IBM Knowledge Center] [mfs-v7-info]
29+
30+
31+IBM Installation Manager
32+
33+IBM Installation Manager is a tool that you can use to install and maintain your IBM software packages.
34+
35+For details on IBM Installation Manager, as well as information on purchasing the product,
36+please visit: [IMProduct Info] [im-product-page] and [IBM Knowledge Center] [im-v1.7-info]
37+
38+For Ubuntu(Power and x86_64), IBM MobileFirst Server package and part numbers is:
39+
40+ IBM MobileFirst Server 7.0 Installer (CN4V2EN)
41+
42
43 Usage
44 -------
45-
46- To install IBM MobileFirst Server you need to install IBM Installation Manager software as prerequisite.
47- To install IBM Installation Manager and MobileFirst Server packeges for Ubuntu and put up it's contents on a web server like Apache and configure Apache to serve thi s package.
48- These package can be then be accessed using a URL from the web server.
49-
50- To create repositories in Apache run steps below with admin access
51-
52- Install needed packages using below command
53- apt-get install dpkg-dev apache2
54-
55- Create a repository on Apache server under your Apache repository directory.
56- Configure Apache server to allow access to the repository.
57-
58- To install the downloaded binaries for IBM Installtion Manager you must agree to the IBM license. The license file(s) can be found under the `files/archives/licenses` directory on extraction of IBM IM software using the following command.
59-
60- tar xvfz *.gz --strip-components=1
61- License can be viewed under the `files/archives/IM/license` directory.
62-
63- To install the downloaded binaries for IBM MobileFirst Server you must agree to the IBM license. The license file(s) can be found in below link.
64-
65- (http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?la_formnum=&li_formnum=L-BVID-9TCPPM&title=IBM%20MobileFirst%20Platform%20Foundation%20V7.0%20zip%20of%20Installation%20Manager%20Repository%20for%20IBM%20MobileFirst%20Server%20Multiplatform%20English)
66-
67- Database management system and an application server are required as prerequisites and must be installed before you start the MobileFirst Server installer.
68- This charm uses Database management system as "IBM DB2" and application server as "websphere-liberty", so Deploy IBM DB2 and websphere-liberty charms before you deploy MobileFisrt Server on same machine.
69-
70-
71- First we need to add a juju machine using below command to deploy IBM-DB2, websphere-liberty and MobileFirst Server charms.
72- juju add-machine #This command will create new juju machine.
73-
74- Deploy charms as below:
75- juju deploy --to <machine number> websphere-liberty
76- juju deploy --to <machine number> db2
77- juju deploy --to <machine number> mobilefirst-server
78-
79- 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 MobileFirst server products, run the following commands:
80-
81- juju set mobilefirst-server accept-ibm-im-license=True
82- juju set mobilefirst-server accept-ibm-mobilefirstserver-license=True
83-
84- After deploying 3 charms run the relation commands as below
85-
86- 1)setup a relation between IBM DB2 and IBM MobileFirst Server:
87- juju add-relation db2 mobilefirst-server
88- At this point it will create a 'APPCNTR' database, with out this database MobileFirst Server will not be installed.
89-
90- 2)setup a relation between IBM Websphere-liberty and IBM MobileFirst Server:
91- juju add-relation websphere-liberty mobilefirst-server
92- At this point it will install MobileFirst Server software.
93-
94-
95- After installing IBM MobileFirst server software open appcenter/worklight consoles as below
96-
97- https://<public IP>:9443/worklightconsole
98- http://<public IP>:9081/worklightconsole
99- https://<public IP>:9443/appcenterconsole
100- http://<public IP>:9081/appcenterconsole
101-
102-
103- In case after installing the software, If you set license to "False" mobilefirst server will get uninstalled and to reinstall it you need to accept the license first using "juju set mobilefirst-server accept-ibm-mobilefirstserver-license=True" command and run below relation command to reinstall the product.
104-
105- juju add-relation websphere-liberty mobilefirst-server
106-
107- (Note: you need to remove the relation using "juju remove-relation websphere-liberty mobilefirst-server" command,if any relation exists between these )
108-
109- To remove a relation between db2 and mobilefirst-server run below command.
110- juju remove-relation db2 mobilefirst-server
111- At this point it will remove ''APPCNTR' database.
112-
113- To remove the relation between websphere-liberty and mobilefirst-server run below command
114- juju remove-relation websphere-liberty mobilefirst-server
115-
116+Download packages for IBM MobileFirst Server and IBM Installation Manager for Linux and upload it to your apache
117+repository. To download and install the code contained in this charm you must agree to the IBM license.
118+
119+IBM Installation Manager license file(s) can be found under the `files/archives/licenses` directory on extraction of IBM IM software using the following command.
120+
121+To view IBM MobileFirst Server license file(s), please visit: [mfsproduct LicenseInfo] [license-page]
122+
123+
124+# Creating the repositories in Apache
125+Run below steps with admin access
126+
127+Install the required packages
128+ apt-get install dpkg-dev apache2
129+
130+Create a repository on Apache server under your Apache repository directory.
131+
132+ cd <apache-repository-directory>
133+ mkdir mobilefirst-server
134+
135+Place the downloaded IBM MobileFirst Server and IBM Installation Manager packages in the above directory and Configure Apache server to allow access to the repository.
136+
137+Configure config.yaml with the repository url
138+
139+ Example : `mobilefirstserver_url: "http://<server-name>/<REPOSITORY_DIR>/mobilefirst-server"`
140+
141+ Verify repository is set correctly otherwise charm might throw errors.
142+
143+
144+Deploy
145+------
146+
147+The MobileFirst Server charm has to be deployed to a container that has the IBM WebSphere Liberty software installed.
148+
149+Deploy the IBM DB2 charm and IBM WebSphere Liberty charm then this MobileFirst Server charm.
150+
151+IBM DB2 charm can be deployed in the same container where your WebSphere liberty and MobileFirst Server charm deployed or it can be deployed in different container.
152+
153+Steps to deploy mobilefirst-server charm, If you use remote db.
154+
155+ - juju deploy mobilefirst-server --to <machine-id1>
156+ At this point IBM MobileFirst Server and IBM Installation Manager install
157+ will wait for you to accept the License.
158+ To install the downloaded binaries you must agree to the IBM license.
159+
160+If the URL and package is configured in the config.yaml:
161+
162+ juju set mobilefirst-server accept-ibm-im-license=True
163+ juju set mobilefirst-server accept-ibm-mobilefirstserver-license=True
164+
165+If not,
166+
167+ juju set mobilefirst-server accept-ibm-im-license=True mobilefirstserver_url=<repository URL> im_package_name=<Installation package name> sha_im=<sha sum of the IM package>
168+ juju set mobilefirst-server accept-ibm-mobilefirstserver-license=True mobilefirstserver_url=<repository URL> mobilefirstserver_package_name=<Installation package name> sha_im=<sha sum of the mobilefirst server package>
169+
170+ - juju deploy websphere-liberty --to <machine-id1>
171+ Please go through the websphere-liberty README file to deploy
172+ websphere-liberty charm.
173+
174+ - juju deploy db2 --to <machine-id2>
175+ Please go through the db2 README file to deploy the db2 charm.
176+
177+ - juju deploy mfs-helper --to <machine-id2>
178+ Please go through the mfs-helper README file to deploy the mfs-helper charm.
179+
180+Now add relations between these charms:
181+
182+ 1. juju add-relation mfs-helper mobilefirst-server
183+ Please go through the websphere-liberty README file to deploy
184+ websphere-liberty charm.
185+
186+ 2. juju add-relation db2 mobilefirst-server
187+
188+ 3. juju add-relation websphere-liberty mobilefirst-server
189+ At this point it will install mobilefirst server software.
190+
191+
192+Steps to deploy mobilefirst sever charm, If you use local db.
193+
194+ juju deploy mobilefirst-server --to <machine-id1>
195+ juju deploy db2 --to <machine-id1>
196+ juju deploy websphere-liberty --to <machine-id1>
197+
198+Now add relations between these charms:
199+
200+ 1. juju add-relation db2 mobilefirst-server
201+ 2. juju add-relation websphere-liberty mobilefirst-server
202+
203+
204+After installing IBM MobileFirst server software open appcenter/worklight consoles as below
205+
206+ `https://<public IP>:9443/worklightconsole`
207+ `http://<public IP>:9081/worklightconsole`
208+ To login worklightconsole use admin/admin as id/password.
209+
210+ `https://<public IP>:9443/appcenterconsole`
211+ `http://<public IP>:9081/appcenterconsole`
212+ To login appcenterconsole use appcenteradmin/admin as id/password.
213
214
215 Configuration
216---------------
217- `MobileFirstServer_url`
218- URL where lies the repository packages for IBM MobileFirst Server and IBM InstallationManager.
219-
220-
221- `accept-ibm-mobilefirstserver-license`
222- Before you can use or install IBM MobileFirst Server,you must accept the terms of International License agreement for Non-Warranted Programs and additional license information.Please read the license agreement carefully.
223-
224- IBM MobileFirst Server license file(s) can be found in below link.
225-
226- (http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?la_formnum=&li_formnum=L-BVID-9TCPPM&title=IBM%20MobileFirst%20Platform%20Foundation%20V7.0%20zip%20of%20Installation%20Manager%20Repository%20for%20IBM%20MobileFirst%20Server%20Multiplatform%20English)
227-
228- Set the value of accept-ibm-mobilefirstserver-license to True if you agree to IBM MobileFirst Server license.
229- **The IBM MobileFirst Server software cannot be installed until the terms and conditions are accepted. The charm will not function correctly until this configuration option is set to True.**
230-
231-
232-
233- `accept-ibm-im-license`
234- Before you can use or install IBM Installation Manager,you must accept the terms of International License agreement for Non-Warranted Programs and additional license information.Please read the license agreement carefully.
235-
236- IBM Installation Manager license file(s) can be found in `files/archives//IM/license` directory.
237-
238- Set the value of accept-ibm-im-license to True if you agree to IBM Installation Manager license.
239- **The IBM Installation Manager Server software cannot be installed until the terms and conditions are accepted.The charm will not function correctly until this configuration option is set to True.**
240-
241-
242- `mobilefirstserver_package_name`
243- MobileFirst Server package name.If its not set,It will take assigned package "MFPF_7.0_INST_MGR_REP_MF_SVR_EN.zip".
244-
245-
246- `im_package_name'
247- IBM Installation Manager package name.If its not set,It will take assigned package for x86_64 "agent.installer.linux.gtk.x86_64_1.7.1000.20131119_2219.zip" and for ppc64le "agent.installer.linux.gtk.ppc64le_1.8.1000.20141126_2002.zip"
248-
249-
250- `sha_im`
251- Checksum value to check integrity of IBM Installation Manager package.The Charm uses sha1sum to check the integrity. If empty, it does not carry out the integrity check.
252-
253-
254- `sha_mfs`
255- Checksum value to check integrity of IBM MobileFirst Server package.The Charm uses sha1sum to check the integrity.If empty, it does not carry out the integrity check.
256-
257- Use sha1sum command as below to find out Checksum value for downloaded package.
258- `sha1sum <Package Location/Package Name> | cut -d" " -f1`
259-
260-
261+-------------
262+See config.yaml file for more information.
263+
264+`MobileFirstServer_url`
265+
266+URL to download IBM MobileFirst Server and IBM Installation Manager packages.
267+
268+`accept-ibm-mobilefirstserver-license`
269+
270+The IBM MobileFirst Server software can only be used by accepting the terms and conditions for IBM
271+MobileFirst Server License. Setting this option to True indicates that you have read and accepted the
272+IBM MobileFirst Server terms and conditions found in the license file.
273+
274+`mobilefirstserver_package_name`
275+
276+IBM MobileFirst Server package name.
277+
278+`im_package_name`
279+
280+IBM Installation Manager package name.
281+
282+`accept-ibm-im-license`
283+
284+The IBM Installation Manager software can only be used by accepting the terms and conditions for IBM
285+Installation Manager License. Setting this option to True indicates that you have read and accepted the
286+IBM Installation Manager terms and conditions found in the license file.
287+
288+`sha_im`
289+
290+Checksum value to check integrity of IBM Installation Manager package. The Charm uses
291+sha1sum to check the integrity. If empty, it does not carry out the integrity check.
292+The command to find the checksum is : sha1sum <Package Name> | cut -d" " -f1
293+
294+`sha_mfs`
295+
296+Checksum value to check integrity of IBM MobileFirst Server package. The Charm uses
297+sha1sum to check the integrity. If empty, it does not carry out the integrity check.
298+The command to find the checksum is : sha1sum <Package Name> | cut -d" " -f1
299+
300+`liberty-install-path`
301+
302+IBM WebSphere Liberty install path.
303+
304+
305 IBM Installation Manager(IM) Information
306 -----------------------------------------
307-
308- Details about IM available [here][im-info].
309-
310- Details about IM Version 1.7 available at [IBM Knowledge Center][im-v1.7-info].
311-
312- ### (2) Download Information
313-
314- Information on procuring IM product is available at the [Product Page][im-product-page]
315- and at the [Passport Advantage Site][passport].
316+(1) General Information
317+Details about IM available [here][im-info].
318+
319+Details about IM Version 1.7 available at [IBM Knowledge Center][im-v1.7-info].
320+
321+(2) Download Information
322+Information on procuring IM product is available at the [Product Page][im-product-page]
323+and at the [Passport Advantage Site][passport].
324
325
326 IBM MobileFirst Server information
327----------------------------------------
328- Details about MobileFirst Server 7.0 available at [IBM Knowledge Center][mfs-v7-info].
329-
330- ### (2) Download Information
331-
332- Information on procuring IM product is available at the [Product Page][mfs-product-page]
333- and at the [Passport Advantage Site][passport].
334+-----------------------------------
335+(1) General Information
336+Details about MobileFirst Server 7.0 available at [IBM Knowledge Center][mfs-v7-info].
337+
338+(2) Download Information
339+Information on procuring IM product is available at the [Product Page][mfs-product-page]
340+and at the [Passport Advantage Site][passport].
341
342 Contact Information
343 ------------------
344@@ -165,14 +199,16 @@
345
346 <!-- Links -->
347
348- [im-v1.7-info]: http://www-01.ibm.com/support/knowledgecenter/SSDV2W_1.7.0/com.ibm.cic.agent.ui.doc/helpindex_imic.html?cp=SSDV2W_1.7.0%2F0 "IM Version 1.7"
349+ [im-v1.7-info]: http://www-01.ibm.com/support/knowledgecenter/SSDV2W_1.7.0/com.ibm.cic.agent.ui.doc/helpindex_imic.html?cp=SSDV2W_1.7.0%2F0
350
351- [im-product-page]: http://www-01.ibm.com/support/docview.wss?uid=swg27025142 "im-product-page Product Page"
352+ [im-product-page]: http://www-01.ibm.com/support/docview.wss?uid=swg27025142
353
354 [mfs-product-page]: http://www.ibm.com/software/products/en/mobilefirstfoundation "MFS Info"
355
356 [mfs-v7-info]: https://www-01.ibm.com/support/knowledgecenter/SSHS8R_7.0.0/com.ibm.worklight.installconfig.doc/install_config/t_ov_server_install.html
357+
358+ [license-page]: http://www14.software.ibm.com/cgi-bin/weblap/lap.pl?la_formnum=&li_formnum=L-BVID-9TCPPM&title=IBM%20MobileFirst%20Platform%20Foundation%20V7.0%20zip%20of%20Installation%20Manager%20Repository%20for%20IBM%20MobileFirst%20Server%20Multiplatform%20English
359
360- [passport]: http://www-01.ibm.com/software/passportadvantage/ "Passport Advantage"
361+
362
363
364
365=== modified file 'config.yaml'
366--- config.yaml 2015-07-21 11:33:08 +0000
367+++ config.yaml 2015-10-09 16:12:21 +0000
368@@ -1,17 +1,17 @@
369 options:
370 mobilefirstserver_url:
371 type: string
372- default: ""
373+ default: "http://9.124.100.99/debs/mobilefirst-server/"
374 description: |
375 Download url for MobileFirst Server packages
376 mobilefirstserver_package_name:
377 type: string
378- default: ""
379+ default: "MFPF_7.0_INST_MGR_REP_MF_SVR_EN.zip"
380 description: |
381 MobileFirstServer package name
382 im_package_name:
383 type: string
384- default: ""
385+ default: "agent.installer.linux.gtk.x86_64_1.7.1000.20131119_2219.zip"
386 description: |
387 Installation Manager package Name
388 accept-ibm-mobilefirstserver-license:
389@@ -42,4 +42,9 @@
390 <sha1sum MFPF_7.0_INST_MGR_REP_MF_SVR_EN.zip | cut -d " " -f1>
391 to get the checksum value for IBM Installation Manager pacakage.
392 If empty, it does not carry out the integrity check.
393+ liberty-install-path:
394+ type: string
395+ default: "/opt/ibm/wlp"
396+ description: |
397+ IBM websphere liberty installation path.
398
399
400=== modified file 'files/archives/install-MFS-responsefile.xml'
401--- files/archives/install-MFS-responsefile.xml 2015-07-23 16:20:34 +0000
402+++ files/archives/install-MFS-responsefile.xml 2015-10-09 16:12:21 +0000
403@@ -6,17 +6,17 @@
404 <server>
405 <repository location='/root/Installfiles/MobileFirst_Platform_Server/disk1'/>
406 </server>
407- <profile id='IBM MobileFirst Platform Server_1' installLocation='/opt/ibm/MobileFirst_Platform_Server_1_liberty'>
408- <data key='eclipseLocation' value='/opt/ibm/MobileFirst_Platform_Server_1_liberty'/>
409+ <profile id='IBM MobileFirst Platform Server_1' installLocation='/opt/ibm/MobileFirst_Platform_Server_liberty'>
410+ <data key='eclipseLocation' value='/opt/ibm/MobileFirst_Platform_Server_liberty'/>
411 <data key='user.import.profile' value='false'/>
412 <data key='cic.selector.os' value='linux'/>
413- <data key='user.windows.profilesubdir' value='ibm\MobileFirst Platform Server_1'/>
414+ <data key='user.windows.profilesubdir' value='ibm\MobileFirst Platform Server'/>
415 <data key='user.shortcuts.folder3' value='IBM MobileFirst Platform Server 7.0_1'/>
416 <data key='user.update.minimal' value='false'/>
417 <data key='user.update.from.version' value=''/>
418 <data key='user.writable.data.user' value='root'/>
419 <data key='user.database.db2.port' value='50000'/>
420- <data key='user.database.db2.appcenter.dbname' value='APPCNTRA'/>
421+ <data key='user.database.db2.appcenter.dbname' value='APPCNTRA'/>
422 <data key='user.database.db2.appcenter.schema' value=''/>
423 <data key='user.database.db2.appcenter.password' value='{xyzzy}7Z2T47W3538X52295I'/>
424 <data key='user.database.db2.password2' value='{xyzzy}7Z2T47W3538X52295I'/>
425
426=== modified file 'files/archives/uninstall-worklight-responsefile.xml'
427--- files/archives/uninstall-worklight-responsefile.xml 2015-05-08 09:08:40 +0000
428+++ files/archives/uninstall-worklight-responsefile.xml 2015-10-09 16:12:21 +0000
429@@ -33,7 +33,7 @@
430 <!-- The declaration of the Installation Manager package group, a.k.a. profile.
431 Make sure that the installLocation, if it exists, is empty. -->
432 <!--<profile id='IBM Worklight' installLocation='/opt/IBM/Worklight'> -->
433- <profile id='IBM MobileFirst Platform Server_1' installLocation='/opt/ibm/MobileFirst_Platform_Server_1_liberty'>
434+ <profile id='IBM MobileFirst Platform Server' installLocation='/opt/ibm/MobileFirst_Platform_Server_liberty'>
435
436 <!-- The settings 'eclipseLocation', 'user.import.profile',
437 'cic.selector.os', 'cic.selector.ws', 'cic.selector.arch',
438@@ -43,7 +43,7 @@
439
440 <!-- Specify what Installation Manager should uninstall. -->
441 <uninstall modify='false'>
442- <offering id='com.ibm.mobilefirst.foundation.server' profile='IBM MobileFirst Platform Server_1'/>
443+ <offering id='com.ibm.mobilefirst.foundation.server' profile='IBM MobileFirst Platform Server'/>
444 </uninstall>
445
446 </agent-input>
447
448=== modified file 'hooks/config-changed'
449--- hooks/config-changed 2015-07-27 10:35:02 +0000
450+++ hooks/config-changed 2015-10-09 16:12:21 +0000
451@@ -283,6 +283,9 @@
452 #Remove corrupt archive file
453 rm -rf $ARCHIVE_DIR/agent*.zip
454 exit 0
455+ else
456+ juju-log "IBM MFSVR: Installation Manager extracted successfully."
457+
458 fi
459
460 fi
461@@ -314,7 +317,6 @@
462 juju-log "IBM MFSVR: Acceptable values for license is 'True' or 'False'"
463 fi
464
465-juju-log "IBM MFSVR: Installation Manager downloaded and installed sucessfully."
466
467 juju-log "IBM MFSVR: Config change hook completed."
468 ####################################################################################
469
470=== modified file 'hooks/db-relation-changed'
471--- hooks/db-relation-changed 2015-07-27 10:35:02 +0000
472+++ hooks/db-relation-changed 2015-10-09 16:12:21 +0000
473@@ -1,45 +1,48 @@
474 #!/bin/bash
475
476 set -e
477-hooksdir=$PWD
478-DB2_INSTALL_PATH=/opt/ibm/db2/V10.5
479+#hooksdir=$PWD
480 db2user=`relation-get dbusername`
481 db2password=`relation-get dbuserpw`
482 db2instancename=`relation-get db2_instance_name`
483 db2port=`relation-get port`
484 db2_address=`relation-get hostname`
485+db2_install_path=/opt/ibm/db2
486
487-#Copy db2 details in db2values.dat file"
488+#Copy db2 details in to "db2values.dat" file"
489 echo "dbusrname=$db2user" > db2values.dat ; echo "dbpwd=$db2password" >> db2values.dat ; echo "db2_address=$db2_address" >> db2values.dat ; echo "db2instancename=$db2instancename" >> db2values.dat ; echo "db2port=$db2port" >> db2values.dat
490
491-#Check if db2 exist
492-if ! [ -d "$DB2_INSTALL_PATH"/bin ]; then
493- juju-log "IBM MFSVR: DB2 Not found.Exiting!!"
494- exit 0
495-else
496- juju-log "IBM MFSVR: DB2 found."
497-fi
498-
499-
500
501 if [ -z "$db2_address" ]; then
502 juju-log "No data sent yet"
503 exit 0
504 fi
505
506+juju-log "db2_address : $db2_address"
507+private_address=`unit-get private-address`
508+juju-log "private_address : $private_address"
509
510-#check whether db2 is already started or not if not started it will exit
511-if su - $db2user -c 'netstat -an | grep '$db2port; then
512- juju-log "IBM MFSVR: DB2 started in port $db2port"
513-else
514- juju-log "IBM MFSVR: DB2 not started in port $db2port"
515- exit 1
516+if [ "$db2_address" == "$private_address" ]; then
517+ database1=`su - $db2user -c 'db2 list db directory' | grep "APPCNTR" | cut -d"=" -f2`
518+ if [ "$database1" == "" ]; then
519+ juju-log "IBM MFSVR: Create APPCNTR database"
520+ juju-log "IBM MFSVR: Creating APPCNTR database for MobileFirstServer,without APPCNTR database MobileFirst Server will not be installed"
521+ su - $db2user -c 'db2 ATTACH TO '$db2user''
522+ su - $db2user -c 'db2 CREATE DATABASE APPCNTR USING CODESET UTF-8 TERRITORY US'
523+ juju-log "IBM MFSVR: APPCNTR database created "
524+ su - $db2user -c "db2 CONNECT TO APPCNTR"
525+ else
526+ juju-log "IBM MFSVR: APPCNTR database is exist"
527+ fi
528+ #Copy db2 jar file
529+ juju-log "IBM MFSVR: Copying db2jar files"
530+ cp $db2_install_path/V10.5/java/db2jcc.jar $CHARM_DIR/files/archives
531+ cp $db2_install_path/V10.5/java/db2jcc4.jar $CHARM_DIR/files/archives
532+ cp $db2_install_path/V10.5/java/db2jcc_license_*.jar $CHARM_DIR/files/archives
533+
534 fi
535+
536+
537
538-juju-log "IBM MFSVR: creating APPCNTR database for MobileFirstServer,without APPCNTR database MobileFirst Server will not be installed"
539-su - $db2user -c 'db2 ATTACH TO '$db2user''
540-su - $db2user -c 'db2 CREATE DATABASE APPCNTR USING CODESET UTF-8 TERRITORY US'
541-juju-log "Database created "
542-su - $db2user -c "db2 CONNECT TO APPCNTR"
543 juju-log "IBM MFSVR: db-relation-change hook completed"
544
545
546=== modified file 'hooks/db-relation-departed'
547--- hooks/db-relation-departed 2015-07-27 10:35:02 +0000
548+++ hooks/db-relation-departed 2015-10-09 16:12:21 +0000
549@@ -1,16 +1,24 @@
550 #!/bin/bash
551 set -e
552-juju-log "starting db-relation-departed hook"
553-DB2_INSTALL_PATH=/opt/ibm/db2/V10.5
554-dbusrname=`relation-get dbusername`
555+juju-log "IBM MFSVR: Starting db-relation-departed hook"
556+db2user=`relation-get dbusername`
557+db2_address=`relation-get hostname`
558+private_address=`unit-get private-address`
559+juju-log "private_address : $private_address"
560
561-#while removing relation, it will remove APPCNTR database
562-if [ -d "$DB2_INSTALL_PATH"/bin ]; then
563- juju-log "IBM MFSVR: Dropping the APPCNTR DB ..."
564- su - $dbusrname -c 'db2 drop database APPCNTR'
565- juju-log "IBM MFSVR: Dropped APPCNTR db"
566+juju-log "db2_address :$db2_address"
567+if [ "$db2_address" == "$private_address" ]; then
568+ database1=`su - $db2user -c 'db2 list db directory' | grep "APPCNTR" | cut -d"=" -f2`
569+
570+ if [ "$database"== "" ]; then
571+ juju-log "IBM MFSVR: APPCNTR database is not exist"
572+ else
573+ juju-log "MFS HELPER: Removing APPCNTR database"
574+ su - $db2user -c 'db2 drop database APPCNTR'
575+ fi
576 fi
577
578+
579 juju-log "IBM MFSVR: db-relation-departed completed sucessfully"
580
581
582
583=== modified file 'hooks/stop'
584--- hooks/stop 2015-07-27 10:35:02 +0000
585+++ hooks/stop 2015-10-09 16:12:21 +0000
586@@ -1,20 +1,28 @@
587 #!/bin/bash
588 set -e
589-
590-LIBERTY_INSTALL_PATH=/opt/ibm/wlp
591-
592-juju-log "Stop worklight server"
593-
594+juju-log "IBM MFSVR: Starting stop hook"
595+
596+LIBERTY_INSTALL_PATH=`config-get liberty-install-path`
597 if [ -d $LIBERTY_INSTALL_PATH/usr/servers/worklight ]; then
598- $LIBERTY_INSTALL_PATH/bin/server stop worklight
599- if [ $? == 0 ]; then
600- juju-log "worklight server stopped sucessfully"
601- else
602- juju-log "worklight server not running"
603- exit 0
604- fi
605+ juju-log "IBM MFSVR: Removing liberty server"
606+ rm -rf $LIBERTY_INSTALL_PATH/usr/servers/worklight
607+ if [ $? == 0 ]; then
608+ juju-log "IBM MFSVR: worklight server removed successfully"
609+ else
610+ juju-log "IBM MFSVR: Failed to remove worklight server"
611+ fi
612+
613+ rm -rf $LIBERTY_INSTALL_PATH/output/servers/worklight
614+ if [ $? == 0 ]; then
615+ juju-log "IBM MFSVR: worklight server removed successfully from output folder"
616+ else
617+ juju-log "IBM MFSVR: Failed to remove worklight server from oputput folder"
618+ fi
619+
620 else
621- juju-log "Worklight server not created yet"
622- exit 0
623+
624+ juju-log "IBM MFSVR: Server is not exist"
625 fi
626
627+
628+juju-log "IBM MFSVR: Completed stop hook"
629
630=== modified file 'hooks/website-relation-changed'
631--- hooks/website-relation-changed 2015-07-27 10:35:02 +0000
632+++ hooks/website-relation-changed 2015-10-09 16:12:21 +0000
633@@ -1,14 +1,15 @@
634 #!/bin/bash
635
636 set -e
637-LIBERTY_INSTALL_PATH=/opt/ibm/wlp
638-MobileFirstServer_PATH=/opt/ibm/MobileFirst_Platform_Server_1_liberty
639+LIBERTY_INSTALL_PATH=`config-get liberty-install-path`
640+MobileFirstServer_PATH=/opt/ibm/MobileFirst_Platform_Server_liberty
641 IM_INSTALL_PATH=/opt/IBM/InstallationManager
642 DB2_INSTALL_PATH=/opt/ibm/db2/V10.5
643 MOBILEFIRSTSERVER_ARCHIVE_DIR=`pwd`
644 hooksdir=$PWD
645
646-#Get db2 values from db2values.dat file
647+
648+#Get db2 details from db2values.dat file
649 if [ -f "$hooksdir"/db2values.dat ]; then
650 . db2values.dat
651 echo "dbusrname is $dbusrname"
652@@ -50,14 +51,15 @@
653 #Edit install responsefile with Liberty and db2 details
654 edit_responsefile()
655 {
656- echo " Editing the response file"
657+ juju-log "IBM MFSR: Editing response file"
658 sed -i 's|/root/IBM/IBMIMShared|/opt/ibm/IBMIMShared|g' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
659 sed -i 's|/root/Installfiles/MobileFirst_Platform_Server/disk1|'$CHARM_DIR'/files/archives/MobileFirst_Platform_Server/disk1|g' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
660 sed -i 's/APPCNTRA/APPCNTR/' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
661 sed -i 's/50000/'$db2port'/' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
662 sed -i 's/db2inst1/'$dbusrname'/' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
663 sed -i 's/localhost/'$db2_address'/' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
664- sed -i 's|/opt/ibm/db2/V10.5/java/db2jcc.jar|'$DB2_INSTALL_PATH'/java/db2jcc.jar|g' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
665+ #sed -i 's|/opt/ibm/db2/V10.5/java/db2jcc.jar|'$DB2_INSTALL_PATH'/java/db2jcc.jar|g' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
666+ sed -i 's|/opt/ibm/db2/V10.5/java/db2jcc.jar|'$CHARM_DIR'/files/archives/db2jcc.jar|g' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
667 sed -i 's/waserver1/worklight/' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
668 sed -i 's|/root/IBM/WebSphere/wlp|'$LIBERTY_INSTALL_PATH'|g' $CHARM_DIR/files/archives/install-MFS-responsefile.xml
669 }
670@@ -65,16 +67,16 @@
671 #update configure_liberty_db2_file with IBM Mobile first server details after installing the product
672 edit_configure_liberty_db2_file()
673 {
674- echo " Editing configure_liberty_db2.xml file"
675+ juju-log "IBM MFSR: Editing configure_liberty_db2.xml file"
676 sed -i '/"database.db2.wladmin.password"/c\<property name="database.db2.wladmin.password" value="'$dbpwd'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
677 sed -i '/"database.db2.worklight.password"/c\<property name="database.db2.worklight.password" value="'$dbpwd'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
678 sed -i '/"database.db2.worklightreports.password"/c\<property name="database.db2.worklightreports.password" value="'$dbpwd'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
679 sed -i '/"worklight.server.install.dir"/c\<property name="worklight.server.install.dir" value="'$MobileFirstServer_PATH'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
680 sed -i '/"worklight.contextroot"/c\<property name="worklight.contextroot" value="/worklight"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
681- sed -i '/"database.db2.host"/c\<property name="database.db2.host" value="localhost"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
682+ sed -i '/"database.db2.host"/c\<property name="database.db2.host" value="'$db2_address'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
683 sed -i '/"database.db2.port"/c\<property name="database.db2.port" value="'$db2port'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
684 sed -i '/"database.db2.instance"/c\<property name="database.db2.instance" value="db2inst1"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
685- sed -i '/"database.db2.driver.dir"/c\<property name="database.db2.driver.dir" value="'$DB2_INSTALL_PATH'/java"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
686+ sed -i '/"database.db2.driver.dir"/c\<property name="database.db2.driver.dir" value="'$CHARM_DIR'/files/archives"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
687 sed -i '/"database.db2.wladmin.dbname"/c\<property name="database.db2.wladmin.dbname" value="WRKLGHT"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
688 sed -i '/"database.db2.wladmin.schema"/c\<property name="database.db2.wladmin.schema" value="WLADMIN"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
689 sed -i '/"database.db2.wladmin.username"/c\<property name="database.db2.wladmin.username" value="'$dbusrname'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
690@@ -86,22 +88,22 @@
691 sed -i '/"database.db2.worklightreports.username"/c\<property name="database.db2.worklightreports.username" value="'$dbusrname'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
692 sed -i '/"appserver.was.installdir"/c\<property name="appserver.was.installdir" value="'$LIBERTY_INSTALL_PATH'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
693 sed -i '/"appserver.was85liberty.serverInstance"/c\<property name="appserver.was85liberty.serverInstance" value="worklight"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
694-juju-log "configure_liberty_db2_file file edit done"
695+ sed -i '/"worklight.project.war.file"/c\<property name="worklight.project.war.file" value="'$CHARM_DIR'/files/archives/test.war"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/configure-liberty-db2.xml
696 }
697
698 #update create_database_db2_file with IBM Mobile first server details after installing the product
699 edit_create_database_db2_file()
700 {
701- echo " Editing create-database-db2.xml file"
702+ juju-log "IBM MFSR: Editing create-database-db2.xml file"
703 sed -i '/"database.db2.admin.password"/c\<property name="database.db2.admin.password" value="'$dbpwd'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
704 sed -i '/"database.db2.wladmin.password"/c\<property name="database.db2.wladmin.password" value="'$dbpwd'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
705 sed -i '/"database.db2.worklight.password"/c\<property name="database.db2.worklight.password" value="'$dbpwd'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
706 sed -i '/"database.db2.worklightreports.password"/c\<property name="database.db2.worklightreports.password" value="'$dbpwd'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
707 sed -i '/"worklight.server.install.dir"/c\<property name="worklight.server.install.dir" value="'$MobileFirstServer_PATH'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
708- sed -i '/"database.db2.host"/c\<property name="database.db2.host" value="localhost"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
709+ sed -i '/"database.db2.host"/c\<property name="database.db2.host" value="'$db2_address'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
710 sed -i '/"database.db2.port"/c\<property name="database.db2.port" value="'$db2port'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
711 sed -i '/"database.db2.instance"/c\<property name="database.db2.instance" value="db2inst1"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
712- sed -i '/"database.db2.driver.dir"/c\<property name="database.db2.driver.dir" value="'$DB2_INSTALL_PATH'/java"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
713+ sed -i '/"database.db2.driver.dir"/c\<property name="database.db2.driver.dir" value="'$CHARM_DIR'/files/archives"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
714 sed -i '/"database.db2.admin.username"/c\<property name="database.db2.admin.username" value="'$dbusrname'"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
715 sed -i '/"database.db2.wladmin.dbname"/c\<property name="database.db2.wladmin.dbname" value="WRKLGHT"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
716 sed -i '/"database.db2.wladmin.schema"/c\<property name="database.db2.wladmin.schema" value="WLADMIN"/>' $MobileFirstServer_PATH/WorklightServer/configuration-samples/create-database-db2.xml
717@@ -132,43 +134,45 @@
718 fi
719
720 else
721- juju-log "Liberty is not installed"
722+ juju-log "IBM MFSVR: Liberty is not installed"
723+ exit 0
724 fi
725
726 }
727
728-#After installing the product we need to run ant commands to create WORKLIGHT database
729+#Post install configurations.
730 postworklightinstall_configuration()
731 {
732
733- juju-log "editing_configure-liberty-db2.xml file"
734+ juju-log "IBM MFSVR: Editing configure-liberty-db2.xml file"
735 edit_configure_liberty_db2_file
736- juju-log "editing create-database-db2.xml file"
737+ juju-log "IBM MFSVR: Editing create-database-db2.xml file"
738 edit_create_database_db2_file
739- juju-log "Running ant commands"
740+
741+ juju-log "IBM MFSVR: Running ant commands"
742 cd $MobileFirstServer_PATH/WorklightServer/configuration-samples
743 #Run create admdatabases command
744 ant -f create-database-db2.xml admdatabases
745 if [ $? -eq 0 ]; then
746- juju-log "IBM MFSVR: ant create admddatabase command ran sucessfully"
747+ juju-log "IBM MFSVR: ant create admddatabase command ran successfully"
748 else
749 juju-log "IBM MFSVR: ant create admddatabase command failed to run"
750 exit 1
751 fi
752
753- #Run create-database-db2.xml databases command
754+ #Run create-database-db2.xml databases command
755 ant -f create-database-db2.xml databases
756 if [ $? -eq 0 ]; then
757- juju-log "IBM MFSVR: ant create database command ran sucessfully"
758+ juju-log "IBM MFSVR: ant create database command ran successfully"
759 else
760- juju-log "IBM MFSVR: ant create database failed to run"
761+ juju-log "IBM MFSVR: ant create database command failed to run"
762 exit 1
763 fi
764
765 #Run configure admdatabases command
766 ant -f configure-liberty-db2.xml admdatabases
767 if [ $? -eq 0 ]; then
768- juju-log "IBM MFSVR: ant configure liberty admddatabase command ran sucessfully"
769+ juju-log "IBM MFSVR: ant configure liberty admddatabase command ran successfully"
770 else
771 juju-log "IBM MFSVR: ant configure liberty admddatabase command failed to run"
772 exit 1
773@@ -177,16 +181,26 @@
774 #Run configure databases command
775 ant -f configure-liberty-db2.xml databases
776 if [ $? -eq 0 ]; then
777- juju-log "IBM MFSVR: ant configure liberty database command ran sucessfully"
778+ juju-log "IBM MFSVR: ant configure liberty database command ran successfully"
779 else
780 juju-log "IBM MFSVR: ant configure liberty database command failed to run"
781 exit 1
782 fi
783
784- #Run configure databases adminstall command
785+ #Run adminstall command
786 ant -f configure-liberty-db2.xml adminstall
787 if [ $? -eq 0 ]; then
788- juju-log "IBM MFSVR: ant configure liberty database command ran sucessfully"
789+ juju-log "IBM MFSVR: ant adminstall command ran successfully"
790+ else
791+ juju-log "IBM MFSVR: ant adminstall command failed to run"
792+ exit 1
793+ fi
794+
795+
796+ #Run install command to configure sample runtime environment
797+ ant -f configure-liberty-db2.xml install
798+ if [ $? -eq 0 ]; then
799+ juju-log "IBM MFSVR: ant configure liberty database command ran successfully"
800 else
801 juju-log "IBM MFSVR: ant configure liberty database command failed to run"
802 exit 1
803@@ -194,7 +208,7 @@
804
805 }
806
807-#restart liberty server after installing the software to launch webconsole/Appcenterconsole
808+#Restart liberty server after post install configuration to launch webconsole/Appcenterconsole
809 restart_worklightserver()
810 {
811
812@@ -224,7 +238,7 @@
813 juju-log "IBM MFSVR: Begin website-relation-change hook "
814 mobilefirstserver_license_accepted=`config-get accept-ibm-mobilefirstserver-license`
815
816-#checks if liberty is exist or not
817+#Check if liberty is installed
818 if ! [ -d $LIBERTY_INSTALL_PATH ]; then
819 juju-log "IBM MFSVR: WebSphere Liberty Not found.Exiting!!"
820 exit 0
821@@ -233,19 +247,9 @@
822 fi
823
824
825-#checks if db2 is exist or not
826-if ! [ -d $DB2_INSTALL_PATH ]; then
827- juju-log "IBM MFSVR: Db2 Not found.Exiting!!"
828- exit 0
829-else
830-
831- juju-log "IBM MFSVR: Db2 found."
832-fi
833-
834-
835 httpsport=`relation-get https-port`
836 if [ -z "$httpsport" ]; then
837- juju-log "No data sent yet"
838+ juju-log "IBM MFSVR: No data sent yet"
839 exit 0
840 fi
841
842@@ -253,30 +257,32 @@
843 juju-log "IBM MFSVR: IBM MobileFirst Server install START:"
844 if [ $mobilefirstserver_license_accepted == False ]; then
845 juju-log "IBM MFSVR: IBM mobilefirstserver License not accepted."
846+ exit 0
847
848 elif [ $mobilefirstserver_license_accepted == True ]; then
849 juju-log "License accepted"
850- #create worklight server
851+ #Create worklight server
852 create_worklightserver
853 WL_installed=`is_worklight_installed`
854 juju-log $WL_installed
855 if [ $WL_installed == False ]; then
856 #Check MobileFirst Server package availability
857 if [ -d $CHARM_DIR/files/archives/MobileFirst_Platform_Server/disk1 ]; then
858- juju-log "MobileFirst server Packages are available for installation."
859- #edit install response file."
860+ juju-log "IBM MFSVR: MobileFirst server Packages are available for installation."
861+ #Edit install response file."
862 edit_responsefile
863 cd $IM_INSTALL_PATH/eclipse/tools
864 juju-log "IBM MFSVR: Installing MobileFirst Server package."
865 ./imcl input $CHARM_DIR/files/archives/install-MFS-responsefile.xml -acceptLicense -showProgress
866 juju-log "IBM MFSVR: Installation of MobileFirst server complete."
867- #check install sucessful or not
868+
869+ #Check install successful or not
870 if [ -d $MobileFirstServer_PATH/WorklightServer ]; then
871 juju-log "IBM MFSVR: Install Sucessful and moving to post install configuration"
872- #Configure system values for IBM MobileFirst Server
873+ #Configure system values for IBM MobileFirst Server
874 postworklightinstall_configuration
875- juju-log "IBM MFSVR: updated create_database_db2_file and configure_liberty_db2_file files"
876- #restart worklight server
877+ juju-log "IBM MFSVR: Modified create_database_db2_file and configure_liberty_db2_file files"
878+ #Restart worklight server
879 restart_worklightserver
880 else
881 juju-log "IBM MFSVR: Install failed"
882@@ -285,7 +291,6 @@
883
884 else
885 juju-log "MobileFirst server Packages are missing. Please check README file."
886- juju-log "Upgrade MobileFirst server charm after adding the MobileFirst server packages"
887 exit 1
888 fi
889 fi
890
891=== modified file 'metadata.yaml'
892--- metadata.yaml 2015-07-23 06:49:52 +0000
893+++ metadata.yaml 2015-10-09 16:12:21 +0000
894@@ -7,6 +7,8 @@
895 - misc
896 subordinate: false
897 requires:
898+ helper:
899+ interface: helper
900 db:
901 interface: db2
902 website:
903
904=== modified file 'tests/00-setup'
905--- tests/00-setup 2015-07-21 11:33:08 +0000
906+++ tests/00-setup 2015-10-09 16:12:21 +0000
907@@ -9,6 +9,7 @@
908 MFS_URL=${MFS_URL?Error: IBM MFS repository must be defined in tests/00-setup}
909 MFS_PKG=${MFS_PKG?Error: IBM MFS package be defined in tests/00-setup}
910 IM_PKG=${IM_PKG?Error: IBM MFS package be defined in tests/00-setup}
911+WLP_URL=${WLP_URL}
912
913 # Add a local configuration file
914 cat << EOF > local.yaml
915@@ -19,6 +20,8 @@
916 mobilefirstserver_url: "$MFS_URL"
917 mobilefirstserver_package_name: "$MFS_PKG"
918 im_package_name: "$IM_PKG"
919+Liberty:
920+ liberty-install-path: "$WLP_URL"
921
922 EOF
923
924
925=== modified file 'tests/10-deploy.py'
926--- tests/10-deploy.py 2015-07-23 16:20:34 +0000
927+++ tests/10-deploy.py 2015-10-09 16:12:21 +0000
928@@ -61,10 +61,13 @@
929 d.add('websphere-liberty' , placement="mobilefirst-server")
930 d.configure('websphere-liberty', { 'accept-ibm-websphere-license': True })
931 d.configure('websphere-liberty', { 'accept-ibm-java-license': True })
932- d.add('db2' , placement="mobilefirst-server")
933+ d.add('db2')
934+ d.add('mfs-helper' , placement="db2")
935 d.configure('db2', { 'accept-ibm-db2-license': True, 'db2_url': url, 'db2_package_name' : pkg })
936 d.configure('mobilefirst-server', { 'accept-ibm-im-license': True, 'mobilefirstserver_url': mfsurl, 'im_package_name' : impkg })
937 d.configure('mobilefirst-server', { 'accept-ibm-mobilefirstserver-license': True, 'mobilefirstserver_url': mfsurl, 'mobilefirstserver_package_name' : mfspkg })
938+ # Add relation mobilefirst server to mfs-helper
939+ d.relate('mobilefirst-server:helper', 'mfs-helper:helper')
940 # Add relation mobilefirst server to db2
941 d.relate('mobilefirst-server:db', 'db2:db')
942 # Add relation mobilefirst server to websphere-liberty
943
944=== modified file 'tests/local.yaml'
945--- tests/local.yaml 2015-07-21 11:33:08 +0000
946+++ tests/local.yaml 2015-10-09 16:12:21 +0000
947@@ -2,7 +2,9 @@
948 db2_url: "http://9.124.100.99/debs/DB2"
949 db2_package: "DB2_Svr_10.5.0.3_Linux_x86-64.tar.gz"
950 mobilefirst-server:
951- mobilefirstserver_url: "http://9.124.100.99/debs/WORKLIGHT"
952+ mobilefirstserver_url: "http://9.124.100.99/debs/mobilefirst-server"
953 mobilefirstserver_package_name: "MFPF_7.0_INST_MGR_REP_MF_SVR_EN.zip"
954 im_package_name: "agent.installer.linux.gtk.x86_64_1.7.1000.20131119_2219.zip"
955+Liberty:
956+ liberty-install-path: "opt/ibm/wlp"
957

Subscribers

People subscribed via source and target branches

to all changes: