Skip to content

jboss-container-images/jboss-eap-7-openshift-image

Repository files navigation

JBoss Enterprise Application Platform 7.4 OpenShift container image

Importing Imagestreams and Templates

You should have the 'oc' tools available and be logged in to your OpenShift instance. For more details on how to do this, please consult the OpenShift documentation. For example, for OpenShift Online, see: https://docs.openshift.com/online/pro/cli_reference/get_started_cli.html

Import JDK 8 image streams:
oc replace --force -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74/eap74-openjdk8-image-stream.json

Import JDK 11 image stream:

oc replace --force -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74/eap74-openjdk11-image-stream.json

Import the OpenShift templates:

for resource in \
  eap74-amq-persistent-s2i.json \
  eap74-amq-s2i.json \
  eap74-basic-s2i.json \
  eap74-https-s2i.json \
  eap74-sso-s2i.json \
  eap74-tx-recovery-s2i.json
do
  oc replace --force -f \
https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74/templates/${resource}
done

If you have administrative access to the general openshift namespace and want the image streams and templates to be accessible by all projects, add -n openshift to the oc replace line of the command. For example:

oc replace -n openshift --force -f ...

See the OpenShift documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html/ for more details on importing templates.

Updating Existing Images

To update an to the most recent image:

oc import-image jboss-eap74-openjdk8-openshift:7.4.0
oc import-image jboss-eap74-openjdk8-runtime-openshift:7.4.0
oc import-image jboss-eap74-openjdk11-openshift:7.4.0
oc import-image jboss-eap74-openjdk11-runtime-openshift:7.4.0

Optionally include namespace to the import:

oc -n myproject import-image ....

Creating New Applications With Templates

Example:

oc new-app --template=eap74-basic-s2i \
 -p EAP_IMAGE_NAME=jboss-eap74-openjdk8-openshift:latest \
 -p EAP_RUNTIME_IMAGE_NAME=jboss-eap74-openjdk8-runtime-openshift:latest \
 -p IMAGE_STREAM_NAMESPACE="myproject" \
 -p SOURCE_REPOSITORY_URL="https://github.com/jboss-developer/jboss-eap-quickstarts" \
 -p SOURCE_REPOSITORY_REF="7.4.x"

For more information on application creation and deployment see the OpenShift documentation at https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4/html/ for more details on importing templates.

Creating Secrets

Some of the included templates require the creation of secrets.

Example:

$ keytool -genkey -keyalg RSA -alias eapdemo-selfsigned -keystore keystore.jks -validity 360 -keysize 2048
$ oc secrets new eap7-app-secret keystore.jks
oc create -n myproject -f https://raw.githubusercontent.com/jboss-openshift/application-templates/master/secrets/eap-app-secret.json
oc create -n myproject -f https://raw.githubusercontent.com/jboss-openshift/application-templates/master/secrets/eap7-app-secret.json
oc create -n myproject -f https://raw.githubusercontent.com/jboss-openshift/application-templates/master/secrets/sso-app-secret.json

Please refer to the EAP Documentation for additional details.

License

See LICENSE file.