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