Merge lp:~salmavar/charms/trusty/ibm-im/ibm-im-branch into lp:~ibmcharmers/charms/trusty/ibm-im/devel
- Trusty Tahr (14.04)
- ibm-im-branch
- Merge into devel
Proposed by
Shruthima
Status: | Merged |
---|---|
Merged at revision: | 2 |
Proposed branch: | lp:~salmavar/charms/trusty/ibm-im/ibm-im-branch |
Merge into: | lp:~ibmcharmers/charms/trusty/ibm-im/devel |
Diff against target: |
719 lines (+327/-321) 4 files modified
README.md (+211/-175) copyright (+1/-1) files/sftp_get.sh (+0/-20) reactive/ibm-im.sh (+115/-125) |
To merge this branch: | bzr merge lp:~salmavar/charms/trusty/ibm-im/ibm-im-branch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Venkatesh | Pending | ||
Review via email: mp+292629@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
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 2016-04-22 11:21:50 +0000 | |||
3 | +++ README.md 2016-04-27 12:12:01 +0000 | |||
4 | @@ -1,175 +1,211 @@ | |||
5 | 1 | ## Charm for IBM Installation Manager(IM) 1.8 | ||
6 | 2 | |||
7 | 3 | ### Overview | ||
8 | 4 | |||
9 | 5 | IBM Installation Manager | ||
10 | 6 | |||
11 | 7 | IBM® Installation Manager is a single installation program that uses remote or local software repositories to install, modify, or update certain IBM products. | ||
12 | 8 | |||
13 | 9 | User guides and security guides to support this release are available for | ||
14 | 10 | Online viewing [User Guide](http://www.ibm.com/support/knowledgecenter/SSDV2W/im_family_welcome.html) | ||
15 | 11 | |||
16 | 12 | |||
17 | 13 | ### Download of Product Binaries | ||
18 | 14 | |||
19 | 15 | Download your licensed IBM IM 1.8 software for Ubuntu. | ||
20 | 16 | |||
21 | 17 | You can download product binaries from | ||
22 | 18 | [Product Page](http://www-01.ibm.com/support/docview.wss?uid=swg27025142) | ||
23 | 19 | |||
24 | 20 | |||
25 | 21 | ### Usage | ||
26 | 22 | Download your licensed IBM Installation Manager software and host it. | ||
27 | 23 | |||
28 | 24 | Curl-url and Curl-opts are two main options we are using from ibm-base-layer to download the ibm product as IBM-IM is built on top of the IBM-Base-Layer [More Info](http://interfaces.juju.solutions/layer/ibm-base/) | ||
29 | 25 | |||
30 | 26 | To download and install the code contained in this charm you must agree to the IBM license. | ||
31 | 27 | |||
32 | 28 | You can view the full license for `IBM Installation Manager`by visiting the [license-info](http://www-03.ibm.com/software/sla/sladb.nsf/displaylis/39AFC1C1D485C4E085257E7300548B05?OpenDocument). | ||
33 | 29 | |||
34 | 30 | Search for "IBM Installation Manager" and choose the license that applies to the version you are using. | ||
35 | 31 | |||
36 | 32 | ##### For (x86_64) Ubuntu , The packages are: | ||
37 | 33 | |||
38 | 34 | IBM Installation Manager 1.8 (agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip) | ||
39 | 35 | |||
40 | 36 | ##### For Power (ppcle) Ubuntu, The packages are: | ||
41 | 37 | |||
42 | 38 | IBM Installation Manager 1.8(agent.installer.linux.gtk.ppc64le_1.8.1000.20141126_2002.zip) | ||
43 | 39 | |||
44 | 40 | Creating Repositories | ||
45 | 41 | -------------------- | ||
46 | 42 | For deploying IBM IM charm the user needs to download the correct packages as mentioned in the 'Usage' section above and host it so that the IBM IM charm can connect to the host server and deploy the same. The host server can be any Ubuntu machine and the package needs to be kept in the path like `/home/charm/repository/<productname>`. The path where the package is kept is a configurable item and needs to be set before deploying the charm. | ||
47 | 43 | |||
48 | 44 | |||
49 | 45 | ### Deploy | ||
50 | 46 | |||
51 | 47 | 1.Run the following commands to deploy this charm: | ||
52 | 48 | |||
53 | 49 | juju deploy ibm-im | ||
54 | 50 | 2.At this point the charm will wait until the user accepts the license. If you agree to the license, run the following command. | ||
55 | 51 | |||
56 | 52 | juju set ibm-im license_accepted="True" | ||
57 | 53 | |||
58 | 54 | |||
59 | 55 | 3.IBM IM charm also needs an host from where the packages can be downloaded (the user has to keep the Installation Manager packages on this host server),from the directory where the package is kept, user name and password to connect to the host server. | ||
60 | 56 | |||
61 | 57 | We have to provide values for curl-url and curl-opt to download the product. | ||
62 | 58 | |||
63 | 59 | curl-url with hostname,package_dir,package name,checksum value, curl-opts with username and password,to proceed with the installation. | ||
64 | 60 | To provide these run the following command: | ||
65 | 61 | |||
66 | 62 | juju set ibm-im curl_url="<hostname><package_dir><package_name>?<sha512=value>" | ||
67 | 63 | juju set ibm-im curl_opts="-u <username>:<password>" | ||
68 | 64 | |||
69 | 65 | For eg: | ||
70 | 66 | |||
71 | 67 | juju set ibm-im curl_url="http://1.2.3.4/debs/agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip?sha512=d58483957f56c20492f174b5a112b93a35cb7e45d5009c5c5fc4a3d34f91d2fcbefff770cad578287056ca1af01cacd700eb349937530e6f44780075f7dbaaab" | ||
72 | 68 | juju set ibm-im curl_opts="-u root:root123" | ||
73 | 69 | |||
74 | 70 | |||
75 | 71 | |||
76 | 72 | The command to find the sha512 value is | ||
77 | 73 | |||
78 | 74 | sha512sum <IM Package Name> | ||
79 | 75 | |||
80 | 76 | |||
81 | 77 | 4.Setting the license-accepted to False will uninstall the product: | ||
82 | 78 | |||
83 | 79 | juju set ibm-im license_accepted="False" | ||
84 | 80 | |||
85 | 81 | **Note** : If user wants to install any other packages other then the packages mentioned in usage section, user need to download IBM-IM zip file to local trusty folder and edit the layer.yaml i.e provide the default package name under ibm-im-package option. | ||
86 | 82 | |||
87 | 83 | Next user need to deploy locally with the command | ||
88 | 84 | |||
89 | 85 | juju deploy --repository=/home/charm1/charms/ local:trusty/ibm-im | ||
90 | 86 | |||
91 | 87 | Next he need to follow the below deploy section from step 2 | ||
92 | 88 | ### Upgrade of ibm-im | ||
93 | 89 | Once deployed and if the user wants to upgrade the newer version, setting the ibm-im-fp-package will upgrade the product. | ||
94 | 90 | |||
95 | 91 | juju set ibm-im ibm_im_fp_package="<fix pack-name>" | ||
96 | 92 | |||
97 | 93 | For eg: | ||
98 | 94 | |||
99 | 95 | juju set ibm-im ibm_im_fp_package="agent.installer.linux.gtk.x86_64_1.8.4001.20160217_1716.zip" | ||
100 | 96 | |||
101 | 97 | **Note** Before setting the ibm-im-fp-package value user must host the package and provide curl-url and curl-opt options for Downloading fix pack package. | ||
102 | 98 | |||
103 | 99 | For eg: | ||
104 | 100 | |||
105 | 101 | juju set ibm-im curl_url="http://1.2.3.4/debs/agent.installer.linux.gtk.x86_64_1.8.4001.20160217_1716.zip?sha512=0a2e72e40530c2fe39edf76c45ea068a296d1670f8e4e75111c8efeede8e845087b4d5b850f5a570ffb0d5422b5f4b24121812ca754739989a9b160261d40d15" | ||
106 | 102 | juju set ibm-im curl_opts="-u root:root123" | ||
107 | 103 | |||
108 | 104 | |||
109 | 105 | |||
110 | 106 | ### Installation Verification | ||
111 | 107 | |||
112 | 108 | Once deployed, you can use IBM IM to install any IBM products. To verify IM is installed or not | ||
113 | 109 | get into the container and check whether the below path is exist. | ||
114 | 110 | |||
115 | 111 | opt/IBM/InstallationManager | ||
116 | 112 | |||
117 | 113 | To get into the container run the below commmand. | ||
118 | 114 | |||
119 | 115 | juju ssh <machine-id where IBM IM is installed> | ||
120 | 116 | |||
121 | 117 | |||
122 | 118 | ### Uninstallation of ibm-im | ||
123 | 119 | |||
124 | 120 | Setting the license-accepted to False will uninstall the product. | ||
125 | 121 | |||
126 | 122 | juju set ibm-im license_accepted=False | ||
127 | 123 | |||
128 | 124 | |||
129 | 125 | ### Configuration | ||
130 | 126 | |||
131 | 127 | - **license_accepted** Before you can use or install IBM IM, | ||
132 | 128 | you must accept the terms of International License | ||
133 | 129 | Agreement for Non-Warranted Programs and additional license information. | ||
134 | 130 | Please read the license agreement carefully | ||
135 | 131 | [IBM IM License](http://www-03.ibm.com/software/sla/sladb.nsf/displaylis/39AFC1C1D485C4E085257E7300548B05?OpenDocument). Set the value of license-accepted to True if you agree to IBM IM license. | ||
136 | 132 | |||
137 | 133 | **The IBM IM software cannot be installed until the terms and | ||
138 | 134 | conditions are accepted. The charm will not function correctly until the configuration option is set to True.** | ||
139 | 135 | |||
140 | 136 | - **curl_url** For downloading package we need to set curl_url with following options. | ||
141 | 137 | |||
142 | 138 | - *hostname* - The web server host name from which IBM IM installation packages can be downloaded. | ||
143 | 139 | - *package_dir* - The package directory path in the web server. | ||
144 | 140 | - *package name* - The IBM IM Package name. | ||
145 | 141 | - *checksum value* - Checksum value to check integrity of IBM IM package. The Charm | ||
146 | 142 | uses sha512sum to check the integrity. If empty, it does not carry out the | ||
147 | 143 | integrity check. Use `sha512sum <Package Location/Package Name>` | ||
148 | 144 | to find out Checksum value for downloaded package. | ||
149 | 145 | |||
150 | 146 | - **curl_opts** We need to set curl_opts with following options. | ||
151 | 147 | - *username* - User name of the webserver host. | ||
152 | 148 | - *password* - Password of the webserver host. | ||
153 | 149 | |||
154 | 150 | - **ibm-im-fp-package** The IBM IM Fix pack Package name. These must be provided when user wants to upgrade the charm. | ||
155 | 151 | |||
156 | 152 | |||
157 | 153 | |||
158 | 154 | |||
159 | 155 | ### IBM IM Information | ||
160 | 156 | |||
161 | 157 | ### General Information | ||
162 | 158 | |||
163 | 159 | Details about IBM IM available [Here](http://www.ibm.com/support/knowledgecenter/SSDV2W/im_family_welcome.html) | ||
164 | 160 | |||
165 | 161 | ### Download Information | ||
166 | 162 | |||
167 | 163 | Information on procuring IBM IM product is available at the [Product Page](http://www-01.ibm.com/support/docview.wss?uid=swg27025142) | ||
168 | 164 | |||
169 | 165 | ### License Information | ||
170 | 166 | |||
171 | 167 | License information for IBM IM can be viewed [Here](http://www-03.ibm.com/software/sla/sladb.nsf/searchlis/?searchview&searchorder=4&searchmax=0&query=%28Installation+Manager+1.8.3%29) | ||
172 | 168 | |||
173 | 169 | ### Known Limitations | ||
174 | 170 | |||
175 | 171 | This charm makes use of Juju Status commands, and requires juju 1.24 or greater | ||
176 | 172 | |||
177 | 173 | ### Contact Information | ||
178 | 174 | |||
179 | 175 | For issues with this charm, please contact [IBM Juju Support Team](mailto:jujusupp@us.ibm.com) | ||
180 | 176 | \ No newline at end of file | 1 | \ No newline at end of file |
181 | 2 | ## Charm for IBM Installation Manager(IM) 1.8 | ||
182 | 3 | |||
183 | 4 | ### Overview | ||
184 | 5 | |||
185 | 6 | IBM Installation Manager | ||
186 | 7 | |||
187 | 8 | IBM® Installation Manager is a single installation program that uses remote or local software repositories to install, modify, or update certain IBM products. | ||
188 | 9 | |||
189 | 10 | User guides and security guides to support this release are available for | ||
190 | 11 | online viewing [User Guide](http://www.ibm.com/support/knowledgecenter/SSDV2W/im_family_welcome.html) | ||
191 | 12 | |||
192 | 13 | |||
193 | 14 | ### Download of Product Binaries | ||
194 | 15 | |||
195 | 16 | Download your licensed IBM IM 1.8 software for Ubuntu. | ||
196 | 17 | |||
197 | 18 | You can download product binaries from | ||
198 | 19 | [Product Page](http://www-01.ibm.com/support/docview.wss?uid=swg27025142) | ||
199 | 20 | |||
200 | 21 | |||
201 | 22 | ### Usage | ||
202 | 23 | Download your licensed IBM Installation Manager software and host it in a way that can be downloaded using curl. | ||
203 | 24 | |||
204 | 25 | Curl-url and Curl-opts are two main options we are using from ibm-base-layer to download the ibm product as IBM-IM is built on top of the ibm-base layer [More Info](http://interfaces.juju.solutions/layer/ibm-base/) | ||
205 | 26 | |||
206 | 27 | To download and install the code contained in this charm you must agree to the IBM license. | ||
207 | 28 | |||
208 | 29 | You can view the full license for `IBM Installation Manager`by visiting the [license-info](http://www-03.ibm.com/software/sla/sladb.nsf/displaylis/39AFC1C1D485C4E085257E7300548B05?OpenDocument). | ||
209 | 30 | |||
210 | 31 | Search for "IBM Installation Manager" and choose the license that applies to the version you are using. | ||
211 | 32 | |||
212 | 33 | ##### For (x86_64) Ubuntu , The packages are: | ||
213 | 34 | |||
214 | 35 | IBM Installation Manager 1.8 (agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip) | ||
215 | 36 | |||
216 | 37 | ##### For Power (ppcle) Ubuntu, The packages are: | ||
217 | 38 | |||
218 | 39 | IBM Installation Manager 1.8(agent.installer.linux.gtk.ppc64le_1.8.1000.20141126_2002.zip) | ||
219 | 40 | |||
220 | 41 | Creating Repositories | ||
221 | 42 | -------------------- | ||
222 | 43 | For deploying IBM IM charm the user needs to download the correct packages as mentioned in the 'Usage' section above and host it in a way which can be downloaded using curl. | ||
223 | 44 | |||
224 | 45 | For eg: | ||
225 | 46 | |||
226 | 47 | The packages should be hosted such that it can be downloaded using curl. For e.g using python simple HTTP Server as follows,If the user downloads the IM package agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip in /home/Downloads then the below commands will start a simple HTTP Server and host the packages in the /home/Downloads folder | ||
227 | 48 | |||
228 | 49 | cd /home/Downloads | ||
229 | 50 | python -m SimpleHTTPServer | ||
230 | 51 | |||
231 | 52 | And the curl-url would be | ||
232 | 53 | |||
233 | 54 | http://localhost:8000/package/agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip?md5=<md5 of agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip> | ||
234 | 55 | |||
235 | 56 | ### Deploy | ||
236 | 57 | |||
237 | 58 | 1.Run the following commands to deploy this charm: | ||
238 | 59 | |||
239 | 60 | juju deploy ibm-im | ||
240 | 61 | |||
241 | 62 | 2.Here the charm will wait until the user accepts the license. If you agree to the license, run the following command. | ||
242 | 63 | |||
243 | 64 | juju set ibm-im license_accepted="True" | ||
244 | 65 | |||
245 | 66 | |||
246 | 67 | 3.IBM IM charm also needs an host from where the packages can be downloaded (the user has to keep the Installation Manager packages on this host server),from the directory where the package is kept, user name and password to connect to the host server(as mentioned in the creating repositories section). | ||
247 | 68 | |||
248 | 69 | We have to provide values for curl-url and curl-opt to download the product. | ||
249 | 70 | |||
250 | 71 | curl-url with host name,package_dir,package name,checksum value, curl-opts with user name and password,to proceed with the installation. | ||
251 | 72 | To provide these run the following command: | ||
252 | 73 | |||
253 | 74 | juju set ibm-im curl_url="<hostname>/<package_dir><package_name>?<sha512=value>" | ||
254 | 75 | juju set ibm-im curl_opts="-u <username>:<password>" | ||
255 | 76 | |||
256 | 77 | For eg: | ||
257 | 78 | |||
258 | 79 | juju set ibm-im curl_url="http://1.2.3.4/debs/agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip?sha512=d58483957f56c20492f174b5a112b93a35cb7e45d5009c5c5fc4a3d34f91d2fcbefff770cad578287056ca1af01cacd700eb349937530e6f44780075f7dbaaab" | ||
259 | 80 | juju set ibm-im curl_opts="-u root:root123" | ||
260 | 81 | |||
261 | 82 | |||
262 | 83 | |||
263 | 84 | The command to find the sha512 value is | ||
264 | 85 | |||
265 | 86 | sha512sum <IM Package Name> | ||
266 | 87 | |||
267 | 88 | For eg: | ||
268 | 89 | |||
269 | 90 | sha512sum agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip | ||
270 | 91 | |||
271 | 92 | |||
272 | 93 | 4.Setting the license-accepted to False will uninstall the product: | ||
273 | 94 | |||
274 | 95 | juju set ibm-im license_accepted="False" | ||
275 | 96 | |||
276 | 97 | **Note** : If user wants to install any other packages other then the packages mentioned in usage section, user needs to download IBM-IM charm folder from charm store to local machine and edit the layer.yaml i.e provide the default package name under ibm-im-package option. | ||
277 | 98 | |||
278 | 99 | Next user needs to deploy locally with the command | ||
279 | 100 | |||
280 | 101 | juju deploy --repository=<path_to_charms_folder> local:trusty/ibm-im | ||
281 | 102 | |||
282 | 103 | Next he need to follow the below deploy section from step 2 | ||
283 | 104 | ### Upgrade of ibm-im | ||
284 | 105 | Once deployed and if the user wants to upgrade to the newer version, setting the ibm-im-fp-package will upgrade the product. | ||
285 | 106 | |||
286 | 107 | juju set ibm-im ibm_im_fp_package="<fix pack-name>" | ||
287 | 108 | |||
288 | 109 | For eg: | ||
289 | 110 | |||
290 | 111 | juju set ibm-im ibm_im_fp_package="agent.installer.linux.gtk.x86_64_1.8.4001.20160217_1716.zip" | ||
291 | 112 | |||
292 | 113 | **Note** Before setting the ibm-im-fp-package value user must host the package and provide curl-url and curl-opt options for Downloading fix pack package. | ||
293 | 114 | |||
294 | 115 | For eg: | ||
295 | 116 | |||
296 | 117 | juju set ibm-im curl_url="http://1.2.3.4/debs/agent.installer.linux.gtk.x86_64_1.8.4001.20160217_1716.zip?sha512=0a2e72e40530c2fe39edf76c45ea068a296d1670f8e4e75111c8efeede8e845087b4d5b850f5a570ffb0d5422b5f4b24121812ca754739989a9b160261d40d15" | ||
297 | 118 | juju set ibm-im curl_opts="-u root:root123" | ||
298 | 119 | |||
299 | 120 | |||
300 | 121 | |||
301 | 122 | ### Installation Verification | ||
302 | 123 | |||
303 | 124 | Once deployed, you can use IBM IM to install any IBM products. To verify IM is installed or not | ||
304 | 125 | get into the container and check whether the below path is exist. | ||
305 | 126 | |||
306 | 127 | /opt/IBM/InstallationManager | ||
307 | 128 | |||
308 | 129 | To get into the container run the below command. | ||
309 | 130 | |||
310 | 131 | juju ssh <machine-id where IBM IM is installed> | ||
311 | 132 | |||
312 | 133 | |||
313 | 134 | ### Uninstallation of ibm-im | ||
314 | 135 | |||
315 | 136 | Setting the license-accepted to False will uninstall the product. | ||
316 | 137 | |||
317 | 138 | juju set ibm-im license_accepted=False | ||
318 | 139 | |||
319 | 140 | |||
320 | 141 | ### Configuration | ||
321 | 142 | |||
322 | 143 | - **license_accepted** Before you can use or install IBM IM, | ||
323 | 144 | you must accept the terms of International License | ||
324 | 145 | Agreement for Non-Warranted Programs and additional license information. | ||
325 | 146 | Please read the license agreement carefully | ||
326 | 147 | [IBM IM License](http://www-03.ibm.com/software/sla/sladb.nsf/displaylis/39AFC1C1D485C4E085257E7300548B05?OpenDocument). Set the value of license-accepted to True if you agree to IBM IM license. | ||
327 | 148 | |||
328 | 149 | **The IBM IM software cannot be installed until the terms and | ||
329 | 150 | conditions are accepted. The charm will not function correctly until the configuration option is set to True.** | ||
330 | 151 | |||
331 | 152 | - **curl_url** For downloading package we need to set curl_url with following options. | ||
332 | 153 | |||
333 | 154 | - *hostname* - The web server host name from which IBM IM installation packages can be downloaded. | ||
334 | 155 | - *package_dir* - The package directory path in the web server. | ||
335 | 156 | - *package name* - The IBM IM Package name. | ||
336 | 157 | - *checksum value* - Checksum value to check integrity of IBM IM package. The Charm | ||
337 | 158 | uses sha512sum to check the integrity. If empty, it does not carry out the | ||
338 | 159 | integrity check. Use `sha512sum <Package Location/Package Name>` | ||
339 | 160 | to find out Checksum value for downloaded package. | ||
340 | 161 | |||
341 | 162 | - **curl_opts** We need to set curl_opts with following options. | ||
342 | 163 | - *username* - User name of the webserver host. | ||
343 | 164 | - *password* - Password of the webserver host. | ||
344 | 165 | |||
345 | 166 | - **ibm-im-fp-package** The IBM IM Fix pack Package name. These must be provided when user wants to upgrade the charm. | ||
346 | 167 | |||
347 | 168 | |||
348 | 169 | |||
349 | 170 | |||
350 | 171 | ### IBM IM Information | ||
351 | 172 | |||
352 | 173 | ### General Information | ||
353 | 174 | |||
354 | 175 | Details about IBM IM available [Here](http://www.ibm.com/support/knowledgecenter/SSDV2W/im_family_welcome.html) | ||
355 | 176 | |||
356 | 177 | ### Download Information | ||
357 | 178 | |||
358 | 179 | Information on procuring IBM IM product is available at the [Product Page](http://www-01.ibm.com/support/docview.wss?uid=swg27025142) | ||
359 | 180 | |||
360 | 181 | ### License Information | ||
361 | 182 | |||
362 | 183 | License information for IBM IM can be viewed [Here](http://www-03.ibm.com/software/sla/sladb.nsf/searchlis/?searchview&searchorder=4&searchmax=0&query=%28Installation+Manager+1.8.3%29) | ||
363 | 184 | |||
364 | 185 | ### Known Limitations | ||
365 | 186 | |||
366 | 187 | This charm makes use of juju status commands, and requires juju 1.24 or greater | ||
367 | 188 | |||
368 | 189 | ### Contact Information | ||
369 | 190 | |||
370 | 191 | For issues with this charm, please contact [IBM Juju Support Team](mailto:jujusupp@us.ibm.com) | ||
371 | 192 | ### Additional Information | ||
372 | 193 | This layer is intended to be extended by other charms that would benefit from having IBM Installation Manager (IBM IM) preinstalled. For example, a WebSphere layered charm could include this layer so it could use IBM IM to install WebSphere. | ||
373 | 194 | |||
374 | 195 | To use this layer, include the following in your `layer.yaml`: | ||
375 | 196 | |||
376 | 197 | ```yaml | ||
377 | 198 | includes: ['layer:ibm-installation-manager'] | ||
378 | 199 | ``` | ||
379 | 200 | |||
380 | 201 | Then, in your charm, watch for the `im.installed` state, at which point you will know the IBM IM tools are available: | ||
381 | 202 | |||
382 | 203 | ```bash | ||
383 | 204 | IM_PATH=/opt/IBM/InstallationManager | ||
384 | 205 | |||
385 | 206 | @when 'im.installed' | ||
386 | 207 | install_was() { | ||
387 | 208 | WAS_REPO=`config-get was_repo` | ||
388 | 209 | ${IM_PATH}/tools/imutilsc saveCredential -url $WAS_REPO -userName $IBM_ID_NAME -userPassword $IBM_ID_PASS -secureStorageFile "secure.store" | ||
389 | 210 | ${IM_PATH}/installc -input silent-install.xml -acceptlicense -secureStorageFile "secure.store" | ||
390 | 211 | ${IM_PATH}/imcl install $IM_ARGS | ||
391 | 212 | } | ||
392 | 177 | 213 | ||
393 | === modified file 'copyright' | |||
394 | --- copyright 2016-04-22 11:21:50 +0000 | |||
395 | +++ copyright 2016-04-27 12:12:01 +0000 | |||
396 | @@ -1,4 +1,4 @@ | |||
398 | 1 | Copyright 2015 IBM Corporation | 1 | Copyright 2016 IBM Corporation |
399 | 2 | 2 | ||
400 | 3 | This Charm is licensed under the Apache License, Version 2.0 (the "License"); | 3 | This Charm is licensed under the Apache License, Version 2.0 (the "License"); |
401 | 4 | you may not use this file except in compliance with the License. | 4 | you may not use this file except in compliance with the License. |
402 | 5 | 5 | ||
403 | === removed file 'files/sftp_get.sh' | |||
404 | --- files/sftp_get.sh 2016-04-22 11:21:50 +0000 | |||
405 | +++ files/sftp_get.sh 1970-01-01 00:00:00 +0000 | |||
406 | @@ -1,20 +0,0 @@ | |||
407 | 1 | #!/usr/bin/expect | ||
408 | 2 | # Helper script to connect and download using sftp | ||
409 | 3 | # Invoked from download action | ||
410 | 4 | # Usage: sftp_get.sh user password host remote_dir localpath | ||
411 | 5 | |||
412 | 6 | set user [lindex $argv 0] | ||
413 | 7 | set password [lindex $argv 1] | ||
414 | 8 | set host [lindex $argv 2] | ||
415 | 9 | set r_dir [lindex $argv 3] | ||
416 | 10 | set localpath [lindex $argv 4] | ||
417 | 11 | |||
418 | 12 | set timeout 90 | ||
419 | 13 | spawn sftp -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null $user@$host | ||
420 | 14 | expect "password:" | ||
421 | 15 | send "$password\n" | ||
422 | 16 | expect "sftp>" | ||
423 | 17 | set timeout 3000 | ||
424 | 18 | send "get -r $r_dir $localpath\n" | ||
425 | 19 | expect "sftp>" | ||
426 | 20 | send "exit\n" | ||
427 | 21 | 0 | ||
428 | === modified file 'reactive/ibm-im.sh' | |||
429 | --- reactive/ibm-im.sh 2016-04-22 11:21:50 +0000 | |||
430 | +++ reactive/ibm-im.sh 2016-04-27 12:12:01 +0000 | |||
431 | @@ -3,109 +3,96 @@ | |||
432 | 3 | 3 | ||
433 | 4 | source charms.reactive.sh | 4 | source charms.reactive.sh |
434 | 5 | ARCHIVE_DIR=files/archives | 5 | ARCHIVE_DIR=files/archives |
435 | 6 | |||
436 | 7 | # Fail if we're not on a supported arch. Also set defaults for filename | ||
437 | 8 | # and sha1sum based on arch. | ||
438 | 9 | ARCHITECTURE=`uname -m` | 6 | ARCHITECTURE=`uname -m` |
439 | 10 | DEFAULT_INSTALLER_FILE_IM="" | ||
440 | 11 | if [ "$ARCHITECTURE" = "x86_64" ]; then | ||
441 | 12 | DEFAULT_INSTALLER_FILE_IM="agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip" | ||
442 | 13 | elif [ "$ARCHITECTURE" = "ppc64le" ]; then | ||
443 | 14 | DEFAULT_INSTALLER_FILE_IM="agent.installer.linux.gtk.ppc64le_1.8.1000.20141126_2002.zip" | ||
444 | 15 | else | ||
445 | 16 | status-set blocked "IBM IM: Platform not supported" | ||
446 | 17 | fi | ||
447 | 18 | |||
448 | 19 | # Get the package name from layer.yaml to check whether the user wants to install a different package | ||
449 | 20 | im_file_name="$(layer_option ibm-im ibm_im_package)" | ||
450 | 21 | cfg_im_pkg_name=$im_file_name | ||
451 | 22 | |||
452 | 23 | # Set package name to a predefined value if the user has not provided a package name | ||
453 | 24 | if [ "$cfg_im_pkg_name" == "" ]; then | ||
454 | 25 | cfg_im_pkg_name=${DEFAULT_INSTALLER_FILE_IM} | ||
455 | 26 | fi | ||
456 | 27 | |||
457 | 28 | cfg_im_pkg_name=${DEFAULT_INSTALLER_FILE_IM} | ||
458 | 29 | 7 | ||
459 | 30 | # Installation Manager install path | 8 | # Installation Manager install path |
460 | 31 | IM_INSTALL_PATH="/opt/IBM/InstallationManager" | 9 | IM_INSTALL_PATH="/opt/IBM/InstallationManager" |
461 | 32 | 10 | ||
462 | 33 | # Check whether IM is installed | ||
463 | 34 | is_im_installed() | ||
464 | 35 | { | ||
465 | 36 | if [ -f $IM_INSTALL_PATH/eclipse/IBMIM ]; then | ||
466 | 37 | echo "True" | ||
467 | 38 | else | ||
468 | 39 | echo "False" | ||
469 | 40 | fi | ||
470 | 41 | |||
471 | 42 | } | ||
472 | 43 | |||
473 | 44 | #Remove IM, if installed | ||
474 | 45 | remove_im_software() | ||
475 | 46 | { | ||
476 | 47 | im_installed=`is_im_installed` | ||
477 | 48 | if [ $im_installed == True ]; then | ||
478 | 49 | juju-log "IBM IM: Removing IBM IM software." | ||
479 | 50 | /root/var/ibm/InstallationManager/uninstall/uninstallc | ||
480 | 51 | juju-log "IBM IM: Removed IBM IM software" | ||
481 | 52 | fi | ||
482 | 53 | |||
483 | 54 | } | ||
484 | 55 | 11 | ||
485 | 56 | @when 'ibm-base.license.accepted' 'ibm-base.curl.resource.fetched' | 12 | @when 'ibm-base.license.accepted' 'ibm-base.curl.resource.fetched' |
486 | 57 | @when_not 'ibm-im.installed' | 13 | @when_not 'ibm-im.installed' |
487 | 58 | function install(){ | 14 | function install(){ |
498 | 59 | # Do the actual IBM IM install | 15 | # Get the package name to check whether the user wants to install a different package |
499 | 60 | im_inst=`is_im_installed` | 16 | im_file_name="$(layer_option ibm-im ibm_im_package)" |
500 | 61 | if [ $im_inst == False ]; then | 17 | cfg_im_pkg_name=$im_file_name |
501 | 62 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/$cfg_im_pkg_name ]; then | 18 | |
502 | 63 | juju-log "IBM IM: downloading and extracting IM packages" | 19 | #Check whether user has selected right package name from the package name string. If he selects wrong package name , install would fail. |
503 | 64 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/userinstc ]; then | 20 | # Set package name to a predefined value if user have not set the layer option |
504 | 65 | juju-log "IBM IM: IBM IM package contents extracted already." | 21 | if [ "$cfg_im_pkg_name" == "" ]; then |
505 | 66 | else | 22 | if [ "$ARCHITECTURE" = "x86_64" ]; then |
506 | 67 | cd $CHARM_DIR/$ARCHIVE_DIR | 23 | DEFAULT_INSTALLER_FILE_IM="agent.installer.linux.gtk.x86_64_1.8.3000.20150606_0047.zip" |
507 | 68 | 24 | elif [ "$ARCHITECTURE" = "ppc64le" ]; then | |
508 | 25 | DEFAULT_INSTALLER_FILE_IM="agent.installer.linux.gtk.ppc64le_1.8.1000.20141126_2002.zip" | ||
509 | 26 | else | ||
510 | 27 | status-set blocked "IBM IM: Platform not supported" | ||
511 | 28 | fi | ||
512 | 29 | cfg_im_pkg_name=${DEFAULT_INSTALLER_FILE_IM} | ||
513 | 30 | else | ||
514 | 31 | if [ "$ARCHITECTURE" = "x86_64" ]; then | ||
515 | 32 | juju-log "Checking the package name" | ||
516 | 33 | if echo "$cfg_im_pkg_name" | grep -q "x86"; then | ||
517 | 34 | juju-log "IBM IM: Package name is matching for the platform" | ||
518 | 35 | else | ||
519 | 36 | juju-log "IBM IM: Probably Not the right package. IM install will fail if its not the right package" | ||
520 | 37 | status-set blocked "Probably Not the right package. Please configure the correct package name" | ||
521 | 38 | exit 0 | ||
522 | 39 | fi | ||
523 | 40 | else | ||
524 | 41 | if echo "$cfg_im_pkg_name" | grep -q "ppcle"; then | ||
525 | 42 | juju-log "IBM IM: Package name is matching for the platform" | ||
526 | 43 | else | ||
527 | 44 | juju-log "IBM IM: Probably Not the right package. IM install will fail if its not the right package" | ||
528 | 45 | status-set blocked "Probably Not the right package. Please configure the correct package name" | ||
529 | 46 | exit 0 | ||
530 | 47 | fi | ||
531 | 48 | fi | ||
532 | 49 | fi | ||
533 | 50 | |||
534 | 51 | # Do the actual IBM IM install | ||
535 | 52 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/$cfg_im_pkg_name ]; then | ||
536 | 53 | juju-log "IBM IM: downloading and extracting IM packages" | ||
537 | 54 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/userinstc ]; then | ||
538 | 55 | juju-log "IBM IM: IBM IM package contents extracted already." | ||
539 | 56 | else | ||
540 | 57 | cd $CHARM_DIR/$ARCHIVE_DIR | ||
541 | 58 | |||
542 | 69 | juju-log "im_pkg_name===="$cfg_im_pkg_name | 59 | juju-log "im_pkg_name===="$cfg_im_pkg_name |
543 | 70 | if ! unzip $cfg_im_pkg_name -d $CHARM_DIR/$ARCHIVE_DIR | 60 | if ! unzip $cfg_im_pkg_name -d $CHARM_DIR/$ARCHIVE_DIR |
560 | 71 | then | 61 | then |
561 | 72 | juju-log "IBM IM: Unable to extract the IM package content. Verify whether the package is corrupt." | 62 | juju-log "IBM IM: Unable to extract the IM package content. Verify whether the package is corrupt." |
562 | 73 | # Remove corrupt archive file | 63 | # Remove corrupt archive file |
563 | 74 | status-set blocked "IBM Installation Manager package is corrupt" | 64 | status-set blocked "IBM Installation Manager package is corrupt" |
564 | 75 | rm -f $CHARM_DIR/$ARCHIVE_DIR/$im_pkg_name | 65 | rm -f $CHARM_DIR/$ARCHIVE_DIR/$im_pkg_name |
565 | 76 | exit 0 | 66 | exit 0 |
566 | 77 | else | 67 | else |
567 | 78 | juju-log "IBM IM: Installation Manager extracted successfully." | 68 | juju-log "IBM IM: Installation Manager extracted successfully." |
568 | 79 | fi | 69 | fi |
569 | 80 | fi | 70 | fi |
570 | 81 | fi | 71 | fi |
571 | 82 | juju-log "IBM IM: IM installation start" | 72 | juju-log "IBM IM: IM installation start" |
572 | 83 | # Check IM package availability | 73 | # Check IM package availability |
573 | 84 | juju-log $CHARM_DIR/$ARCHIVE_DIR | 74 | juju-log $CHARM_DIR/$ARCHIVE_DIR |
574 | 85 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/userinstc ]; | 75 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/userinstc ]; |
575 | 86 | then | 76 | then |
576 | 87 | 77 | ||
583 | 88 | juju-log "IBM IM: IM Packages available for installation." | 78 | juju-log "IBM IM: IM Packages available for installation." |
584 | 89 | cp $CHARM_DIR/$ARCHIVE_DIR/install.xml $CHARM_DIR/$ARCHIVE_DIR/silent_install.xml | 79 | cp $CHARM_DIR/$ARCHIVE_DIR/install.xml $CHARM_DIR/$ARCHIVE_DIR/silent_install.xml |
585 | 90 | sed -i "2 a \<profile kind='self' installLocation='$IM_INSTALL_PATH' id='IBM Installation Manager'>\n <data key='eclipseLocation' value='$IM_INSTALL_PATH' />\n</profile>" $CHARM_DIR/$ARCHIVE_DIR/silent_install.xml | 80 | sed -i "2 a \<profile kind='self' installLocation='$IM_INSTALL_PATH' id='IBM Installation Manager'>\n <data key='eclipseLocation' value='$IM_INSTALL_PATH' />\n</profile>" $CHARM_DIR/$ARCHIVE_DIR/silent_install.xml |
586 | 91 | if $CHARM_DIR/$ARCHIVE_DIR/userinstc -input $CHARM_DIR/$ARCHIVE_DIR/silent_install.xml -acceptlicense | 81 | if $CHARM_DIR/$ARCHIVE_DIR/userinstc -input $CHARM_DIR/$ARCHIVE_DIR/silent_install.xml -acceptlicense |
587 | 92 | then | 82 | then |
588 | 93 | set_state 'ibm-im.installed' | 83 | set_state 'ibm-im.installed' |
589 | 94 | 84 | ||
595 | 95 | status-set active "IBM IM: IM Is installed successfully" | 85 | status-set active "IBM IM: IM Is installed successfully" |
596 | 96 | else | 86 | else |
597 | 97 | juju-log "IBM IM: Error while installing IM" | 87 | juju-log "IBM IM: Error while installing IM" |
598 | 98 | exit 1 | 88 | exit 1 |
599 | 99 | fi | 89 | fi |
600 | 100 | 90 | ||
609 | 101 | else | 91 | else |
610 | 102 | juju-log "IBM IM: IM Packages missing. Please check README file" | 92 | juju-log "IBM IM: IM Packages missing. Please check README file" |
611 | 103 | status-set maintenance "IBM IM install failed" | 93 | status-set maintenance "IBM IM install failed" |
612 | 104 | exit 1 | 94 | exit 1 |
613 | 105 | fi | 95 | fi |
606 | 106 | else | ||
607 | 107 | juju-log "IBM IM: IBM IM Installed already using same package name." | ||
608 | 108 | fi | ||
614 | 109 | } | 96 | } |
615 | 110 | 97 | ||
616 | 111 | 98 | ||
617 | @@ -114,63 +101,66 @@ | |||
618 | 114 | function install-ibm-im-fixpack(){ | 101 | function install-ibm-im-fixpack(){ |
619 | 115 | ibm_im_fp_package=`config-get ibm_im_fp_package` | 102 | ibm_im_fp_package=`config-get ibm_im_fp_package` |
620 | 116 | 103 | ||
622 | 117 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/$ibm_im_fp_package ]; then | 104 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/$ibm_im_fp_package ]; then |
623 | 118 | juju-log "IBM-IM: ibm_im_fp_package is available" | 105 | juju-log "IBM-IM: ibm_im_fp_package is available" |
624 | 119 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/FP/userinstc ]; then | 106 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/FP/userinstc ]; then |
628 | 120 | juju-log "IBM IM: IBM IM package contents extracted already." | 107 | juju-log "IBM IM: IBM IM package contents extracted already." |
629 | 121 | else | 108 | else |
630 | 122 | mkdir $CHARM_DIR/$ARCHIVE_DIR/FP | 109 | mkdir $CHARM_DIR/$ARCHIVE_DIR/FP |
631 | 123 | cd $CHARM_DIR/$ARCHIVE_DIR | 110 | cd $CHARM_DIR/$ARCHIVE_DIR |
633 | 124 | juju-log "im_fp_pkg_name===="$ibm_im_fp_package | 111 | juju-log "im_fp_pkg_name===="$ibm_im_fp_package |
634 | 125 | if ! unzip $ibm_im_fp_package -d $CHARM_DIR/$ARCHIVE_DIR/FP | 112 | if ! unzip $ibm_im_fp_package -d $CHARM_DIR/$ARCHIVE_DIR/FP |
650 | 126 | then | 113 | then |
651 | 127 | juju-log "IBM IM: Unable to extract the IM FP package content. Verify whether the package is corrupt." | 114 | juju-log "IBM IM: Unable to extract the IM FP package content. Verify whether the package is corrupt." |
652 | 128 | # Remove corrupt archive file | 115 | # Remove corrupt archive file |
653 | 129 | status-set blocked "IBM Installation Manager fixpack package is corrupt" | 116 | status-set blocked "IBM Installation Manager fixpack package is corrupt" |
654 | 130 | rm -f $CHARM_DIR/$ARCHIVE_DIR/$ibm_im_fp_package | 117 | rm -f $CHARM_DIR/$ARCHIVE_DIR/$ibm_im_fp_package |
655 | 131 | exit 0 | 118 | exit 0 |
656 | 132 | else | 119 | else |
657 | 133 | juju-log "IBM IM: Installation Manager Fix pack extracted successfully." | 120 | juju-log "IBM IM: Installation Manager Fix pack extracted successfully." |
658 | 134 | fi | 121 | fi |
659 | 135 | fi | 122 | fi |
660 | 136 | juju-log "IBM IM: IM upgrading start" | 123 | juju-log "IBM IM: IM upgrading start" |
661 | 137 | # Check IM package availability | 124 | # Check IM package availability |
662 | 138 | juju-log $CHARM_DIR/$ARCHIVE_DIR | 125 | juju-log $CHARM_DIR/$ARCHIVE_DIR |
663 | 139 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/FP/userinstc ]; | 126 | if [ -f $CHARM_DIR/$ARCHIVE_DIR/FP/userinstc ]; |
664 | 140 | then | 127 | then |
665 | 141 | 128 | ||
672 | 142 | juju-log "IBM IM: IM FP Packages available for installation." | 129 | juju-log "IBM IM: IM FP Packages available for installation." |
673 | 143 | cp $CHARM_DIR/$ARCHIVE_DIR/FP/install.xml $CHARM_DIR/$ARCHIVE_DIR/FP/silent_install.xml | 130 | cp $CHARM_DIR/$ARCHIVE_DIR/FP/install.xml $CHARM_DIR/$ARCHIVE_DIR/FP/silent_install.xml |
674 | 144 | sed -i "2 a \<profile kind='self' installLocation='$IM_INSTALL_PATH' id='IBM Installation Manager'>\n <data key='eclipseLocation' value='$IM_INSTALL_PATH' />\n</profile>" $CHARM_DIR/$ARCHIVE_DIR/FP/silent_install.xml | 131 | sed -i "2 a \<profile kind='self' installLocation='$IM_INSTALL_PATH' id='IBM Installation Manager'>\n <data key='eclipseLocation' value='$IM_INSTALL_PATH' />\n</profile>" $CHARM_DIR/$ARCHIVE_DIR/FP/silent_install.xml |
675 | 145 | if $CHARM_DIR/$ARCHIVE_DIR/FP/userinstc -input $CHARM_DIR/$ARCHIVE_DIR/FP/silent_install.xml -acceptlicense | 132 | if $CHARM_DIR/$ARCHIVE_DIR/FP/userinstc -input $CHARM_DIR/$ARCHIVE_DIR/FP/silent_install.xml -acceptlicense |
676 | 146 | then | 133 | then |
677 | 147 | set_state 'ibm-im.updated' | 134 | set_state 'ibm-im.updated' |
678 | 148 | 135 | ||
685 | 149 | status-set active "IBM IM: IM Is updated successfully" | 136 | status-set active "IBM IM: IM Is updated successfully" |
686 | 150 | else | 137 | else |
687 | 151 | juju-log "IBM IM: Error while updating IM" | 138 | juju-log "IBM IM: Error while updating IM" |
688 | 152 | exit 1 | 139 | exit 1 |
689 | 153 | fi | 140 | fi |
690 | 154 | fi | 141 | fi |
691 | 155 | 142 | ||
692 | 156 | else | 143 | else |
693 | 157 | juju-log "IBM_IM: Fix pack is not available to install, please provide the correct package" | 144 | juju-log "IBM_IM: Fix pack is not available to install, please provide the correct package" |
696 | 158 | status-set maintenance "IBM IM updating failed" | 145 | status-set maintenance "IBM IM updating failed" |
697 | 159 | exit 1 | 146 | exit 1 |
698 | 160 | fi | 147 | fi |
699 | 161 | 148 | ||
700 | 162 | } | 149 | } |
701 | 163 | 150 | ||
702 | 164 | @when 'config.changed.ibm_im_fp_package' | 151 | @when 'config.changed.ibm_im_fp_package' |
703 | 165 | function config-changed-ibm-im-fp(){ | 152 | function config-changed-ibm-im-fp(){ |
704 | 153 | rm -rf $CHARM_DIR/$ARCHIVE_DIR/FP | ||
705 | 166 | remove_state 'ibm-im.updated' | 154 | remove_state 'ibm-im.updated' |
707 | 167 | rm -rf $CHARM_DIR/$ARCHIVE_DIR/FP | 155 | |
708 | 168 | } | 156 | } |
709 | 169 | 157 | ||
710 | 170 | @when 'ibm-im.installed' | 158 | @when 'ibm-im.installed' |
711 | 171 | @when_not 'ibm-base.license.accepted' | 159 | @when_not 'ibm-base.license.accepted' |
712 | 172 | function uninstall() { | 160 | function uninstall() { |
714 | 173 | remove_im_software | 161 | juju-log "IBM IM: Removing IBM IM software." |
715 | 162 | /root/var/ibm/InstallationManager/uninstall/uninstallc | ||
716 | 163 | juju-log "IBM IM: Removed IBM IM software" | ||
717 | 174 | remove_state "ibm-im.installed" | 164 | remove_state "ibm-im.installed" |
718 | 175 | status-set blocked "IBM IM uninstalled" | 165 | status-set blocked "IBM IM uninstalled" |
719 | 176 | } | 166 | } |