The downloadable OpenShift cartridge allows the Liberty server to be available on
OpenShift.
Before you begin
- You must have Ruby version 1.9.3 or later installed.
- This document details how to download the OpenShift cartridge by using the Linux command line.
About this task
OpenShift is an open source platform that allows developers to quickly develop, build, deploy,
and manage Linux containerized services and applications in a
cloud environment. When you install the OpenShift cartridge for Liberty, both Liberty and JRE binary
files are downloaded for each application.
The OpenShift cartridge is also available at https://github.com/WASdev/cloud.openshift.cartridge.wlp where you can find extra
documentation.
For more information about OpenShift and its advantages, see OpenShift
Note: Only OpenShift version 2 can be used with this cartridge
Procedure
Installing the cartridge into your OpenShift environment
- Download the cartridge compressed file from IBM® Fix Central.
- Run the unzip command to extract the contents of the cartridge
ibm-websphere-liberty-cartridge-v*.zip file to the following cartridge
directory cloud.openshift.cartridge.wlp
- The OpenShift cartridge downloads the default Liberty and IBM JRE binary files for development only. If you have licenses for other binary files that you want to use, they need to be accessible
with HTTP. See rwlp_repstruc_ins.html for details on
how to structure this repository.
- Update the ibm-websphere-liberty-buildpack/config/ibmjdk.yml file to point
to your JRE binary.
- Update the ibm-websphere-liberty-buildpack/config/liberty.yml file to
point to your Liberty binary.
- Run the chmod u+x
ibm-websphere-liberty-buildpack/resources/download_buildpack_cache.rb command and add the
binary files from step 3 to the cartridge cache. Run the
ibm-websphere-liberty-buildpack/resources/download_buildpack_cache.rb
ibm-websphere-liberty-buildpack/admin_cache
- If you are licensed to deploy the cartridge into your environment, you can create a
ibm-websphere-liberty-buildpack/config/licenses.yml file that contains the
accepted license numbers before packaging.
IBM_JVM_LICENSE: <jvm license code>
IBM_LIBERTY_LICENSE: <liberty license code>
Note: When installed the cartridge can be made available to all users. If you are an administrator
or own your OpenShift installation, you can have more control over how the cartridge behaves in
these situations. After you add the license to the cartridge package, individual applications do not
need to accept the license terms with environment variables.
- Return to your original directory and copy the cartridge directory to each node host on your
OpenShift machines.
- On each node host run:
oo-admin-cartridge --action install --source cloud.openshift.cartridge.wlp/
service ruby193-mcollective restart
- On the broker host run:
oo-admin-broker-cache --clear --console
oo-admin-ctl-cartridge -c import-node --activate
oo-admin-console-cache --clear
- Verify that the cartridge is installed by running the rhc cartridges
command.
Uninstalling the cartridge from your OpenShift environment
- On the broker host run:
oo-admin-ctl-cartridge -c deactivate --name ibm-liberty-8.5.5
- On each node host run:
oo-admin-cartridge --action erase --name liberty --version 8.5.5 --cartridge_version <Cart_Version_Number>
- On the broker host run:
oo-admin-broker-cache --clear --console
oo-admin-console-cache --clear
- Verify that the cartridge uninstalled by running the rhc cartridges
command.
Results
The OpenShift cartridge is now installed.