Skip to content

Commit

Permalink
Merge pull request #400 from luck3y/eap74-beta-dev
Browse files Browse the repository at this point in the history
CLOUD-3918 - EAP 7.4.0.Beta OpenShift images
  • Loading branch information
luck3y authored Feb 10, 2021
2 parents 7dfe812 + 018ff4c commit 81300ec
Show file tree
Hide file tree
Showing 30 changed files with 1,360 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
misc
env/
.vscode
.idea
target/
51 changes: 51 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
This project requires the Developer Certificate of Origin (DCO) process to be
followed. The DCO is an attestation attached to every contribution made by every
developer, signifying that the developer licenses their contribution under the
open source license governing the file(s) being modified. In the commit message
of the contribution, simply add a Signed-off-by statement, which signifies
agreement to the text at http://developercertificate.org, reproduced below:

Developer Certificate of Origin
Version 1.1

Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
1 Letterman Drive
Suite D4700
San Francisco, CA, 94129

Everyone is permitted to copy and distribute verbatim copies of this
license document, but changing it is not allowed.

Developer's Certificate of Origin 1.1

By making a contribution to this project, I certify that:

(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or

(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license (unless I am
permitted to submit under a different license), as indicated
in the file; or

(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified
it.

(d) I understand and agree that this project and the contribution
are public and that a record of the contribution (including all
personal information I submit with it, including my sign-off) is
maintained indefinitely and may be redistributed consistent with
this project or the open source license(s) involved.

The DCO requires a signoff message in the following format to appear on each
commit:

Signed-off-by: Your Name <your.name@example.com>

If you set your user.name and user.email git configs, you can sign your commit
automatically with git commit -s.
109 changes: 107 additions & 2 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,5 +1,110 @@
# Red Hat JBoss Enterprise Application Platform 7.4 Beta Container Image
# JBoss Enterprise Application Platform 7.4.0.Beta OpenShift container image

# License
## 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
[source, bash]

Import JDK 8 image streams:

[source, bash]
----
oc replace --force -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74-beta/eap74-beta-openjdk8-image-stream.json
----

Import JDK 11 image stream:

[source, bash]
----
oc replace --force -f https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74-beta/eap74-beta-openjdk11-image-stream.json
----

Import the OpenShift templates:

[source, bash]
----
for resource in \
eap74-beta-amq-persistent-s2i.json \
eap74-beta-amq-s2i.json \
eap74-beta-basic-s2i.json \
eap74-beta-https-s2i.json \
eap74-beta-sso-s2i.json \
eap74-beta-starter-s2i.json \
eap74-beta-third-party-db-s2i.json \
eap74-beta-tx-recovery-s2i.json
do
oc replace --force -f \
https://raw.githubusercontent.com/jboss-container-images/jboss-eap-openshift-templates/eap74-beta/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:

[source, bash]
----
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.Beta/html/ for more details on importing templates.

#### Updating Existing Images
To update an to the most recent image:

[source, bash]
----
oc import-image jboss-eap74-beta-openjdk8-openshift:7.4.0.Beta
oc import-image jboss-eap74-beta-openjdk8-runtime-openshift:7.4.0.Beta
oc import-image jboss-eap74-beta-openjdk11-openshift:7.4.0.Beta
oc import-image jboss-eap74-beta-openjdk11-runtime-openshift:7.4.0.Beta
----

Optionally include namespace to the import:
[source, bash]
----
oc -n myproject import-image ....
----

#### Creating New Applications With Templates
Example:

[source, bash]
----
oc new-app --template=eap74-beta-basic-s2i \
-p EAP_IMAGE_NAME=jboss-eap74-beta-openjdk8-openshift:latest \
-p EAP_RUNTIME_IMAGE_NAME=jboss-eap74-beta-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.Beta/html/ for more details on importing templates.

## Creating Secrets

Some of the included templates require the creation of secrets.

Example:
[source, bash]
----
$ keytool -genkey -keyalg RSA -alias eapdemo-selfsigned -keystore keystore.jks -validity 360 -keysize 2048
$ oc secrets new eap7-app-secret keystore.jks
----

Example secrets may also be found here: https://github.com/jboss-openshift/application-templates/tree/master/secrets

[source, bash]
----
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.

https://access.redhat.com/documentation/en-us/red_hat_jboss_enterprise_application_platform/7.4.Beta/html/

## License

See link:LICENSE[LICENSE] file.

9 changes: 9 additions & 0 deletions README.adoc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
= Application Templates

This project contains OpenShift v3 application templates which support applications based on JBoss EAP 7.4.0.Beta
Source can be found https://github.com/jboss-container-images/jboss-eap-7-openshift-image/tree/eap74-beta[here].

:icons: font
:toc: macro

toc::[levels=1]
6 changes: 6 additions & 0 deletions container.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
compose:
pulp_repos: true
platforms:
only:
- x86_64

4 changes: 4 additions & 0 deletions content_sets_rhel7.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
x86_64:
- rhel-server-rhscl-7-rpms
- rhel-7-server-rpms

11 changes: 11 additions & 0 deletions content_sets_rhel8.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
x86_64:
- rhel-8-for-x86_64-baseos-rpms
- rhel-8-for-x86_64-appstream-rpms
s390x:
- rhel-8-for-s390x-baseos-rpms
- rhel-8-for-s390x-appstream-rpms
- openj9-1-for-rhel-8-s390x-rpms
ppc64le:
- rhel-8-for-ppc64le-baseos-rpms
- rhel-8-for-ppc64le-appstream-rpms
- openj9-1-for-rhel-8-ppc64le-rpms
133 changes: 133 additions & 0 deletions image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
schema_version: 1

name: "jboss-eap-7-tech-preview/eap74-openjdk11-openshift-rhel8"
description: "Red Hat JBoss Enterprise Application Platform 7.4.0.Beta OpenShift container image."
version: "7.4.0.Beta"
from: "registry.redhat.io/ubi8/ubi:latest"
labels:
- name: "com.redhat.component"
value: "jboss-eap-74-beta-openjdk11-builder-openshift-rhel8-container"
- name: "io.k8s.description"
value: "Platform for building and running JavaEE applications on JBoss EAP 7.4.0.Beta"
- name: "io.k8s.display-name"
value: "JBoss EAP 7.4.0.Beta"
- name: "io.openshift.expose-services"
value: "8080:http"
- name: "io.openshift.tags"
value: "builder,javaee,eap,eap7"
- name: "io.openshift.s2i.scripts-url"
value: "image:///usr/local/s2i"
- name: "maintainer"
value: "Red Hat"
envs:
- name: HTTPS_ENABLE_HTTP2
value: "true"
- name: SCRIPT_DEBUG
description: If set to true, ensures that the bash scripts are executed with the -x option, printing the commands and their arguments as they are executed.
example: "true"
ports:
- value: 8443
modules:
repositories:
- name: cct_module
git:
url: https://github.com/jboss-openshift/cct_module.git
ref: 0.44.0
- name: jboss-eap-modules
git:
url: https://github.com/jboss-container-images/jboss-eap-modules.git
ref: EAP_740_BETA_CR1
- name: jboss-eap-7-image
git:
url: https://github.com/jboss-container-images/jboss-eap-7-image.git
ref: EAP_740_BETA_CR1
- name: wildfly-cekit-modules
git:
url: https://github.com/wildfly/wildfly-cekit-modules.git
ref: 0.22.1
install:
- name: jboss.container.openjdk.jdk
version: "11"
- name: jboss.container.maven
version: "8.0.3.5"
- name: eap-74-beta-galleon-latest
- name: jboss.container.eap.setup
- name: eap-install-cleanup
# This one indirectly installs common logging by creating a link to $BIN_HOME/bin/launch
# so must be after jboss.container.eap.cd
- name: jboss.container.maven.default
- name: dynamic-resources
- name: jboss.container.eap.s2i.galleon
- name: jboss.container.eap.galleon
- name: jboss.container.eap.galleon.config.ee
- name: jboss.container.eap.galleon.build-settings
version: "public"
- name: jboss.container.eap.openshift.modules
- name: os-eap-activemq-rar
version: "1.1"
- name: jboss.container.eap.amq6
- name: jboss.container.java.jvm.bash
- name: jboss.container.eap.launch
- name: jboss.container.wildfly.launch.admin
- name: jboss.container.wildfly.launch.access-log-valve
- name: jboss.container.wildfly.launch-config.config
- name: jboss.container.wildfly.launch-config.os
- name: jboss.container.wildfly.launch.datasources
- name: jboss.container.wildfly.launch.extensions
- name: jboss.container.wildfly.launch.json-logging
- name: jboss.container.wildfly.launch.jgroups
- name: jboss.container.wildfly.launch.filters
- name: jboss.container.wildfly.launch.logger-category
- name: jboss.container.wildfly.launch.os.node-name
- name: jboss.container.wildfly.launch.deployment-scanner
- name: jboss.container.wildfly.launch.keycloak
- name: jboss.container.wildfly.launch.https
- name: jboss.container.wildfly.launch.security-domains
- name: jboss.container.wildfly.launch.elytron
- name: jboss.container.wildfly.launch.port-offset
- name: jboss.container.wildfly.launch.resource-adapters
- name: jboss.container.wildfly.launch.messaging
# needs to be before fp-content.keycloak to copy modules used to generate galleon packages
- name: os-eap70-sso
- name: jboss.container.wildfly.galleon.fp-content.keycloak
- name: jboss.container.wildfly.galleon.fp-content.jolokia
- name: jboss.container.wildfly.galleon.fp-content.java
- name: jboss.container.wildfly.galleon.fp-content.config
- name: jboss.container.wildfly.galleon.fp-content.mvn
- name: jboss.container.wildfly.galleon.fp-content.ejb-tx-recovery
- name: os-eap-probes
version: "3.0"
# We keep this one to only advertise that hawkular is no more supported.
- name: jboss.container.eap.hawkular
- name: openshift-layer
- name: openshift-passwd
- name: jboss.container.util.logging.bash
- name: jboss.container.eap.prometheus.config
- name: os-eap-txnrecovery.run
version: 'python3'

# At this point, all scripts must have been added to JBOSS_HOME and to custom galleon packages location
- name: jboss.container.wildfly.galleon.build-feature-pack
- name: jboss.container.wildfly.galleon.provision-server
- name: jboss.container.eap.final-setup

# note that building in OSBS using ODCS requires a content set to be specified, these are done in the overrides
# cekit doesn't appear to allow this to be overriden from a default
#packages:
# content_sets_file: content_sets.yml

artifacts:
- name: maven-repo
target: maven-repo.zip
md5: 0bd3021cf60bb3898fea8dd3ae56c15f

run:
user: 185
cmd:
- "/opt/eap/bin/openshift-launch.sh"
osbs:
configuration:
container_file: container.yaml
repository:
name: containers/jboss-eap-74-beta-openjdk11-builder
branch: jb-eap-7.4-rhel-8
42 changes: 42 additions & 0 deletions rel-j9-11-overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
schema_version: 1

name: "jboss-eap-7-tech-preview/eap74-openj9-11-openshift-rhel8"
description: "The JBoss EAP 7.4.0.Beta image for OpenJDK 11 with OpenJ9"

labels:
- name: "com.redhat.component"
value: "jboss-eap-74-beta-openj9-11-builder-openshift-rhel8-container"

modules:
install:
- name: jboss.container.eap.galleon.build-settings
version: "osbs"
- name: os-eap-python
version: '3.6'
- name: jboss.container.java.rm-openjdk
- name: jboss.container.openjdk.jdk
version: "openj9-11"

packages:
manager: dnf
content_sets_file: content_sets_rhel8.yml

osbs:
configuration:
container:
platforms:
only:
- s390x
- ppc64le
compose:
pulp_repos: true
packages:
- java-11-openj9
- java-11-openj9-headless
- java-11-openj9-devel
signing_intent: release
inherit: true
repository:
name: containers/jboss-eap-74-beta-openj9-11-builder
branch: jb-eap-7.4-rhel-8

Loading

0 comments on commit 81300ec

Please sign in to comment.