Installing the OpenShift Cartridge for Liberty

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

  1. Download the cartridge compressed file from IBM® Fix Central.
  2. 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
  3. 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 Structure a Liberty repository for personal binary files for details on how to structure this repository.
    1. Update the ibm-websphere-liberty-buildpack/config/ibmjdk.yml file to point to your JRE binary.
    2. Update the ibm-websphere-liberty-buildpack/config/liberty.yml file to point to your Liberty binary.
  4. 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
  5. 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.
  6. Return to your original directory and copy the cartridge directory to each node host on your OpenShift machines.
  7. On each node host run:
    oo-admin-cartridge --action install --source cloud.openshift.cartridge.wlp/
    service ruby193-mcollective restart
  8. On the broker host run:
    oo-admin-broker-cache --clear --console
    oo-admin-ctl-cartridge -c import-node --activate
    oo-admin-console-cache --clear
  9. Verify that the cartridge is installed by running the rhc cartridges command.

Uninstalling the cartridge from your OpenShift environment

  1. On the broker host run:
    oo-admin-ctl-cartridge -c deactivate --name ibm-liberty-8.5.5
  2. On each node host run:
    oo-admin-cartridge --action erase --name liberty --version 8.5.5 --cartridge_version <Cart_Version_Number>
  3. On the broker host run:
    oo-admin-broker-cache --clear --console
    oo-admin-console-cache --clear
  4. Verify that the cartridge uninstalled by running the rhc cartridges command.

Results

The OpenShift cartridge is now installed.

Icon that indicates the type of topic Task topic



Timestamp icon Last updated: Saturday, 3 December 2016
http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=twlp_oscartridge_ins
File name: twlp_oscartridge_ins.html