├── .gitignore ├── .travis.yml ├── LICENSE ├── Makefile ├── README.md ├── archive ├── Dockerfile ├── README.md ├── get-liberty-plugin-config.sh ├── httpd-foreground ├── httpd.conf └── update-conf.sh ├── ilan ├── Dockerfile ├── README.md ├── build ├── build_all ├── ihsstart.sh ├── im │ └── Dockerfile ├── install_ihs ├── push_all └── versions.csv ├── production ├── Dockerfile.install ├── Dockerfile.prereq ├── Dockerfile.v9.prereq ├── README.md └── ihsstart.sh ├── static-topology ├── README.md ├── gen-plugin-cfg │ ├── Dockerfile │ ├── GenPluginCfg.sh │ ├── README.md │ └── com.ibm.ws.docker.jar ├── get-plugin-cfg │ ├── GetPluginCfg.sh │ └── README.md ├── merge-plugin-cfg │ ├── Dockerfile │ ├── README.md │ └── pluginCfgMerge.sh └── test │ ├── Dockerfile │ └── testMerge.sh └── test ├── README.md └── buildAndVerify.sh /.gitignore: -------------------------------------------------------------------------------- 1 | *.idea 2 | *.vscode 3 | *.log 4 | *.tar 5 | *.zip 6 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | sudo: required 2 | 3 | language: bash 4 | 5 | services: 6 | - docker 7 | 8 | script: 9 | - make test 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "{}" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright {yyyy} {name of copyright owner} 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: all test clean 2 | 3 | test: 4 | cd static-topology/test && ./testMerge.sh 5 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # IBM HTTP Server and Docker 2 | 3 | ## Support Statement 4 | 5 | This repository can still be used to build IBM HTTP Server (IHS) images, but these images are no longer being published to the 6 | [ibmcom](https://hub.docker.com/r/ibmcom/) Docker Hub registry. The `ibmcom/ibm-http-server` images are no longer 7 | published and have been removed. 8 | 9 | IHS is supported only when used in a way that is direct or otherwise necessary to support an IBM product (such as WebSphere Application Server) that includes it. 10 | Using IHS as a gateway to WebSphere (or any other IBM product) running in OpenShift (or any other Kubernetes platform) is NOT a supported configuration, since this platform 11 | provides this function intrinsically. For more details see https://publib.boulder.ibm.com/httpserv/ihsdiag/openshift.html 12 | 13 | ## Building the Images 14 | 15 | ### Archive Builds (IBM HTTP Server 9.0 and above only) 16 | 17 | This is the preferred method. 18 | 19 | Building the IHS image using an IHS archive is the simplest method as it does not require IM to be installed. The IHS 20 | archive also includes the WebSphere plugin files under the `plugin` directory. This is the recommended way to build the 21 | IHS image. Note that IHS archive requires entitlement. 22 | 23 | * [IBM HTTP Server Archive image](https://github.com/WASdev/ci.docker.ibm-http-server/tree/master/archive) 24 | 25 | ### Installation Manager Builds 26 | 27 | This method is deprecated. 28 | 29 | The ILAN and production images have a dependency on IBM Installation Manager in order to be built. We recommend building 30 | the IBM HTTP Server images from an archive instead since it requires you to collect a single small zip file instead of several large ones. 31 | 32 | * [IBM HTTP Server ILAN image](https://github.com/WASdev/ci.docker.ibm-http-server/tree/master/ilan) 33 | * [IBM HTTP Server Production image](https://github.com/WASdev/ci.docker.ibm-http-server/tree/master/production) 34 | -------------------------------------------------------------------------------- /archive/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM registry.access.redhat.com/ubi8/ubi 2 | 3 | LABEL maintainer="Hank W Ibell " 4 | 5 | ARG IHS_ARCHIVE_FILE 6 | 7 | RUN yum -y -q install unzip 8 | 9 | COPY $IHS_ARCHIVE_FILE /tmp/ 10 | 11 | RUN unzip -q -d /opt /tmp/$IHS_ARCHIVE_FILE 12 | RUN ln -s /opt/IHS/conf /conf 13 | RUN ln -s /opt/IHS/htdocs /htdocs 14 | RUN ln -s /opt/IHS/logs /logs 15 | RUN ln -s /opt/IHS/plugin /plugin 16 | COPY httpd-foreground update-conf.sh /opt/IHS/bin/ 17 | 18 | RUN /opt/IHS/postinstall.sh 19 | RUN /opt/IHS/bin/update-conf.sh 20 | 21 | EXPOSE 80 22 | CMD ["/opt/IHS/bin/httpd-foreground"] -------------------------------------------------------------------------------- /archive/README.md: -------------------------------------------------------------------------------- 1 | # Building an IBM HTTP Server Image from an IHS Archive 2 | 3 | The Dockerfile in the `archive` directory can be used to build an IBM HTTP Server (including the WebSphere plugin) image from 4 | a single zip. This method does not require IM to be installed. 5 | 6 | ## Getting the Archive 7 | 8 | Archive installs from IBM HTTP Server can be found on Fix Central. Links to the archives are also provided in each fix 9 | pack document. Downloading the IBM HTTP Server archive file requires entitlement. 10 | 11 | 1. Visit [Fix list for IBM HTTP Server Version 9.0](https://www.ibm.com/support/pages/node/617655) 12 | 2. Select the desired fix pack 13 | 3. Click the link for `Download Fix Pack ` 14 | 4. Go to the section `IBM HTTP Server and Web server Plug-ins *archive* packages` 15 | 5. Download the archive that matches the base image operating system and architecture 16 | 6. Place the image of your Docker context root. 17 | 18 | ## Building the Archive Image 19 | 20 | Run this command to build the archive image: 21 | 22 | ```command 23 | docker build -t name:tag --build-arg IHS_ARCHIVE_FILE= . 24 | ``` 25 | 26 | The Dockerfile will install IHS at `/opt/IHS`. 27 | 28 | ## Using the Archive Image 29 | 30 | You can either add your IHS configuration and keystores directly to the Dockerfile, or you can use a another Dockerfile 31 | and use the archive image as the base and then copy in your IHS files. 32 | 33 | ### Example IHS Dockerfile using Archive as the base image 34 | 35 | ```Dockerfile 36 | # Specify the image you built before using the archive 37 | FROM hwibell/ibm-http-server:9.0.5.7 38 | 39 | # Copy in your IHS keystore file 40 | COPY ihsserverkey.kdb /conf/ 41 | COPY ihsserverkey.sth /conf/ 42 | 43 | # Copy IHS config 44 | COPY httpd.conf /conf/ 45 | 46 | # Copy plugin config 47 | COPY plugin-cfg.xml /plugin/config/webserver1/ 48 | COPY key.p12 /tmp/ 49 | 50 | # Create plugin keystore and trust the Liberty certificate 51 | RUN openssl pkcs1I2 -in /tmp/key.p12 -out /tmp/ihs.crt -nokeys -password pass: 52 | RUN /opt/IHS/bin/gskcapicmd -keydb -create -db /plugin/config/webserver1/plugin-key.kdb -pw -stash 53 | RUN /opt/IHS/bin/gskcapicmd -cert -add -db /plugin/config/webserver1/plugin-key.kdb -stashed -file /tmp/ihs.crt 54 | ``` 55 | 56 | ## Getting the plugin from a local Liberty Container 57 | 58 | If you are running Liberty locally in Docker, the script `archive/get-liberty-plugin-config.sh` can be used to get the 59 | generated `plugin-cfg.xml` and keystore for Liberty. The above Dockerfile example includes commands to extract the 60 | Liberty certificate and add it to the plugin keystore. 61 | -------------------------------------------------------------------------------- /archive/get-liberty-plugin-config.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | if [ $# -lt 2 ]; then 4 | echo "USAGE: $0 " 5 | exit 0 6 | fi 7 | 8 | docker inspect "$1" | grep org.opencontainers.image.title | grep "Open Liberty" > /dev/null || { 9 | echo "Container '$1' does not look like an Open Liberty container" 10 | exit 1 11 | } 12 | 13 | docker cp $1:/opt/ol/wlp/output/defaultServer/logs/state/plugin-cfg.xml . || { 14 | echo "Unable to find plugin-cfg.xml. Check your server to make sure you have at least 1 application installed." 15 | exit 1 16 | } 17 | 18 | docker cp $1:/opt/ol/wlp/output/defaultServer/resources/security/key.p12 . || { 19 | echo "Unable to find key.p12. Check to make sure the security feature is enabled and properly configured." 20 | exit 1 21 | } 22 | 23 | SED_ARGS="-i -e" 24 | 25 | if [[ "$(uname -s)" == "Darwin" ]]; then 26 | SED_ARGS="-i.tmp" 27 | fi 28 | 29 | # Substitute port information 30 | port_regex='([0-9]+)/tcp -> .*:([0-9]+)' 31 | docker port $1 | while read line ; do 32 | if [[ "$line" =~ $port_regex ]]; then 33 | CONTAINER_PORT="${BASH_REMATCH[1]}" 34 | HOST_PORT="${BASH_REMATCH[2]}" 35 | sed "${SED_ARGS}" "s/Port=\"${CONTAINER_PORT}\"/Port=\"${HOST_PORT}\"/g" plugin-cfg.xml 36 | else 37 | echo "ERROR: Unable to match port information against regex: '$line'" 38 | fi 39 | done 40 | 41 | # Substitute hostname 42 | sed "${SED_ARGS}" "s/Hostname=\"[^\"]*\"/Hostname=\"$2\"/g" plugin-cfg.xml 43 | sed "${SED_ARGS}" "s/LogLevel=\"Error\"/LogLevel=\"Trace\"/g" plugin-cfg.xml 44 | 45 | # Update plugin root path 46 | sed "${SED_ARGS}" "s#/opt/IBM/WebSphere/Plugins#/opt/IHS/plugin#g" plugin-cfg.xml 47 | 48 | # Clean up temporary file generated by sed 49 | if [[ "$(uname -s)" == "Darwin" ]]; then 50 | rm -f plugin-cfg.xml.tmp 51 | fi -------------------------------------------------------------------------------- /archive/httpd-foreground: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | set -e 3 | 4 | # Apache gets grumpy about PID files pre-existing 5 | rm -f /opt/IHS/logs/httpd.pid 6 | 7 | if [ -f /opt/IHS/bin/envvars ]; then 8 | . /opt/IHS/bin/envvars 9 | fi 10 | 11 | exec /opt/IHS/bin/httpd -d /opt/IHS -DFOREGROUND "$@" -------------------------------------------------------------------------------- /archive/httpd.conf: -------------------------------------------------------------------------------- 1 | # 2 | # This is the main IBM HTTP server configuration file. It contains the 3 | # configuration directives that give the server its instructions. 4 | # See for detailed 5 | # information about the Apache directives. 6 | # 7 | # The instructions provided in this configuration file are only hints or 8 | # reminders. Consult the online docs for definitive information. 9 | # 10 | # You are strongly encourated to start with the default configuration 11 | # and append your changes to the problem wherever possible, rather than 12 | # changeing it in-line. 13 | # 14 | # The configuration directives are grouped into three basic sections: 15 | # 1. Directives that control the operation of the web server process as a 16 | # whole (the 'global environment'). 17 | # 2. Directives that define the parameters of the 'main' or 'default' server, 18 | # which responds to requests that aren't handled by a virtual host. 19 | # These directives also provide default values for the settings 20 | # of all virtual hosts. 21 | # 3. Settings for virtual hosts, which allow Web requests to be sent to 22 | # different IP addresses or hostnames and have them handled by the 23 | # same web server process. 24 | # 25 | # Configuration and logfile names: If the filenames you specify for many 26 | # of the server's control files begin with "/" (or "drive:/" for Win32), the 27 | # server will use that explicit path. If the filenames do *not* begin 28 | # with "/", the value of ServerRoot is prepended -- so "logs/foo.log" 29 | # with ServerRoot set to "/opt/IHS" will be interpreted by the 30 | # server as "/opt/IHS/logs/foo.log". 31 | # 32 | 33 | ### Section 1: Global Environment 34 | # 35 | # The directives in this section affect the overall operation of IBM HTTP 36 | # Server, such as the number of concurrent requests it can handle or where 37 | # it can find its configuration files. 38 | # 39 | 40 | # 41 | # ServerRoot: The top of the directory tree under which the server's 42 | # configuration, error, and log files are kept. 43 | # 44 | # Do NOT add a slash at the end of the directory path. 45 | # 46 | ServerRoot "/opt/IHS" 47 | 48 | # 49 | # The accept serialization lock file MUST BE STORED ON A LOCAL DISK. 50 | # 51 | #LockFile logs/accept.lock 52 | 53 | # 54 | # PidFile: The file in which the server should record its process 55 | # identification number when it starts. 56 | # 57 | PidFile logs/httpd.pid 58 | 59 | # 60 | # Timeout: The number of seconds before receives and sends time out. 61 | # 62 | Timeout 60 63 | 64 | LoadModule reqtimeout_module modules/mod_reqtimeout.so 65 | 66 | RequestReadTimeout header=20-40,MinRate=500 body=20,MinRate=500 67 | 68 | 69 | # 70 | # KeepAlive: Whether or not to allow persistent connections (more than 71 | # one request per connection). Set to "Off" to deactivate. 72 | # 73 | KeepAlive On 74 | 75 | # 76 | # MaxKeepAliveRequests: The maximum number of requests to allow 77 | # during a persistent connection. Set to 0 to allow an unlimited amount. 78 | # We recommend you leave this number high, for maximum performance. 79 | # 80 | MaxKeepAliveRequests 100 81 | 82 | # 83 | # KeepAliveTimeout: Number of seconds to wait for the next request from the 84 | # same client on the same connection. 85 | # 86 | KeepAliveTimeout 5 87 | 88 | ## 89 | ## Server-Pool Size Regulation (MPM specific) 90 | ## 91 | 92 | 93 | LoadModule mpm_event_module modules/mod_mpm_event.so 94 | #LoadModule mpm_worker_module modules/mod_mpm_worker.so 95 | 96 | # 97 | # Listen: Allows you to bind the web server to specific IP addresses 98 | # and/or ports, in addition to the default. See also the 99 | # directive. 100 | # 101 | # Change this to Listen on specific IP addresses as shown below to 102 | # prevent the web server from accepting connections on all interfaces 103 | # (0.0.0.0) 104 | # 105 | # Change this to "Listen 0.0.0.0:port" to restrict the server to 106 | # IPv4. 107 | # 108 | #Listen 12.34.56.78:80 109 | Listen 80 110 | 111 | # 112 | # Dynamic Shared Object (DSO) Support 113 | # 114 | # To be able to use the functionality of a module which was built as a DSO you 115 | # have to place corresponding `LoadModule' lines at this location so the 116 | # directives contained in it are actually available _before_ they are used. 117 | # Statically compiled modules (those listed by `httpd -l') do not need 118 | # to be loaded here. 119 | # 120 | # Example: 121 | # LoadModule foo_module modules/mod_foo.so 122 | LoadModule unixd_module modules/mod_unixd.so 123 | LoadModule authz_host_module modules/mod_authz_host.so 124 | LoadModule authz_core_module modules/mod_authz_core.so 125 | LoadModule authn_core_module modules/mod_authn_core.so 126 | LoadModule auth_basic_module modules/mod_auth_basic.so 127 | LoadModule authn_file_module modules/mod_authn_file.so 128 | LoadModule authz_user_module modules/mod_authz_user.so 129 | #LoadModule authn_cert_module modules/mod_authn_cert.so 130 | #LoadModule ldap_module modules/mod_ldap.so 131 | #LoadModule authnz_ldap_module modules/mod_authnz_ldap.so 132 | 133 | #LoadModule authz_groupfile_module modules/mod_authz_groupfile.so 134 | LoadModule include_module modules/mod_include.so 135 | LoadModule log_config_module modules/mod_log_config.so 136 | LoadModule env_module modules/mod_env.so 137 | #LoadModule expires_module modules/mod_expires.so 138 | LoadModule headers_module modules/mod_headers.so 139 | LoadModule unique_id_module modules/mod_unique_id.so 140 | LoadModule setenvif_module modules/mod_setenvif.so 141 | #LoadModule proxy_module modules/mod_proxy.so 142 | #LoadModule proxy_connect_module modules/mod_proxy_connect.so 143 | #LoadModule proxy_ftp_module modules/mod_proxy_ftp.so 144 | #LoadModule proxy_http_module modules/mod_proxy_http.so 145 | LoadModule mime_module modules/mod_mime.so 146 | #LoadModule dav_module modules/mod_dav.so 147 | #LoadModule dav_fs_module modules/mod_dav_fs.so 148 | LoadModule autoindex_module modules/mod_autoindex.so 149 | #LoadModule asis_module modules/mod_asis.so 150 | #LoadModule info_module modules/mod_info.so 151 | LoadModule cgid_module modules/mod_cgid.so 152 | LoadModule dir_module modules/mod_dir.so 153 | LoadModule actions_module modules/mod_actions.so 154 | #LoadModule speling_module modules/mod_speling.so 155 | #LoadModule userdir_module modules/mod_userdir.so 156 | LoadModule alias_module modules/mod_alias.so 157 | #LoadModule rewrite_module modules/mod_rewrite.so 158 | #LoadModule deflate_module modules/mod_deflate.so 159 | 160 | #LoadModule cache_module modules/mod_cache.so 161 | #LoadModule cache_disk_module modules/mod_cache_disk.so 162 | 163 | #LoadModule filter_module modules/mod_filter.so 164 | #LoadModule lua_module modules/mod_lua.so 165 | #LoadModule substitute_module modules/mod_substitute.so 166 | 167 | 168 | # 169 | # ExtendedStatus controls whether the web server will generate "full" 170 | # status information (ExtendedStatus On) or just basic information 171 | # (ExtendedStatus Off) when the server status page is formatted or 172 | # when IBM HTTP Server diagnostic modules report information. The 173 | # default is Off. 174 | # 175 | LoadModule status_module modules/mod_status.so 176 | 177 | ExtendedStatus On 178 | 179 | 180 | ### Section 2: 'Main' server configuration 181 | # 182 | # The directives in this section set up the values used by the 'main' 183 | # server, which responds to any requests that aren't handled by a 184 | # definition. These values also provide defaults for 185 | # any containers you may define later in the file. 186 | # 187 | # All of these directives may appear inside containers, 188 | # in which case these default settings will be overridden for the 189 | # virtual host being defined. 190 | # 191 | 192 | # 193 | # If you wish httpd to run as a different user or group, you must run 194 | # httpd as root initially and it will switch. 195 | # 196 | User nobody 197 | Group nobody 198 | 199 | # 200 | # ServerAdmin: Your address, where problems with the server should be 201 | # e-mailed. This address appears on some server-generated pages, such 202 | # as error documents. e.g. admin@your-domain.com 203 | # 204 | ServerAdmin you@your.address 205 | 206 | # 207 | # ServerName gives the name and port that the server uses to identify itself. 208 | # This can often be determined automatically, but we recommend you specify 209 | # it explicitly to prevent problems during startup. 210 | # 211 | # If this is not set to valid DNS name for your host, server-generated 212 | # redirections will not work. See also the UseCanonicalName directive. 213 | # 214 | # If your host doesn't have a registered DNS name, enter its IP address here. 215 | # You will have to access it by its address anyway, and this will make 216 | # redirections work in a sensible way. 217 | # 218 | ServerName 127.0.0.1 219 | 220 | # 221 | # UseCanonicalName: Determines how the web server constructs self- 222 | # referencing URLs and the SERVER_NAME and SERVER_PORT variables. 223 | # When set "Off", the web server will use the Hostname and Port supplied 224 | # by the client. When set "On", it will use the value of the ServerName 225 | # directive. 226 | # 227 | UseCanonicalName Off 228 | 229 | # 230 | # DocumentRoot: The directory out of which you will serve your 231 | # documents. By default, all requests are taken from this directory, but 232 | # symbolic links and aliases may be used to point to other locations. 233 | # 234 | DocumentRoot "/opt/IHS/htdocs" 235 | 236 | # 237 | # Each directory to which the web server has access can be configured 238 | # with respect to which services and features are allowed and/or disabled 239 | # in that directory (and its subdirectories). 240 | # 241 | # First, we configure the "default" to be a very restrictive set of 242 | # features. 243 | # 244 | 245 | Options FollowSymLinks 246 | AllowOverride None 247 | FileETag All -INode 248 | Require all denied 249 | 250 | 251 | # 252 | # Note that from this point forward you must specifically allow 253 | # particular features to be enabled - so if something's not working as 254 | # you might expect, make sure that you have specifically enabled it 255 | # below. 256 | # 257 | 258 | # 259 | # This should be changed to whatever you set DocumentRoot to. 260 | # 261 | 262 | 263 | # 264 | # Possible values for the Options directive are "None", "All", 265 | # or any combination of: 266 | # Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI Multiviews 267 | # 268 | # Note that "MultiViews" must be named *explicitly* --- "Options All" 269 | # doesn't give it to you. 270 | # 271 | # The Options directive is both complicated and important. Please see 272 | # http://publib.boulder.ibm.com/httpserv/manual24/mod/core.html#options 273 | # for more information. 274 | # 275 | Options FollowSymLinks 276 | 277 | # 278 | # AllowOverride controls what directives may be placed in .htaccess files. 279 | # It can be "All", "None", or any combination of the keywords: 280 | # Options FileInfo AuthConfig Limit 281 | # 282 | AllowOverride None 283 | 284 | # 285 | # Controls who can get stuff from this server. 286 | # 287 | 288 | Require all granted 289 | 290 | 291 | # 292 | # UserDir: The name of the directory that is appended onto a user's home 293 | # directory if a ~user request is received. 294 | # 295 | 296 | UserDir public_html 297 | 298 | # 299 | # Control access to UserDir directories. The following is an example 300 | # for a site where these directories are restricted to read-only. 301 | # 302 | # 303 | # AllowOverride FileInfo AuthConfig Limit Indexes 304 | # Options MultiViews Indexes SymLinksIfOwnerMatch IncludesNoExec 305 | # 306 | # Require all granted 307 | # 308 | # 309 | # Reqire all denied 310 | # 311 | # 312 | 313 | 314 | # 315 | # DirectoryIndex: sets the file that the web server will serve if a 316 | # directory is requested. 317 | # 318 | # The index.html.var file (a type-map) is used to deliver content- 319 | # negotiated documents. The MultiViews Option can be used for the 320 | # same purpose, but it is much slower. 321 | # 322 | DirectoryIndex index.html index.html.var 323 | 324 | # Use welcome page of index_ihs.html by default in the shipped documentroot 325 | 326 | DirectoryIndex index.html index.html.var index_ihs.html 327 | 328 | 329 | # 330 | # AccessFileName: The name of the file to look for in each directory 331 | # for additional configuration directives. See also the AllowOverride 332 | # directive. 333 | # 334 | AccessFileName .htaccess 335 | 336 | # 337 | # The following lines prevent .htaccess and .htpasswd files from being 338 | # viewed by Web clients. 339 | # 340 | 341 | Require all denied 342 | Forbid 343 | 344 | 345 | # 346 | # TypesConfig describes where the mime.types file (or equivalent) is 347 | # to be found. 348 | # 349 | TypesConfig conf/mime.types 350 | 351 | # 352 | # HostnameLookups: Log the names of clients or just their IP addresses 353 | # e.g., www.apache.org (on) or 204.62.129.132 (off). 354 | # The default is off because it'd be overall better for the net if people 355 | # had to knowingly turn this feature on, since enabling it means that 356 | # each client request will result in AT LEAST one lookup request to the 357 | # nameserver. 358 | # 359 | HostnameLookups Off 360 | 361 | # 362 | # EnableMMAP: Control whether memory-mapping is used to deliver 363 | # files (assuming that the underlying OS supports it). 364 | # The default is on; turn this off if you serve from NFS-mounted 365 | # filesystems. On some systems, turning it off (regardless of 366 | # filesystem) can improve performance; for details, please see 367 | # http://publib.boulder.ibm.com/httpserv/manual24/mod/core.html#enablemmap 368 | # 369 | # EnableMMAP off 370 | 371 | # 372 | # EnableSendfile: Control whether the sendfile kernel support is 373 | # used to deliver files (assuming that the OS supports it). 374 | # The default is on; turn this off if you serve from NFS-mounted 375 | # filesystems. Please see 376 | # http://publib.boulder.ibm.com/httpserv/manual24/mod/core.html#enablesendfile 377 | # 378 | EnableSendfile off 379 | 380 | # 381 | # ErrorLog: The location of the error log file. 382 | # If you do not specify an ErrorLog directive within a 383 | # container, error messages relating to that virtual host will be 384 | # logged here. If you *do* define an error logfile for a 385 | # container, that host's errors will be logged there and not here. 386 | # 387 | ErrorLog /dev/stderr 388 | 389 | # 390 | # LogLevel: Control the number of messages logged to the error log. 391 | # Possible values include: debug, info, notice, warn, error, crit, 392 | # alert, emerg. 393 | # 394 | LogLevel trace8 395 | 396 | # 397 | # The following directives define some format nicknames for use with 398 | # a CustomLog directive (see below). "common" and "combined" include 399 | # IHS extensions. 400 | # 401 | 402 | LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %D \"%{WAS}e\" %X" combined 403 | LogFormat "%h %l %u %t \"%r\" %>s %b %D \"%{WAS}e\" %X" common 404 | LogFormat "%{Referer}i -> %U" referer 405 | LogFormat "%{User-agent}i" agent 406 | 407 | # 408 | # The location and format of the access logfile (Common Logfile Format). 409 | # If you do not define any access logfiles within a 410 | # container, they will be logged here. Contrariwise, if you *do* 411 | # define per- access logfiles, transactions will be 412 | # logged therein and *not* in this file. 413 | # 414 | CustomLog /dev/stdout common 415 | 416 | # 417 | # If you would like to have agent and referer logfiles, uncomment the 418 | # following directives. 419 | # 420 | #CustomLog logs/referer_log referer 421 | #CustomLog logs/agent_log agent 422 | 423 | # 424 | # If you prefer a single logfile with access, agent, and referer information 425 | # (Combined Logfile Format) you can use the following directive. 426 | # 427 | #CustomLog logs/access_log combined 428 | 429 | # 430 | # AddServerHeader 431 | # This directive provides a means to enable or disable ServerHeader values. 432 | # The internal default value has been "Off" since PM77980. 433 | # This provides a server header according to the 434 | # values specified in the ServerTokens and ServerSignature directives. 435 | # Setting this directive to "Off" results in no server header information 436 | # being returned to clients. 437 | # Set to one of: On | Off 438 | # 439 | #AddServerHeader On 440 | 441 | # 442 | # ServerTokens 443 | # This directive configures what you return as the Server HTTP response 444 | # Header. The built-in default is 'Full' which sends information about 445 | # the OS-type and compiled in modules. The recommended value is 'Prod' 446 | # which sends the least information. 447 | # Set to one of: Full | OS | Minor | Minimal | Major | Prod 448 | # where Full conveys the most information, and Prod the least. 449 | # 450 | ServerTokens Prod 451 | 452 | # 453 | # Optionally add a line containing the server version and virtual host 454 | # name to server-generated pages (internal error documents, FTP directory 455 | # listings, mod_status and mod_info output etc., but not CGI generated 456 | # documents or custom error documents). 457 | # Set to "EMail" to also include a mailto: link to the ServerAdmin. 458 | # Set to one of: On | Off | EMail 459 | # 460 | #ServerSignature On 461 | 462 | # 463 | # Aliases: Add here as many aliases as you need (with no limit). The format is 464 | # Alias fakename realname 465 | # 466 | # Note that if you include a trailing / on fakename then the server will 467 | # require it to be present in the URL. So "/icons" isn't aliased in this 468 | # example, only "/icons/". If the fakename is slash-terminated, then the 469 | # realname must also be slash terminated, and if the fakename omits the 470 | # trailing slash, the realname must also omit it. 471 | # 472 | # We include the /icons/ alias for FancyIndexed directory listings. If you 473 | # do not use FancyIndexing, you may comment this out. 474 | # 475 | Alias /icons/ "/opt/IHS/icons/" 476 | 477 | 478 | Options MultiViews 479 | AllowOverride None 480 | Require all granted 481 | 482 | 483 | # 484 | # ScriptAlias: This controls which directories contain server scripts. 485 | # ScriptAliases are essentially the same as Aliases, except that 486 | # documents in the realname directory are treated as applications and 487 | # run by the server when requested rather than as documents sent to the client. 488 | # The same rules about trailing "/" apply to ScriptAlias directives as to 489 | # Alias. 490 | # 491 | ScriptAlias /cgi-bin/ "/opt/IHS/cgi-bin/" 492 | 493 | 494 | # 495 | # Additional to mod_cgid.c settings, mod_cgid has Scriptsock 496 | # for setting UNIX socket for communicating with cgid. 497 | # 498 | #Scriptsock logs/cgisock 499 | 500 | 501 | # 502 | # "/opt/IHS/cgi-bin" should be changed to whatever your ScriptAliased 503 | # CGI directory exists, if you have that configured. 504 | # 505 | 506 | AllowOverride None 507 | Options None 508 | Require all granted 509 | 510 | 511 | # 512 | # Redirect allows you to tell clients about documents which used to exist in 513 | # your server's namespace, but do not anymore. This allows you to tell the 514 | # clients where to look for the relocated document. 515 | # Example: 516 | # Redirect permanent /foo http://www.example.com/bar 517 | 518 | # 519 | # Directives controlling the display of server-generated directory listings. 520 | # 521 | 522 | # 523 | # IndexOptions: Controls the appearance of server-generated directory 524 | # listings. 525 | # 526 | IndexOptions FancyIndexing VersionSort 527 | 528 | # 529 | # AddIcon* directives tell the server which icon to show for different 530 | # files or filename extensions. These are only displayed for 531 | # FancyIndexed directories. 532 | # 533 | AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip 534 | 535 | AddIconByType (TXT,/icons/text.gif) text/* 536 | AddIconByType (IMG,/icons/image2.gif) image/* 537 | AddIconByType (SND,/icons/sound2.gif) audio/* 538 | AddIconByType (VID,/icons/movie.gif) video/* 539 | 540 | AddIcon /icons/binary.gif .bin .exe 541 | AddIcon /icons/binhex.gif .hqx 542 | AddIcon /icons/tar.gif .tar 543 | AddIcon /icons/world2.gif .wrl .wrl.gz .vrml .vrm .iv 544 | AddIcon /icons/compressed.gif .Z .z .tgz .gz .zip 545 | AddIcon /icons/a.gif .ps .ai .eps 546 | AddIcon /icons/layout.gif .html .shtml .htm .pdf 547 | AddIcon /icons/text.gif .txt 548 | AddIcon /icons/c.gif .c 549 | AddIcon /icons/p.gif .pl .py 550 | AddIcon /icons/f.gif .for 551 | AddIcon /icons/dvi.gif .dvi 552 | AddIcon /icons/uuencoded.gif .uu 553 | AddIcon /icons/script.gif .conf .sh .shar .csh .ksh .tcl 554 | AddIcon /icons/tex.gif .tex 555 | AddIcon /icons/bomb.gif core 556 | 557 | AddIcon /icons/back.gif .. 558 | AddIcon /icons/hand.right.gif README 559 | AddIcon /icons/folder.gif ^^DIRECTORY^^ 560 | AddIcon /icons/blank.gif ^^BLANKICON^^ 561 | 562 | # 563 | # DefaultIcon is which icon to show for files which do not have an icon 564 | # explicitly set. 565 | # 566 | DefaultIcon /icons/unknown.gif 567 | 568 | # 569 | # AddDescription allows you to place a short description after a file in 570 | # server-generated indexes. These are only displayed for FancyIndexed 571 | # directories. 572 | # Format: AddDescription "description" filename 573 | # 574 | #AddDescription "GZIP compressed document" .gz 575 | #AddDescription "tar archive" .tar 576 | #AddDescription "GZIP compressed tar archive" .tgz 577 | 578 | # 579 | # ReadmeName is the name of the README file the server will look for by 580 | # default, and append to directory listings. 581 | # 582 | # HeaderName is the name of a file which should be prepended to 583 | # directory indexes. 584 | ReadmeName README.html 585 | HeaderName HEADER.html 586 | 587 | # 588 | # IndexIgnore is a set of filenames which directory indexing should ignore 589 | # and not include in the listing. Shell-style wildcarding is permitted. 590 | # 591 | IndexIgnore .??* *~ *# HEADER* README* RCS CVS *,v *,t 592 | 593 | # 594 | # AddEncoding allows you to have certain browsers (Mosaic/X 2.1+) uncompress 595 | # information on the fly. Note: Not all browsers support this. 596 | # Despite the name similarity, the following Add* directives have nothing 597 | # to do with the FancyIndexing customization directives above. 598 | # 599 | AddEncoding x-compress Z 600 | AddEncoding x-gzip gz tgz 601 | 602 | # 603 | # AddType allows you to add to or override the MIME configuration 604 | # file mime.types for specific file types. 605 | # 606 | AddType application/x-tar .tgz 607 | AddType image/x-icon .ico 608 | 609 | # 610 | # AddHandler allows you to map certain file extensions to "handlers": 611 | # actions unrelated to filetype. These can be either built into the server 612 | # or added with the Action directive (see below) 613 | # 614 | # To use CGI scripts outside of ScriptAliased directories: 615 | # (You will also need to add "ExecCGI" to the "Options" directive.) 616 | # 617 | #AddHandler cgi-script .cgi 618 | 619 | # 620 | # For files that include their own HTTP headers: 621 | # 622 | #AddHandler send-as-is asis 623 | 624 | # 625 | # For server-parsed imagemap files: 626 | # 627 | #AddHandler imap-file map 628 | 629 | # 630 | # For type maps (negotiated resources): 631 | # 632 | #AddHandler type-map var 633 | 634 | # 635 | # Filters allow you to process content before it is sent to the client. 636 | # 637 | # To parse .shtml files for server-side includes (SSI): 638 | # (You will also need to add "Includes" to the "Options" directive.) 639 | # 640 | #AddType text/html .shtml 641 | #AddOutputFilter INCLUDES .shtml 642 | 643 | # 644 | # Action lets you define media types that will execute a script whenever 645 | # a matching file is called. This eliminates the need for repeated URL 646 | # pathnames for oft-used CGI file processors. 647 | # Format: Action media/type /cgi-script/location 648 | # Format: Action handler-name /cgi-script/location 649 | # 650 | 651 | # 652 | # Customizable error responses come in three flavors: 653 | # 1) plain text 2) local redirects 3) external redirects 654 | # 655 | # Some examples: 656 | #ErrorDocument 500 "The server made a boo boo." 657 | #ErrorDocument 404 /missing.html 658 | #ErrorDocument 404 "/cgi-bin/missing_handler.pl" 659 | #ErrorDocument 402 http://www.example.com/subscription_info.html 660 | # 661 | 662 | # 663 | # Putting this all together, we can internationalize error responses. 664 | # 665 | # We use Alias to redirect any /error/HTTP_.html.var response to 666 | # our collection of by-error message multi-language collections. We use 667 | # includes to substitute the appropriate text. 668 | # 669 | # You can modify the messages' appearance without changing any of the 670 | # default HTTP_.html.var files by adding the line: 671 | # 672 | # Alias /error/include/ "/your/include/path/" 673 | # 674 | # which allows you to create your own set of files by starting with the 675 | # /opt/IHS/error/include/ files and copying them to /your/include/path/, 676 | # even on a per-VirtualHost basis. The default include files will display 677 | # your IBM HTTP Server version number and your ServerAdmin email address 678 | # regardless of the setting of ServerSignature. 679 | # 680 | # The internationalized error documents require mod_alias, mod_include 681 | # and mod_negotiation. To activate them, uncomment the following 30 lines. 682 | 683 | # Alias /error/ "/opt/IHS/error/" 684 | # 685 | # 686 | # AllowOverride None 687 | # Options IncludesNoExec 688 | # AddOutputFilter Includes html 689 | # AddHandler type-map var 690 | # Require all granted 691 | # LanguagePriority en de es fr it nl sv 692 | # ForceLanguagePriority Prefer Fallback 693 | # 694 | # 695 | # ErrorDocument 400 /error/HTTP_BAD_REQUEST.html.var 696 | # ErrorDocument 401 /error/HTTP_UNAUTHORIZED.html.var 697 | # ErrorDocument 403 /error/HTTP_FORBIDDEN.html.var 698 | # ErrorDocument 404 /error/HTTP_NOT_FOUND.html.var 699 | # ErrorDocument 405 /error/HTTP_METHOD_NOT_ALLOWED.html.var 700 | # ErrorDocument 408 /error/HTTP_REQUEST_TIME_OUT.html.var 701 | # ErrorDocument 410 /error/HTTP_GONE.html.var 702 | # ErrorDocument 411 /error/HTTP_LENGTH_REQUIRED.html.var 703 | # ErrorDocument 412 /error/HTTP_PRECONDITION_FAILED.html.var 704 | # ErrorDocument 413 /error/HTTP_REQUEST_ENTITY_TOO_LARGE.html.var 705 | # ErrorDocument 414 /error/HTTP_REQUEST_URI_TOO_LARGE.html.var 706 | # ErrorDocument 415 /error/HTTP_SERVICE_UNAVAILABLE.html.var 707 | # ErrorDocument 500 /error/HTTP_INTERNAL_SERVER_ERROR.html.var 708 | # ErrorDocument 501 /error/HTTP_NOT_IMPLEMENTED.html.var 709 | # ErrorDocument 502 /error/HTTP_BAD_GATEWAY.html.var 710 | # ErrorDocument 503 /error/HTTP_SERVICE_UNAVAILABLE.html.var 711 | # ErrorDocument 506 /error/HTTP_VARIANT_ALSO_VARIES.html.var 712 | 713 | # 714 | # The following directives modify normal HTTP response behavior to 715 | # handle known problems with browser implementations. 716 | # 717 | BrowserMatch "Mozilla/2" nokeepalive 718 | BrowserMatch "MSIE 4\.0b2;" nokeepalive downgrade-1.0 force-response-1.0 719 | BrowserMatch "RealPlayer 4\.0" force-response-1.0 720 | BrowserMatch "Java/1\.0" force-response-1.0 721 | BrowserMatch "JDK/1\.0" force-response-1.0 722 | 723 | # 724 | # The following directive disables redirects on non-GET requests for 725 | # a directory that does not include the trailing slash. This fixes a 726 | # problem with Microsoft WebFolders which does not appropriately handle 727 | # redirects for folders with DAV methods. 728 | # Same deal with Apple's DAV filesystem and Gnome VFS support for DAV. 729 | # 730 | BrowserMatch "Microsoft Data Access Internet Publishing Provider" redirect-carefully 731 | BrowserMatch "^WebDrive" redirect-carefully 732 | BrowserMatch "^WebDAVFS/1.[012]" redirect-carefully 733 | BrowserMatch "^gnome-vfs" redirect-carefully 734 | 735 | # 736 | # Allow server status reports generated by mod_status, 737 | # with the URL of http://servername/server-status 738 | # Change the ".example.com" to match your domain to enable. 739 | # 740 | 741 | 742 | SetHandler server-status 743 | Require all denied 744 | # To allow access from a specific IP: 745 | # Require ip 192.168.1 746 | 747 | 748 | 749 | # 750 | # Allow remote server configuration reports, with the URL of 751 | # http://servername/server-info (requires that mod_info.c be loaded). 752 | # Change the ".example.com" to match your domain to enable. 753 | # 754 | # 755 | # SetHandler server-info 756 | # Require all denied 757 | # To allow access from a specific IP: 758 | # Require ip 192.168.1 759 | # 760 | 761 | # 762 | # Enable IBM HTTP Server diagnostic features. 763 | # 764 | # CoreDumpDirectory directory: Sets the location where the server will 765 | # attempt to put a core dump. The child processes running as 'User' 766 | # (see User config directive above) must have permission to write to 767 | # this directive. The filesystem will have to be large enough to hold 768 | # potentially large core files. 769 | # 770 | # The /tmp directory is often sufficient. 771 | # 772 | #CoreDumpDirectory /tmp 773 | 774 | # mod_mpmstats logs statistics about server activity to the main 775 | # error log. No records are written while the server is idle. 776 | LoadModule mpmstats_module modules/debug/mod_mpmstats.so 777 | 778 | # Write a record every 5 minutes (if server isn't idle). 779 | # Recommendation: Lower this interval to 60 seconds, which will 780 | # result in the error log growing faster but with more accurate 781 | # information about server load. 782 | ReportInterval 300 783 | # Include details of active module in the statistics. 784 | TrackModules On 785 | # Allow individual modules to be tracked 786 | TrackHooks allhooks 787 | 788 | # Threshold for reporting on a thread as long-running in the mpmstats report. 789 | SlowThreshold 60 790 | 791 | # Log a message and module name when a phase takes more than SlowThresdhold seconds 792 | TrackHooksOptions logslow 793 | 794 | 795 | # EnableExceptionHook allows modules such as mod_backtrace and 796 | # mod_whatkilledus to run after a crash and gather additional 797 | # diagnostic information. 798 | # EnableExceptionHook must be "on" in order to use mod_backtrace or 799 | # mod_whatkilledus. 800 | EnableExceptionHook On 801 | 802 | # mod_backtrace will record a backtrace of the crashing thread to the 803 | # error log at the time of a crash. This is important information for 804 | # diagnosing the cause of the crash. 805 | LoadModule backtrace_module modules/debug/mod_backtrace.so 806 | 807 | # mod_whatkilledus will record information about the current request 808 | # and connection to the error log at the time of a crash. This is 809 | # important information for diagnosing the cause of the crash. 810 | LoadModule whatkilledus_module modules/debug/mod_whatkilledus.so 811 | 812 | # mod_net_trace will record actual data sent/received from the client 813 | # and on proxy connections, even for SSL connections. Unlike an IP 814 | # trace, interaction with the platform network APIs can be seen. 815 | # The following example configuration can be activated by uncommenting 816 | # the LoadModule directive. 817 | #LoadModule net_trace_module modules/debug/mod_net_trace.so 818 | 819 | NetTraceFile /tmp/nettrace 820 | NetTrace client * dest file event senddata=65535 event recvdata=65535 event misccalls 821 | 822 | 823 | # ThreadLimit: maximum setting of ThreadsPerChild 824 | # ServerLimit: maximum setting of StartServers 825 | # StartServers: initial number of server processes to start 826 | # MaxClients: maximum number of simultaneous client connections 827 | # MinSpareThreads: minimum number of worker threads which are kept spare 828 | # MaxSpareThreads: maximum number of worker threads which are kept spare 829 | # ThreadsPerChild: constant number of worker threads in each server process 830 | # MaxRequestsPerChild: maximum number of requests a server process serves 831 | ThreadLimit 100 832 | # After 9.0.0.3, it's important for the event MPM to have some slack space for ServerLimit 833 | ServerLimit 18 834 | StartServers 1 835 | MaxClients 1200 836 | MinSpareThreads 50 837 | # PI74200: When using the event MPM, discourage process termination during runtime. 838 | MaxSpareThreads 600 839 | ThreadsPerChild 100 840 | MaxRequestsPerChild 0 841 | MaxMemFree 2048 842 | 843 | 844 | # Example SSL configuration 845 | # To enable this support: 846 | # 1) Create a key database with ikeyman or bin/gskcapicmd 847 | # 2) Update the KeyFile directive below to point to that key database 848 | # 3) Uncomment the directives up through the end of the example 849 | # 850 | 851 | LoadModule ibm_ssl_module modules/mod_ibm_ssl.so 852 | Listen 443 853 | SSLCheckCertificateExpiration 30 854 | 855 | SSLEnable 856 | Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" 857 | 858 | KeyFile /opt/IHS/conf/ihsserverkey.kdb 859 | 860 | 861 | # End of example SSL configuration 862 | 863 | # Diagnostic log files, uncomment to enable. 864 | 865 | # GlobalLog logs/deflate-debug.log "%h %l %u %t \"%r\" %>s %b %D %{RH}e %{WAS}e %{Accept-Encoding}i %{Content-Type}o %{Content-Encoding}o %{Via}i %{no-gzip}e %{remote}p" 866 | # GlobalLog logs/ssl-debug.log "%h %l %u %t \"%r\" %>s %b %D %{RH}e %{WAS}e %{HTTPS}e %{HTTPS_CIPHER}e %{SSL_PROTOCOL_VERSION}e %{SSL_CLIENT_DN}e %{SSL_HANDSHAKE}e %{SSL_TLS_SNI}e %{SSL_HANDSHAKE_TIME}e %{remote}p" 867 | # GlobalLog logs/cache-debug.log "%h %l %u %t \"%r\" %>s %b %D %{RH}e %{WAS}e %{Age}o %{Cache-Control}i %{Last-Modified}o %{Etag}o %{If-Match}i %{If-None-Match}i %{If-Modified-Since}i %{Cache-Control}o exp=%{Expires}o %{Vary}o %{cache-hit}e %{cache-revalidate}e %{cache-invalidate}e %{cache-status}e" 868 | # GlobalLog logs/was-debug.log "%h %l %u %t \"%r\" %>s %b %D %{WAS_UNIQUE_ID}e %{RH}e %{WAS}e %{JSESSIONID}C %{remote}p" 869 | # GlobalLog logs/cookie-debug.log "%h %l %u %t \"%r\" %>s %b %{User-Agent}i %D %{RH}e %{WAS}e %{Age}o %{Cache-Control}i exp=%{Expires}o %{Cache-Control}o SC=\"%{Set-Cookie}o\" C=\"%{Cookie}i\" %{Location}o" 870 | 871 | 872 | LoadModule was_ap24_module plugin/bin/mod_was_ap24_http.so 873 | WebSpherePluginConfig /opt/IHS/plugin/config/webserver1/plugin-cfg.xml 874 | 875 | -------------------------------------------------------------------------------- /archive/update-conf.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | # Enable SSL if conf/ihsserverkey.kdb exists 4 | cat <> /opt/IHS/conf/httpd.conf 5 | 6 | 7 | LoadModule ibm_ssl_module modules/mod_ibm_ssl.so 8 | Listen 443 9 | SSLCheckCertificateExpiration 30 10 | 11 | SSLEnable 12 | Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" 13 | 14 | KeyFile /opt/IHS/conf/ihsserverkey.kdb 15 | 16 | 17 | ErrorLog /dev/stdout 18 | EOF 19 | -------------------------------------------------------------------------------- /ilan/Dockerfile: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # (C) Copyright IBM Corporation 2015. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | # # 16 | ############################################################################ 17 | 18 | FROM ubuntu:16.04 19 | 20 | MAINTAINER Kavitha Suresh Kumar 21 | 22 | RUN apt-get update && apt-get install -y openssl wget 23 | 24 | ARG TAR_URL 25 | 26 | COPY ihsstart.sh /work/ 27 | 28 | RUN wget -q -O - $TAR_URL | tar xz 29 | ENV PATH /opt/IBM/HTTPServer/bin:$PATH 30 | CMD ["/work/ihsstart.sh"] 31 | -------------------------------------------------------------------------------- /ilan/README.md: -------------------------------------------------------------------------------- 1 | # Building an IBM HTTP Server ILAN image from binaries 2 | 3 | An IBM HTTP Server ILAN image can be built by running one script. 4 | 5 | This repository contains build scripts that can be used for building an IHS Docker image. The output of the build will give you IHS, the IHS plugins and the IBM customisation tools. 6 | 7 | Versions available: 8 | 8.5.5.9 9 | 8.5.5.10 10 | 9.0.0.0 11 | 9.0.0.3 12 | 13 | Pre-req 14 | You are required to download a version of IBM Installation Manager above version 1.8 and place it into the /ilan/im directory. 15 | Download Location: [IBM Support] (http://www-01.ibm.com/support/docview.wss?uid=swg27025142) 16 | 17 | If you require all available versions of IHS then simply run the script buildAll with the arguments of a IBM ID and password. These are required for downloading the binaries as part of the installation. If you just want to build a specific version then you can run the build script with the version you require followed by an IBM ID and password. 18 | 19 | ## Running the IBM HTTP Server ILAN image 20 | 21 | Run the HTTP Server container using: 22 | 23 | ```bash 24 | docker run --name -h -p 80:80 25 | ``` 26 | Example: 27 | 28 | ```bash 29 | docker run --name ihs -h ihs -p 80:80 ihsimage 30 | ``` 31 | -------------------------------------------------------------------------------- /ilan/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | ########################################################################### 4 | # (C) Copyright IBM Corporation 2016. # 5 | # # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); # 7 | # you may not use this file except in compliance with the License. # 8 | # You may obtain a copy of the License at # 9 | # # 10 | # http://www.apache.org/licenses/LICENSE-2.0 # 11 | # # 12 | # Unless required by applicable law or agreed to in writing, software # 13 | # distributed under the License is distributed on an "AS IS" BASIS, # 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# 15 | # See the License for the specific language governing permissions and # 16 | # limitations under the License. # 17 | ########################################################################### 18 | 19 | if [ $# != 3 ]; then 20 | echo "Usage: build " 21 | exit 1 22 | fi 23 | 24 | docker build -t installation-manager im || exit $? 25 | docker run --rm -v $(pwd):/host installation-manager /host/install_ihs $1 $2 $3 || exit $? 26 | 27 | docker run -d --name tar_server -v $(pwd)/ihs$1.tar.gz:/host/ihs$1.tar.gz -w /host python:2-slim python -m SimpleHTTPServer 28 | tar_server_ip=$(docker inspect --format '{{ .NetworkSettings.IPAddress }}' tar_server) 29 | tar_url="http://${tar_server_ip}:8000/ihs${1}.tar.gz" 30 | 31 | 32 | # Build image from hosted tar file 33 | echo "Building image" 34 | docker build -t ibm-http-server:$1 --build-arg TAR_URL=$tar_url . || exit $? 35 | docker rm -f tar_server 36 | -------------------------------------------------------------------------------- /ilan/build_all: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | ########################################################################### 4 | # (C) Copyright IBM Corporation 2016. # 5 | # # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); # 7 | # you may not use this file except in compliance with the License. # 8 | # You may obtain a copy of the License at # 9 | # # 10 | # http://www.apache.org/licenses/LICENSE-2.0 # 11 | # # 12 | # Unless required by applicable law or agreed to in writing, software # 13 | # distributed under the License is distributed on an "AS IS" BASIS, # 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# 15 | # See the License for the specific language governing permissions and # 16 | # limitations under the License. # 17 | ########################################################################### 18 | 19 | if [ $# != 2 ]; then 20 | echo "Usage: build_all " 21 | exit 1 22 | fi 23 | 24 | while read line; do 25 | if [[ $line == \#* ]]; then continue; fi 26 | version=$(cut -d, -f1 <<< $line) 27 | ./build $version $1 $2 28 | done < versions.csv 29 | -------------------------------------------------------------------------------- /ilan/ihsstart.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | ##################################################################################### 3 | # # 4 | # Script to start the server # 5 | # # 6 | # Usage : ihsstart.sh # 7 | # # 8 | ##################################################################################### 9 | 10 | startServer() 11 | { 12 | echo "Starting IBM HTTP Server " 13 | # Starting IBM HTTPServer 14 | /opt/IBM/HTTPServer/bin/apachectl start 15 | 16 | if [ $? = 0 ] 17 | then 18 | echo "IBM HTTP Server started successfully" 19 | else 20 | echo "Failed to start IBM HTTP Server" 21 | fi 22 | } 23 | 24 | stopServer() 25 | { 26 | echo "Stopping IBM HTTP Server " 27 | # Stopping IBM HTTPServer 28 | /opt/IBM/HTTPServer/bin/apachectl graceful-stop 29 | if [ $? = 0 ] 30 | then 31 | echo "IBM HTTP Server stopped successfully" 32 | fi 33 | } 34 | 35 | startServer 36 | 37 | trap "stopServer" SIGTERM 38 | 39 | sleep 10 40 | 41 | while [ -f "/opt/IBM/HTTPServer/logs/httpd.pid" ] 42 | do 43 | sleep 5 44 | done 45 | -------------------------------------------------------------------------------- /ilan/im/Dockerfile: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | ########################################################################### 4 | # (C) Copyright IBM Corporation 2015, 2016. # 5 | # # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); # 7 | # you may not use this file except in compliance with the License. # 8 | # You may obtain a copy of the License at # 9 | # # 10 | # http://www.apache.org/licenses/LICENSE-2.0 # 11 | # # 12 | # Unless required by applicable law or agreed to in writing, software # 13 | # distributed under the License is distributed on an "AS IS" BASIS, # 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# 15 | # See the License for the specific language governing permissions and # 16 | # limitations under the License. # 17 | ########################################################################### 18 | 19 | FROM ubuntu:16.04 20 | 21 | RUN apt-get update && apt-get install -y unzip 22 | 23 | # Install IBM Installation Manager 24 | COPY agent.installer.linux.gtk.x86_64_*.zip /tmp/ 25 | RUN unzip -qd /tmp/im /tmp/agent.installer.linux.gtk.x86_64_*.zip \ 26 | && /tmp/im/installc -acceptLicense -accessRights nonAdmin \ 27 | -installationDirectory "/opt/IBM/InstallationManager" \ 28 | -dataLocation "/var/ibm/InstallationManager" -showProgress \ 29 | && rm -rf /tmp/agent.installer.linux.gtk.x86_65_*.zip /tmp/im 30 | 31 | ENV PATH /opt/IBM/InstallationManager/eclipse/tools:$PATH 32 | -------------------------------------------------------------------------------- /ilan/install_ihs: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | ########################################################################### 4 | # (C) Copyright IBM Corporation 2015, 2016. # 5 | # # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); # 7 | # you may not use this file except in compliance with the License. # 8 | # You may obtain a copy of the License at # 9 | # # 10 | # http://www.apache.org/licenses/LICENSE-2.0 # 11 | # # 12 | # Unless required by applicable law or agreed to in writing, software # 13 | # distributed under the License is distributed on an "AS IS" BASIS, # 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# 15 | # See the License for the specific language governing permissions and # 16 | # limitations under the License. # 17 | ########################################################################### 18 | 19 | VERSION=$1 20 | IBM_ID=$2 21 | IBM_PASSWORD=$3 22 | echo "Running build for versions: "$VERSION 23 | SECURE_STORAGE_FILE=/tmp/credentials 24 | 25 | function save_credential() { 26 | url=$1 27 | /opt/IBM/InstallationManager/eclipse/tools/imutilsc saveCredential \ 28 | -url $url \ 29 | -userName $IBM_ID \ 30 | -userPassword $IBM_PASSWORD \ 31 | -secureStorageFile $SECURE_STORAGE_FILE 32 | } 33 | 34 | function remove_credential() { 35 | rm $SECURE_STORAGE_FILE 36 | } 37 | 38 | function install_packages() { 39 | install_dir=$1 40 | repo=$2 41 | shift 2 42 | packages="$@" 43 | 44 | echo $packages 45 | if [[ $packages == *"IHS"* ]] 46 | then 47 | save_credential $repo 48 | /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 49 | -acceptLicense install $packages \ 50 | -repositories $repo \ 51 | -installationDirectory $install_dir \ 52 | -secureStorageFile $SECURE_STORAGE_FILE \ 53 | -properties "user.ihs.httpPort=80,user.ihs.allowNonRootSilentInstall=true" \ 54 | -preferences com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts=false 55 | result=$? 56 | remove_credential 57 | else 58 | save_credential $repo 59 | /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 60 | -acceptLicense install $packages \ 61 | -repositories $repo \ 62 | -installationDirectory $install_dir \ 63 | -secureStorageFile $SECURE_STORAGE_FILE \ 64 | -preferences com.ibm.cic.common.core.preferences.preserveDownloadedArtifacts=false 65 | result=$? 66 | remove_credential 67 | fi 68 | return $result 69 | } 70 | 71 | function install_version() { 72 | line=$(grep "^$VERSION" /host/versions.csv | cut -d "," -f 2-) 73 | IFS=',' read -ra entries <<< "$line" 74 | for entry in "${entries[@]}"; do 75 | IFS='|' read install_dir repo packages <<< "$entry" 76 | install_packages $install_dir $repo $packages || exit $? 77 | done 78 | } 79 | 80 | 81 | install_version 82 | tar -zcf /host/ihs${VERSION}.tar.gz /opt/IBM/HTTPServer /opt/IBM/WebSphere/Plugins /opt/IBM/WebSphere/Toolbox 83 | -------------------------------------------------------------------------------- /ilan/push_all: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | ########################################################################### 4 | # (C) Copyright IBM Corporation 2015, 2016. # 5 | # # 6 | # Licensed under the Apache License, Version 2.0 (the "License"); # 7 | # you may not use this file except in compliance with the License. # 8 | # You may obtain a copy of the License at # 9 | # # 10 | # http://www.apache.org/licenses/LICENSE-2.0 # 11 | # # 12 | # Unless required by applicable law or agreed to in writing, software # 13 | # distributed under the License is distributed on an "AS IS" BASIS, # 14 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.# 15 | # See the License for the specific language governing permissions and # 16 | # limitations under the License. # 17 | ########################################################################### 18 | 19 | if [ $# != 1 ]; then 20 | echo "Usage: push_all " 21 | exit 1 22 | fi 23 | 24 | while read line; do 25 | if [[ $line == \#* ]]; then continue; fi 26 | version=$(cut -d, -f1 <<< $line) 27 | docker tag ibm-http-server:$version $1/ibm-http-server:$version 28 | docker push $1/ibm-http-server:$version 29 | done < versions.csv 30 | 31 | #Add latest tag and push to the last build image 32 | docker tag $1/ibm-http-server:$version $1/ibm-http-server:latest 33 | docker push $1/ibm-http-server:latest 34 | 35 | -------------------------------------------------------------------------------- /ilan/versions.csv: -------------------------------------------------------------------------------- 1 | #version,dir|repo|package package ...,dir|repo|package...,... 2 | 8.5.5.15,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHSILAN.v85|com.ibm.websphere.IHSILAN.v85_8.5.5015.20190128_1828,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLGILAN.v85|com.ibm.websphere.PLGILAN.v85_8.5.5015.20190128_1828,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCTILAN.v85|com.ibm.websphere.WCTILAN.v85_8.5.5015.20190128_1828 3 | 8.5.5.14,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHSILAN.v85|com.ibm.websphere.IHSILAN.v85_8.5.5014.20180802_1018,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLGILAN.v85|com.ibm.websphere.PLGILAN.v85_8.5.5014.20180802_1018,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCTILAN.v85|com.ibm.websphere.WCTILAN.v85_8.5.5014.20180802_1018 4 | 8.5.5.13,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHSILAN.v85|com.ibm.websphere.IHSILAN.v85_8.5.5013.20180112_1418,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLGILAN.v85|com.ibm.websphere.PLGILAN.v85_8.5.5013.20180112_1418,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCTILAN.v85|com.ibm.websphere.WCTILAN.v85_8.5.5013.20180112_1418 5 | 8.5.5.12,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHSILAN.v85|com.ibm.websphere.IHSILAN.v85_8.5.5012.20170627_1018,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLGILAN.v85|com.ibm.websphere.PLGILAN.v85_8.5.5012.20170627_1018,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCTILAN.v85|com.ibm.websphere.WCTILAN.v85_8.5.5012.20170627_1018 6 | 8.5.5.10,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHSILAN.v85|com.ibm.websphere.IHSILAN.v85_8.5.5010.20160721_0036,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLGILAN.v85|com.ibm.websphere.PLGILAN.v85_8.5.5010.20160721_0036,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCTILAN.v85|com.ibm.websphere.WCTILAN.v85_8.5.5010.20160721_0036 7 | 8.5.5.9,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHSILAN.v85|com.ibm.websphere.IHSILAN.v85_8.5.5009.20160225_0435,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLGILAN.v85|com.ibm.websphere.PLGILAN.v85_8.5.5009.20160225_0435,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCTILAN.v85|com.ibm.websphere.WCTILAN.v85_8.5.5009.20160225_0435 8 | 9.0.0.0,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.0.20160526_1854,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.1.20160906_0049,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.0.20160526_1854 9 | 9.0.0.3,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.3.20170217_1945,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.3.20170217_1945,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.3.20170217_1945 10 | 9.0.0.4,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.4.20170523_1327,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.4.20170523_1327,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.4.20170523_1327 11 | 9.0.0.5,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.5.20170918_1844,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.5.20170918_1844,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.5.20170918_1844 12 | 9.0.0.6,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.6.20171205_1311,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.6.20171205_1311,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.6.20171205_1311 13 | 9.0.0.7,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.7.20180302_0440,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.7.20180302_0440,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.7.20180302_0440 14 | 9.0.0.8,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.8.20180530_1827,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.8.20180530_1827,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.8.20180530_1827 15 | 9.0.0.9,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.9.20180906_1004,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.9.20180906_1004,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.9.20180906_1004 16 | 9.0.0.10,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.10.20181119_1807,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.10.20181119_1807,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.10.20181119_1807 17 | 9.0.0.11,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.11.20190312_2048,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.11.20190312_2048,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.11.20190312_2048 18 | 9.0.5.0,/opt/IBM/HTTPServer|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.IHS.v90|com.ibm.java.jdk.v8 com.ibm.websphere.IHS.v90_9.0.5000.20190610_1342,/opt/IBM/WebSphere/Plugins|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.PLG.v90|com.ibm.java.jdk.v8 com.ibm.websphere.PLG.v90_9.0.5000.20190610_1342,/opt/IBM/WebSphere/Toolbox|http://www.ibm.com/software/repositorymanager/com.ibm.websphere.WCT.v90|com.ibm.java.jdk.v8 com.ibm.websphere.WCT.v90_9.0.5000.20190610_1342 19 | -------------------------------------------------------------------------------- /production/Dockerfile.install: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # (C) Copyright IBM Corporation 2015. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | # # 16 | ############################################################################ 17 | 18 | FROM ubuntu:16.04 19 | 20 | MAINTAINER Kavitha Suresh Kumar 21 | 22 | ADD ihs_plg_wct.tar / 23 | 24 | COPY ihsstart.sh /work/ 25 | 26 | RUN ln -s /opt/IBM/HTTPServer/java /opt/IBM/WebSphere/Plugins/java \ 27 | && ln -s /opt/IBM/HTTPServer/java /opt/IBM/WebSphere/Toolbox/java \ 28 | && chmod +x /work/ihsstart.sh 29 | 30 | CMD ["/work/ihsstart.sh"] 31 | -------------------------------------------------------------------------------- /production/Dockerfile.prereq: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # (C) Copyright IBM Corporation 2015. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | # # 16 | ############################################################################ 17 | 18 | FROM ubuntu:16.04 19 | 20 | MAINTAINER Kavitha Suresh Kumar 21 | 22 | RUN apt-get update && apt-get install -y unzip wget 23 | 24 | ARG URL 25 | 26 | ######################### Installation Manager ############################# 27 | 28 | # Install Installation Manager 29 | RUN wget -q $URL/Install_Mgr_v1.6.2_Lnx_WASv8.5.5.zip -O /tmp/IM.zip \ 30 | && mkdir /tmp/im && unzip -qd /tmp/im /tmp/IM.zip \ 31 | && /tmp/im/installc -acceptLicense -accessRights admin \ 32 | -installationDirectory "/opt/IBM/InstallationManager" \ 33 | -dataLocation "/var/ibm/InstallationManager" -showProgress \ 34 | && rm -fr /tmp/IM.zip /tmp/im 35 | 36 | ######################### IBM HTTP Server ################################## 37 | 38 | # Install IBM HTTP Server 39 | RUN mkdir /tmp/supp \ 40 | && wget -q $URL/WAS_V8.5.5_SUPPL_1_OF_3.zip -O /tmp/supp1.zip \ 41 | && wget -q $URL/WAS_V8.5.5_SUPPL_2_OF_3.zip -O /tmp/supp2.zip \ 42 | && wget -q $URL/WAS_V8.5.5_SUPPL_3_OF_3.zip -O /tmp/supp3.zip \ 43 | && unzip -qd /tmp/supp /tmp/supp1.zip \ 44 | && unzip -qd /tmp/supp /tmp/supp2.zip \ 45 | && unzip -qd /tmp/supp /tmp/supp3.zip \ 46 | && rm /tmp/supp1.zip /tmp/supp2.zip /tmp/supp3.zip \ 47 | && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 48 | -acceptLicense install com.ibm.websphere.IHS.v85 \ 49 | -repositories /tmp/supp/repository.config \ 50 | -installationDirectory /opt/IBM/HTTPServer \ 51 | -properties "user.ihs.httpPort=80,user.ihs.allowNonRootSilentInstall=true" 52 | 53 | ##################### IBM HTTPServer Fixpack ################################## 54 | 55 | # Install IBM HTTP Server Fixpack 56 | RUN mkdir /tmp/suppfp \ 57 | && wget -q $URL/8.5.5-WS-WASSupplements-FP0000009-part1.zip -O /tmp/spart1.zip \ 58 | && wget -q $URL/8.5.5-WS-WASSupplements-FP0000009-part2.zip -O /tmp/spart2.zip \ 59 | && unzip -qd /tmp/suppfp /tmp/spart1.zip \ 60 | && unzip -qd /tmp/suppfp /tmp/spart2.zip \ 61 | && rm /tmp/spart1.zip /tmp/spart2.zip \ 62 | && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 63 | -acceptLicense install com.ibm.websphere.IHS.v85 \ 64 | -repositories /tmp/suppfp/repository.config \ 65 | -installationDirectory /opt/IBM/HTTPServer \ 66 | -properties "user.ihs.httpPort=80,user.ihs.allowNonRootSilentInstall=true" 67 | 68 | ########################## WebServer Plugins ################################## 69 | 70 | # Install WebServer Plugins 71 | RUN /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 72 | -acceptLicense install com.ibm.websphere.PLG.v85 \ 73 | -repositories /tmp/supp/repository.config \ 74 | -installationDirectory /opt/IBM/WebSphere/Plugins 75 | 76 | ##################### WebServer Plugins Fixpack ################################ 77 | 78 | # Install WebServer Plugins Fixpack 79 | RUN /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 80 | -acceptLicense install com.ibm.websphere.PLG.v85 \ 81 | -repositories /tmp/suppfp/repository.config \ 82 | -installationDirectory /opt/IBM/WebSphere/Plugins \ 83 | && rm -fr /opt/IBM/WebSphere/Plugins/java /tmp/suppfp 84 | 85 | ####################### WebSphere Customization Tools ########################## 86 | 87 | # Install IBM WebSphere Customization Tools 88 | RUN /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 89 | -acceptLicense install com.ibm.websphere.WCT.v85 \ 90 | -repositories /tmp/supp/repository.config \ 91 | -installationDirectory /opt/IBM/WebSphere/Toolbox \ 92 | && rm -fr /tmp/supp 93 | 94 | ###################### WebSphere Customization Tools Fixpack ################### 95 | 96 | # Install IBM WebSphere Customization Tools Fixpack 97 | RUN mkdir /tmp/wct \ 98 | && wget -q $URL/8.5.5-WS-WCT-FP0000009-part1.zip -O /tmp/wct1.zip \ 99 | && wget -q $URL/8.5.5-WS-WCT-FP0000009-part2.zip -O /tmp/wct2.zip \ 100 | && unzip -qd /tmp/wct /tmp/wct1.zip \ 101 | && unzip -qd /tmp/wct /tmp/wct2.zip \ 102 | && rm /tmp/wct1.zip /tmp/wct2.zip \ 103 | && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 104 | -acceptLicense install com.ibm.websphere.WCT.v85 \ 105 | -repositories /tmp/wct/repository.config \ 106 | -installationDirectory /opt/IBM/WebSphere/Toolbox \ 107 | && rm -fr /tmp/wct 108 | 109 | CMD ["tar","cvf","/tmp/ihs_plg_wct.tar","/opt/IBM/HTTPServer","/opt/IBM/WebSphere/Plugins","/opt/IBM/WebSphere/Toolbox"] 110 | -------------------------------------------------------------------------------- /production/Dockerfile.v9.prereq: -------------------------------------------------------------------------------- 1 | ############################################################################ 2 | # (C) Copyright IBM Corporation 2015. # 3 | # # 4 | # Licensed under the Apache License, Version 2.0 (the "License"); # 5 | # you may not use this file except in compliance with the License. # 6 | # You may obtain a copy of the License at # 7 | # # 8 | # http://www.apache.org/licenses/LICENSE-2.0 # 9 | # # 10 | # Unless required by applicable law or agreed to in writing, software # 11 | # distributed under the License is distributed on an "AS IS" BASIS, # 12 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # 13 | # See the License for the specific language governing permissions and # 14 | # limitations under the License. # 15 | # # 16 | ############################################################################ 17 | 18 | FROM ubuntu:16.04 19 | 20 | MAINTAINER Kavitha Suresh Kumar 21 | 22 | RUN apt-get update && apt-get install -y unzip wget 23 | 24 | ARG URL 25 | 26 | ########################### Installation Manager ######################### 27 | 28 | # Install Installation Manager 29 | RUN wget -q $URL/agent.installer.lnx.gtk.x86_64_1.8.5.zip -O /tmp/IM.zip \ 30 | && mkdir /tmp/im && unzip -qd /tmp/im /tmp/IM.zip \ 31 | && /tmp/im/installc -acceptLicense -accessRights admin \ 32 | -installationDirectory "/opt/IBM/InstallationManager" \ 33 | -dataLocation "/var/ibm/InstallationManager" -showProgress \ 34 | && rm -fr /tmp/IM.zip /tmp/im 35 | 36 | ########################### IBM HTTP Server ################################ 37 | 38 | # Install IBM HTTP Server 39 | RUN mkdir /tmp/ihs \ 40 | && wget -q $URL/was.repo.9000.ihs.zip -O /tmp/ihs.zip \ 41 | && wget -q $URL/sdk.repo.8030.java8.hpux.zip -O /tmp/java.zip \ 42 | && unzip -qd /tmp/ihs /tmp/ihs.zip \ 43 | && unzip -qd /tmp/java /tmp/java.zip \ 44 | && rm /tmp/ihs.zip /tmp/java.zip \ 45 | && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 46 | -acceptLicense install com.ibm.websphere.IHS.v90 com.ibm.java.jdk.v8 \ 47 | -repositories /tmp/ihs/repository.config,/tmp/java/repository.config \ 48 | -installationDirectory /opt/IBM/HTTPServer \ 49 | -properties "user.ihs.httpPort=80,user.ihs.allowNonRootSilentInstall=true" \ 50 | && rm -fr /tmp/ihs /tmp/java 51 | 52 | ######################### WebServer Plugins ################################## 53 | 54 | # Install WebServer Plugins 55 | RUN mkdir /tmp/plg \ 56 | && wget -q $URL/was.repo.9000.plugins.zip -O /tmp/plg.zip \ 57 | && wget -q $URL/sdk.repo.8030.java8.hpux.zip -O /tmp/java.zip \ 58 | && unzip -qd /tmp/plg /tmp/plg.zip \ 59 | && unzip -qd /tmp/java /tmp/java.zip \ 60 | && rm /tmp/plg.zip /tmp/java.zip \ 61 | && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 62 | -acceptLicense install com.ibm.websphere.PLG.v90 com.ibm.java.jdk.v8 \ 63 | -repositories /tmp/plg/repository.config,/tmp/java/repository.config \ 64 | -installationDirectory /opt/IBM/WebSphere/Plugins \ 65 | && rm -fr /tmp/plg /tmp/java /opt/IBM/WebSphere/Plugins/java 66 | 67 | ####################### WebSphere Customization Tools ####################### 68 | 69 | # Install WebSphere Customization Tools 70 | RUN mkdir /tmp/wct \ 71 | && wget -q $URL/was.repo.9000.wct.zip -O /tmp/wct.zip \ 72 | && wget -q $URL/sdk.repo.8030.java8.hpux.zip -O /tmp/java.zip \ 73 | && unzip -qd /tmp/wct /tmp/wct.zip \ 74 | && unzip -qd /tmp/java /tmp/java.zip \ 75 | && rm /tmp/wct.zip /tmp/java.zip \ 76 | && /opt/IBM/InstallationManager/eclipse/tools/imcl -showProgress \ 77 | -acceptLicense install com.ibm.websphere.WCT.v90 com.ibm.java.jdk.v8 \ 78 | -repositories /tmp/wct/repository.config,/tmp/java/repository.config \ 79 | -installationDirectory /opt/IBM/WebSphere/Toolbox \ 80 | && rm -fr /tmp/wct /tmp/java /opt/IBM/WebSphere/Toolbox/java 81 | 82 | 83 | CMD ["tar","cvf","/tmp/ihs_plg_wct.tar","/opt/IBM/HTTPServer","/opt/IBM/WebSphere/Plugins","/opt/IBM/WebSphere/Toolbox"] 84 | -------------------------------------------------------------------------------- /production/README.md: -------------------------------------------------------------------------------- 1 | # Building an IBM HTTP Server v8.5.5 production image from binaries 2 | 3 | An IBM HTTP Server production image can be built by obtaining the following binaries: 4 | * IBM Installation Manager binaries from [Passport Advantage](http://www-01.ibm.com/software/passportadvantage/pao_customer.html) 5 | 6 | IBM Installation Manager binaries: 7 | * Install_Mgr_v1.6.2_Lnx_WASv8.5.5.zip(CIK2GML) 8 | 9 | * IBM HTTP Server,IBM WebServer Plugins and IBM WebSphere Customization Tools binaries from [Passport Advantage](http://www-01.ibm.com/software/passportadvantage/pao_customer.html) / [Fix Central](http://www-933.ibm.com/support/fixcentral/) 10 | 11 | IBM HTTP Server,IBM WebServer Plugins and IBM WebSphere Customization Tools 8.5.5 binaries: 12 | * WAS_V8.5.5_SUPPL_1_OF_3.zip(CIK1VML) 13 | * WAS_V8.5.5_SUPPL_1_OF_3.zip(CIK1WML) 14 | * WAS_V8.5.5_SUPPL_1_OF_3.zip(CIK1XML) 15 | 16 | Fixpack 8.5.5.9 binaries: 17 | * 8.5.5-WS-WASSupplements-FP0000009-part1.zip 18 | * 8.5.5-WS-WASSupplements-FP0000009-part2.zip 19 | * 8.5.5-WS-WCT-FP0000009-part1.zip 20 | * 8.5.5-WS-WCT-FP0000009-part2.zip 21 | 22 | IBM HTTP Server production install image is created in two steps using the following Dockerfiles to reduce the final image size: 23 | 24 | 1. [Dockerfile.prereq](Dockerfile.prereq) 25 | 2. [Dockerfile.install](Dockerfile.install) 26 | 27 | Dockerfile.prereq perform the following actions: 28 | 29 | 1. Installs IBM Installation Manager 30 | 2. Installs IBM HTTP Server 31 | 3. Updates IBM HTTP Server with the Fixpack 32 | 4. Installs WebServer Plugins 33 | 5. Updates WebServer Plugins with the Fixpack 34 | 6. Installs WebSphere Customization Tools 35 | 7. Updates WebSphere Customization Tools with the Fixpack 36 | 8. When the container is started a tar file of the IBM HTTP Server, WebServer Plugins and WCT installation is created 37 | 38 | Dockerfile.prereq take the value for the following variable during build time: 39 | * URL(required) - URL from where the binaries are downloaded 40 | 41 | Dockerfile.install perform the following actions: 42 | 43 | 1. Extracts the tar file created by Dockerfile.prereq 44 | 2. Copies the startup script to the image 45 | 3. When the container is started the IHS server is started 46 | 47 | ## Building the IBM HTTP Server production image 48 | 49 | 1. Place the downloaded IBM Installation Manager and IBM HTTP Server, IBM WebServer Plugins and IBM WebSphere Customization Tools binaries on the FTP or HTTP server. 50 | 2. Clone this repository. 51 | 3. Move to the directory `production`. 52 | 4. Build the prereq image using: 53 | 54 | ```bash 55 | docker build --build-arg URL= -t -f Dockerfile.prereq . 56 | ``` 57 | 58 | 5. Run a container using the prereq image to create the tar file in the current folder using: 59 | 60 | ```bash 61 | docker run --rm -v $(pwd):/tmp 62 | ``` 63 | 64 | 6. Build the install image using: 65 | 66 | ```bash 67 | docker build -t -f Dockerfile.install . 68 | ``` 69 | 70 | ## Running the IBM HTTP Server Production image 71 | 72 | Run the HTTP Server container using: 73 | 74 | ```bash 75 | docker run --name -h -p 80:80 76 | ``` 77 | 78 | Example: 79 | 80 | ```bash 81 | docker run --name ihs -h ihs -p 80:80 ihsimage 82 | ``` 83 | -------------------------------------------------------------------------------- /production/ihsstart.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | ##################################################################################### 3 | # # 4 | # Script to start the server # 5 | # # 6 | # Usage : ihsstart.sh # 7 | # # 8 | ##################################################################################### 9 | 10 | startServer() 11 | { 12 | echo "Starting IBM HTTP Server " 13 | # Starting IBM HTTPServer 14 | /opt/IBM/HTTPServer/bin/apachectl start 15 | 16 | if [ $? = 0 ] 17 | then 18 | echo "IBM HTTP Server started successfully" 19 | else 20 | echo "Failed to start IBM HTTP Server" 21 | fi 22 | } 23 | 24 | stopServer() 25 | { 26 | echo "Stopping IBM HTTP Server " 27 | # Stopping IBM HTTPServer 28 | /opt/IBM/HTTPServer/bin/apachectl graceful-stop 29 | if [ $? = 0 ] 30 | then 31 | echo "IBM HTTP Server stopped successfully" 32 | fi 33 | } 34 | 35 | startServer 36 | 37 | trap "stopServer" SIGTERM 38 | 39 | sleep 10 40 | 41 | while [ -f "/opt/IBM/HTTPServer/logs/httpd.pid" ] 42 | do 43 | sleep 5 44 | done 45 | -------------------------------------------------------------------------------- /static-topology/README.md: -------------------------------------------------------------------------------- 1 | # Creating a static topology of Liberty profile servers under Docker 2 | 3 | It is possible to create a static topology consisting of WebSphere 4 | Application Server Liberty Profile servers running within Docker 5 | containers with an external web server load balancing across them. A 6 | [script](gen-plugin-cfg) is provided that assists in obtaining the web 7 | server plug-in configuration for a Liberty profile server running 8 | under Docker. 9 | 10 | The script testMerge.sh can be used to test all of the static topology scripts. 11 | It required no arguments so just clone the repository locally and 12 | run the script. -------------------------------------------------------------------------------- /static-topology/gen-plugin-cfg/Dockerfile: -------------------------------------------------------------------------------- 1 | # (C) Copyright IBM Corporation 2015. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM websphere-liberty:beta 16 | 17 | MAINTAINER Rishi Madan 18 | 19 | ADD com.ibm.ws.docker.jar /opt/ibm/wlp/bin/tools/ 20 | ADD GenPluginCfg.sh /opt/ibm/wlp/bin/ 21 | -------------------------------------------------------------------------------- /static-topology/gen-plugin-cfg/GenPluginCfg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # (C) Copyright IBM Corporation 2015. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | HELP="--help" 18 | if [[ $1 == --installDir* ]] 19 | then 20 | CUTDIR=$(echo $1 | cut -c14-) 21 | else 22 | if [[ $2 == --installDir* ]] 23 | then 24 | CUTDIR=$(echo $2 | cut -c14-) 25 | else 26 | if [[ $3 == --installDir* ]] 27 | then 28 | CUTDIR=$(echo $3 | cut -c14-) 29 | fi 30 | fi 31 | fi 32 | if [[ "$CUTDIR" == "" ]] 33 | then 34 | echo "Usage of GenPluginCfg.sh ./GenPluginCfg.sh --installDir= --userDir= --serverName=" 35 | else 36 | if [ "$JAVA_HOME" != "" ] 37 | then 38 | if [ -n "$1" ] 39 | then 40 | if [ $1 = $HELP ] 41 | then 42 | echo "Usage of GenPluginCfg.sh ./GenPluginCfg.sh --installDir= --userDir= --serverName=" 43 | else 44 | JAVA_CMD=${JAVA_HOME}/jre/bin/java 45 | JAVAPROGRAM=$CUTDIR/bin/tools/com.ibm.ws.docker.jar 46 | $JAVA_CMD -jar $JAVAPROGRAM $1 $2 $3 $4 47 | fi 48 | else 49 | echo "Usage of GenPluginCfg.sh ./GenPluginCfg.sh --installDir= --userDir= --serverName=" 50 | fi 51 | else 52 | echo Please set your JAVA_HOME environment variable 53 | fi 54 | fi 55 | -------------------------------------------------------------------------------- /static-topology/gen-plugin-cfg/README.md: -------------------------------------------------------------------------------- 1 | # Generating a web server plug-in configuration 2 | 3 | The files in this directory can be used to extend an IBM WebSphere Application 4 | Server Liberty profile image. Using the extended image you can generate a web 5 | server plug-in configuration file (plugin-cfg.xml). 6 | 7 | To build an extended image follow these steps: 8 | 9 | 1. Clone this repository. 10 | 2. Change to the directory `websphere-liberty/static-topology/gen-plugin-cfg`. 11 | 3. Review the `Dockerfile` to ensure that the `FROM` command specifies the 12 | image that you want to extend and the paths contain the location of your 13 | WebSphere Liberty profile install. The default values in the file are 14 | configured to work with the `websphere-liberty` image on Docker Hub. 15 | 4. Build the image using the following command: 16 | 17 | ```bash 18 | docker build -t . 19 | ``` 20 | 21 | ## Usage 22 | 23 | To generate the plug-in configuration file by using the extended image that you 24 | create, use the following command when the image is running. 25 | 26 | ```bash 27 | docker exec /opt/ibm/wlp/bin/GenPluginCfg.sh \ 28 | --installDir= --userDir= --serverName= 29 | ``` 30 | 31 | The plug-in configuration file is written to the following path: 32 | `//plugin-cfg.xml`. 33 | 34 | Note that the hostname and ports in the generated file will reflect those inside 35 | the container. These may need updating to reflect the values exposed externally 36 | and accessible by the web server. 37 | 38 | To generate the plug-in configuration file having extended the image on Docker Hub, 39 | use the following command: 40 | 41 | ```bash 42 | docker exec /opt/ibm/wlp/bin/GenPluginCfg.sh \ 43 | --installDir=/opt/ibm/wlp --userDir=/opt/ibm/wlp/usr --serverName=defaultServer 44 | ``` 45 | -------------------------------------------------------------------------------- /static-topology/gen-plugin-cfg/com.ibm.ws.docker.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/WASdev/ci.docker.ibm-http-server/2186c575b20670c0eabbac9d73f3ab280718c01a/static-topology/gen-plugin-cfg/com.ibm.ws.docker.jar -------------------------------------------------------------------------------- /static-topology/get-plugin-cfg/GetPluginCfg.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # (C) Copyright IBM Corporation 2015. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | # Check arguments 18 | if [ $# -ne 2 ] 19 | then 20 | echo "Parameters are incorrect. Format should be: " 21 | exit 1 22 | fi 23 | 24 | # Copy config file to local directory 25 | docker exec $1 /opt/ibm/wlp/bin/GenPluginCfg.sh --installDir=/opt/ibm/wlp --userDir=/opt/ibm/wlp/usr --serverName=defaultServer 26 | docker cp $1:/opt/ibm/wlp/output/defaultServer/plugin-cfg.xml . 27 | echo "Plugin configuration file copied to local directory" 28 | 29 | # Get port information 30 | IFS=' ' read -d '' -r -a array <<< `docker port $1` 31 | P0=${array[0]%/*} 32 | P1=${array[2]##*:} 33 | P2=${array[3]%/*} 34 | P3=`echo "${array[5]##*:}" | tr -d '\n'` 35 | 36 | # Substitute in port and host information 37 | sed -i -e "s/Port=\"$P0\"/Port=\"$P1\"/g" plugin-cfg.xml 38 | sed -i -e "s/Port=\"$P2\"/Port=\"$P3\"/g" plugin-cfg.xml 39 | sed -i -e "s/Hostname=\"[^\"]*\"/Hostname=\"$2\"/g" plugin-cfg.xml 40 | echo "Plugin configuration file modified to reflect host information" 41 | -------------------------------------------------------------------------------- /static-topology/get-plugin-cfg/README.md: -------------------------------------------------------------------------------- 1 | # Getting a web server plug-in configuration 2 | 3 | The files in this directory can be used in conjunction with those in the gen-plugin-cfg directory to generate and then retrieve the server 4 | plug-in configuration file (plugin-cfg.xml) of a Liberty instance running in a given container. 5 | 6 | ## Usage 7 | 8 | To retrieve the plug-in configuration file by using the extended image that you 9 | created in the [gen-plugin-cfg directory](/websphere-liberty/static-topology/gen-plugin-cfg), use the following command when the image is running. 10 | 11 | ```bash 12 | GetPluginCfg.sh 13 | ``` 14 | 15 | The plug-in configuration XML file is written to the container that the Liberty instance is running in, copied into the active directory and then the hostname and ports are updated to reflect the values exposed externally. 16 | -------------------------------------------------------------------------------- /static-topology/merge-plugin-cfg/Dockerfile: -------------------------------------------------------------------------------- 1 | # (C) Copyright IBM Corporation 2015. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM websphere-liberty:beta 16 | 17 | MAINTAINER Jamie Coleman 18 | 19 | RUN installUtility install --acceptLicense collectiveController-1.0 20 | 21 | ENV WLP_HOME=/opt/ibm/wlp 22 | -------------------------------------------------------------------------------- /static-topology/merge-plugin-cfg/README.md: -------------------------------------------------------------------------------- 1 | # Merging web server plug-in configurations 2 | 3 | The script in this directory can be used to combine web server plug-in configurations produced by using a combination of the genPluginCfg.sh script inside the container and the GetPluginCfg.sh 4 | 5 | ## Usage 6 | 7 | To merge the server configuration files place this script into the same directory as the server configuration xml files then use the pluginCfgMerge.sh to create a single xml file. 8 | 9 | ```bash 10 | ./pluginCfgMerge 11 | ``` 12 | 13 | The result of running the above script will combine the two server configuration .xml files into one file. 14 | -------------------------------------------------------------------------------- /static-topology/merge-plugin-cfg/pluginCfgMerge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # (C) Copyright IBM Corporation 2015. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | 17 | if [[ -z "${JAVA_HOME}" ]]; then 18 | echo "Please set the environment variable JAVA_HOME" 19 | exit 1 20 | fi 21 | 22 | if [[ -z "${WLP_HOME}" ]]; then 23 | echo "Please set the environment variable WLP_HOME to your WLP root path" 24 | exit 1 25 | fi 26 | 27 | JAVA_CMD=${JAVA_HOME}/jre/bin/java 28 | if [[ ! -d "${JAVA_HOME}/jre" ]]; then 29 | JAVA_CMD=${JAVA_HOME}/bin/java 30 | fi 31 | 32 | PLUGIN_MERGE_JAR=$(find "${WLP_HOME}/lib" -name com.ibm.ws.http.plugin.merge_*.jar) 33 | if [[ -z "${PLUGIN_MERGE_JAR}" ]]; then 34 | echo "Unable to find com.ibm.ws.http.plugin.merge jar in '${WLP_HOME}/lib'" 35 | exit 1 36 | fi 37 | 38 | LOGGING_JAR=$(find "${WLP_HOME}/lib" -name com.ibm.ws.logging_*.jar) 39 | if [[ -z "${LOGGING_JAR}" ]]; then 40 | echo "Unable to find com.ibm.ws.logging jar in '${WLP_HOME}/lib'" 41 | exit 1 42 | fi 43 | 44 | MAINCLASS=com.ibm.ws.http.plugin.merge.internal.PluginMergeToolImpl 45 | $JAVA_CMD -cp "${PLUGIN_MERGE_JAR}:${LOGGING_JAR}" $MAINCLASS $@ -------------------------------------------------------------------------------- /static-topology/test/Dockerfile: -------------------------------------------------------------------------------- 1 | # (C) Copyright IBM Corporation 2015. 2 | # 3 | # Licensed under the Apache License, Version 2.0 (the "License"); 4 | # you may not use this file except in compliance with the License. 5 | # You may obtain a copy of the License at 6 | # 7 | # http://www.apache.org/licenses/LICENSE-2.0 8 | # 9 | # Unless required by applicable law or agreed to in writing, software 10 | # distributed under the License is distributed on an "AS IS" BASIS, 11 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | # See the License for the specific language governing permissions and 13 | # limitations under the License. 14 | 15 | FROM baseliberty 16 | 17 | MAINTAINER Jamie L Coleman 18 | 19 | RUN wget http://repo1.maven.org/maven2/net/wasdev/wlp/sample/ferret/1.0/ferret-1.0.war 20 | RUN mv ferret-1.0.war /opt/ibm/wlp/usr/servers/defaultServer/dropins/ferret-1.0.war 21 | 22 | ENV WLP_HOME=/opt/ibm/wlp 23 | -------------------------------------------------------------------------------- /static-topology/test/testMerge.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | # 3 | # (C) Copyright IBM Corporation 2015. 4 | # 5 | # Licensed under the Apache License, Version 2.0 (the "License"); 6 | # you may not use this file except in compliance with the License. 7 | # You may obtain a copy of the License at 8 | # 9 | # http://www.apache.org/licenses/LICENSE-2.0 10 | # 11 | # Unless required by applicable law or agreed to in writing, software 12 | # distributed under the License is distributed on an "AS IS" BASIS, 13 | # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 | # See the License for the specific language governing permissions and 15 | # limitations under the License. 16 | HELP="--help" 17 | if [[ $1 -eq $HELP ]] 18 | then 19 | echo "USAGE" 20 | echo " No args are required! " 21 | echo "DESCRIPTION" 22 | echo " " 23 | echo " This test has been created to help test the Static-Topology scripts" 24 | echo " This test runs in a docker enviroment so Docker must be installed on the" 25 | echo " the host machine that this script is running on." 26 | echo " This script will build and run two containers of WebSphere-Liberty coppying in the required files" 27 | echo " It will then check to see when WebSphere-Liberty has started and run the GenPluginCfg.sh script to " 28 | echo " generate the xml for each liberty instance. Another Liberty container is then spun up and the xml" 29 | echo " is coppied into the new container and the merge script is then run to produce the final merged.xml" 30 | else 31 | cd .. 32 | cd gen-plugin-cfg 33 | docker build -t baseliberty . 34 | cd .. 35 | cd test 36 | 37 | #Create docker bridge network 38 | docker network create net1 39 | docker build -t liberty . 40 | docker run -d --name liberty1 -h liberty1 --net=net1 liberty 41 | docker run -d --name liberty2 -h liberty2 --net=net1 liberty 42 | docker run -d --name liberty3 -h liberty3 --net=net1 liberty 43 | 44 | #This section waits for Liberty to start otherwise the GenPluginCfg.sh script fails 45 | echo " " 46 | echo "The test is waiting for all Liberty containers to start" 47 | found=1 48 | while [ $found != 0 ]; 49 | do 50 | sleep 3s 51 | docker logs liberty1 | grep "ready to run a smarter planet" 52 | found=$? 53 | done 54 | docker exec liberty1 /opt/ibm/wlp/bin/GenPluginCfg.sh --installDir=/opt/ibm/wlp --userDir=/opt/ibm/wlp/usr --serverName=defaultServer 55 | 56 | found2=1 57 | while [ $found2 != 0 ]; 58 | do 59 | sleep 3s 60 | docker logs liberty2 | grep "ready to run a smarter planet" 61 | found2=$? 62 | done 63 | docker exec liberty2 /opt/ibm/wlp/bin/GenPluginCfg.sh --installDir=/opt/ibm/wlp --userDir=/opt/ibm/wlp/usr --serverName=defaultServer 64 | 65 | found3=1 66 | while [ $found3 != 0 ]; 67 | do 68 | sleep 3s 69 | docker logs liberty3 | grep "ready to run a smarter planet" 70 | found3=$? 71 | done 72 | docker exec liberty3 /opt/ibm/wlp/bin/GenPluginCfg.sh --installDir=/opt/ibm/wlp --userDir=/opt/ibm/wlp/usr --serverName=defaultServer 73 | 74 | cd .. 75 | cd get-plugin-cfg 76 | ./GetPluginCfg.sh liberty1 liberty1 77 | mv plugin-cfg.xml plugin-cfg1.xml 78 | ./GetPluginCfg.sh liberty2 liberty2 79 | mv plugin-cfg.xml plugin-cfg2.xml 80 | ./GetPluginCfg.sh liberty3 liberty3 81 | mv plugin-cfg.xml plugin-cfg3.xml 82 | 83 | cd .. 84 | mv get-plugin-cfg/plugin-cfg1.xml merge-plugin-cfg/plugin-cfg1.xml 85 | mv get-plugin-cfg/plugin-cfg2.xml merge-plugin-cfg/plugin-cfg2.xml 86 | mv get-plugin-cfg/plugin-cfg3.xml merge-plugin-cfg/plugin-cfg3.xml 87 | cd merge-plugin-cfg 88 | 89 | echo " " 90 | echo "Creating new liberty container with the required .jar file" 91 | docker build -t libertytwo . 92 | docker run -d --name=liberty4 libertytwo 93 | echo "Copying xml to the container" 94 | docker cp plugin-cfg1.xml liberty4:/tmp 95 | docker cp plugin-cfg2.xml liberty4:/tmp 96 | docker cp plugin-cfg3.xml liberty4:/tmp 97 | docker cp pluginCfgMerge.sh liberty4:/tmp 98 | 99 | found4=1 100 | while [ $found4 != 0 ]; 101 | do 102 | sleep 3s 103 | docker logs liberty4 | grep "ready to run a smarter planet" 104 | found4=$? 105 | done 106 | echo " " 107 | echo "Executing merge script" 108 | docker exec liberty4 /tmp/pluginCfgMerge.sh /tmp/plugin-cfg1.xml /tmp/plugin-cfg2.xml /tmp/plugin-cfg3.xml /tmp/merge-cfg.xml 109 | cd .. 110 | docker cp liberty4:/tmp/merge-cfg.xml merge-plugin-cfg/merge-cfg.xml 111 | cd merge-plugin-cfg 112 | 113 | #This is the new section to support IHS 114 | echo "Pulling down and deploying the IHS image" 115 | docker run -d -p 80:80 -h ihs --net=net1 --name=ihs ibmcom/ibm-http-server 116 | sleep 5s 117 | echo "Send the merged xml to the IHS Instance" 118 | docker cp merge-cfg.xml ihs:/opt/IBM/WebSphere/Plugins/config/webserver1/plugin-cfg.xml 119 | echo "Stopping and starting the ihs server" 120 | docker exec ihs bash -c "/opt/IBM/HTTPServer/bin/apachectl stop" 121 | echo "ihs has stopped" 122 | sleep 3s 123 | docker exec ihs bash -c "/opt/IBM/HTTPServer/bin/apachectl start" 124 | echo "ihs has started" 125 | sleep 3s 126 | 127 | #Getting the port numbers of the liberty instances that have been routed too 128 | echo "Starting comparisons" 129 | wget http://0.0.0.0:80/ferret -q -O ferret1.txt 130 | port1=$(head -75 ferret1.txt | tail -1 | cut -c 7-11) >> test.txt 131 | wget http://0.0.0.0:80/ferret -q -O ferret2.txt 132 | port2=$(head -75 ferret2.txt | tail -1 | cut -c 7-11) >> test.txt 133 | wget http://0.0.0.0:80/ferret -q -O ferret3.txt 134 | port3=$(head -75 ferret3.txt | tail -1 | cut -c 7-11) >> test.txt 135 | echo $port1 136 | echo $port2 137 | echo $port3 138 | 139 | wget http://0.0.0.0:80/ferret -q -O ferret11.txt 140 | port11=$(head -75 ferret1.txt | tail -1 | cut -c 7-11) >> test.txt 141 | wget http://0.0.0.0:80/ferret -q -O ferret22.txt 142 | port22=$(head -75 ferret2.txt | tail -1 | cut -c 7-11) >> test.txt 143 | wget http://0.0.0.0:80/ferret -q -O ferret33.txt 144 | port33=$(head -75 ferret3.txt | tail -1 | cut -c 7-11) >> test.txt 145 | echo $port11 146 | echo $port22 147 | echo $port33 148 | 149 | #Comparing ports 150 | echo "Comparing Ports" 151 | if [[ $port1 == $port11 ]] 152 | then 153 | result="PASS" 154 | else 155 | result="FAIL" 156 | fi 157 | if [[ $port2 == $port22 ]] 158 | then 159 | result="PASS" 160 | else 161 | result="FAIL" 162 | fi 163 | if [[ $port3 == $port33 ]] 164 | then 165 | result="PASS" 166 | else 167 | result="FAIL" 168 | fi 169 | echo "Test Result: $result" 170 | 171 | #Cleanup 172 | rm test.txt 173 | rm ferret1.txt 174 | rm ferret11.txt 175 | rm ferret2.txt 176 | rm ferret22.txt 177 | rm ferret3.txt 178 | rm ferret33.txt 179 | rm plugin-cfg1.xml 180 | rm plugin-cfg2.xml 181 | rm plugin-cfg3.xml 182 | rm merge-cfg.xml 183 | echo "Killing and removing the IHS container" 184 | docker stop ihs 185 | docker rm ihs 186 | echo "Killing and removing each Liberty container" 187 | docker stop liberty1 188 | docker stop liberty2 189 | docker stop liberty3 190 | docker stop liberty4 191 | docker rm liberty1 192 | docker rm liberty2 193 | docker rm liberty3 194 | docker rm liberty4 195 | 196 | fi 197 | -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- 1 | # Building and Testing images 2 | 3 | IBM HTTP Server images can be built and verified using the test scripts provided. 4 | 5 | ## Build and Test image 6 | 7 | 1. Clone this repository. 8 | 2. Move to the directory `test`. 9 | 3. Build and Test image using: 10 | 11 | ```bash 12 | sh buildAndverify.sh ` 13 | ``` 14 | 15 | Parameter values for building IHS ILAN images: 16 | 17 | * image-name - ilan 18 | * dockerfile-location - ../ilan 19 | * URL - URL where the binaries are placed 20 | 21 | Parameter values for building IHS production images: 22 | 23 | * image-name - production 24 | * dockerfile-location - ../production 25 | * URL - URL where the binaries are placed 26 | 27 | -------------------------------------------------------------------------------- /test/buildAndVerify.sh: -------------------------------------------------------------------------------- 1 | #! /bin/bash 2 | ##################################################################################### 3 | # # 4 | # Script to build docker image and verify the image # 5 | # # 6 | # Usage : buildAndVerify.sh # 7 | # # 8 | ##################################################################################### 9 | 10 | image=$1 11 | dloc=$2 12 | url=$3 13 | 14 | cname=$image'test' 15 | 16 | if [ $# != 3 ] 17 | then 18 | echo "Usage : buildAndVerify.sh " 19 | exit 1 20 | fi 21 | 22 | echo "******************************************************************************" 23 | echo " Starting docker prereq build for $image " 24 | echo "******************************************************************************" 25 | 26 | imagename=$image'tar' 27 | docker build --build-arg URL=$url -t $imagename -f $dloc/Dockerfile.prereq $dloc 28 | 29 | if [ $? = 0 ] 30 | then 31 | docker run --rm -v $(pwd):/tmp $imagename 32 | mv ihs_plg_wct.tar $dloc 33 | else 34 | echo "Build failed , exiting......." 35 | fi 36 | 37 | if [ $? = 0 ] 38 | then 39 | echo "******************************************************************************" 40 | echo " Prereq build completed successfully " 41 | echo " Starting docker install build for $image " 42 | echo "******************************************************************************" 43 | docker build -t $image -f $dloc/Dockerfile.install $dloc 44 | fi 45 | 46 | cleanup() 47 | { 48 | 49 | echo "------------------------------------------------------------------------------" 50 | echo "Starting Cleanup " 51 | echo "Stopping Container $cname" 52 | docker kill $cname 53 | echo "Removing Container $cname" 54 | docker rm $cname 55 | echo "Cleanup Completed " 56 | echo "------------------------------------------------------------------------------" 57 | } 58 | 59 | test1() 60 | { 61 | echo "******************************************************************************" 62 | echo " Executing test1 - Container Runs " 63 | echo "******************************************************************************" 64 | 65 | docker ps -a | grep -i $cname 66 | if [ $? = 0 ] 67 | then 68 | cleanup 69 | fi 70 | 71 | cid=`docker run --name $cname -h $cname -p 80:80 -d $image` 72 | scid=${cid:0:12} 73 | sleep 10 74 | if [ $scid != "" ] 75 | then 76 | echo "Container running successfully" 77 | cleanup 78 | else 79 | echo "Container not started successfully, exiting" 80 | cleanup 81 | exit 1 82 | fi 83 | } 84 | 85 | if [ $? = 0 ] 86 | then 87 | echo "******************************************************************************" 88 | echo " $image image built successfully " 89 | rm -f $dloc/ihs_plg_wct.tar 90 | echo "******************************************************************************" 91 | test1 92 | if [ $? = 0 ] 93 | then 94 | echo "******************************************************************************" 95 | echo " Test1 Completed Successfully " 96 | echo "******************************************************************************" 97 | fi 98 | else 99 | echo " Build failed , exiting.........." 100 | exit 1 101 | fi 102 | --------------------------------------------------------------------------------