Skip to content

Commit

Permalink
CLOUD-2969 move to rhel7 base image; move product installation to mod…
Browse files Browse the repository at this point in the history
…ules (#48)

Signed-off-by: rcernich <[email protected]>
  • Loading branch information
rcernich authored and luck3y committed Dec 18, 2018
1 parent 6caf2e4 commit 0358caf
Show file tree
Hide file tree
Showing 13 changed files with 184 additions and 71 deletions.
67 changes: 12 additions & 55 deletions image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,68 +3,25 @@ schema_version: 1
name: "jboss-eap-6/eap64"
description: "Red Hat JBoss Enterprise Application Platform 6.4 container image"
version: "6.4.21"
from: "jboss/openjdk18-rhel7:1.1"
from: "rhel7:7-released"
labels:
- name: "com.redhat.component"
value: "jboss-eap-6-eap64-container"
- name: "org.jboss.product"
value: "eap"
- name: "org.jboss.product.version"
value: "6.4.21.GA"
- name: "org.jboss.product.eap.version"
value: "6.4.21.GA"
- name: "org.jboss.deployments-dir"
value: "/opt/eap/standalone/deployments"
- name: "com.redhat.deployments-dir"
value: "/opt/eap/standalone/deployments"
- name: "com.redhat.dev-mode"
value: "DEBUG:true"
description: "Environment variable used to enable development mode (debugging). A value of true will enable development mode."
- name: "com.redhat.dev-mode.port"
value: "DEBUG_PORT:8787"
description: "Environment variable used to specify the debug port. If not set, the default EAP debug port will be used (8787). Only applicable when development mode is enabled."
envs:
- name: "LAUNCH_JBOSS_IN_BACKGROUND"
value: "true"
- name: "JBOSS_PRODUCT"
value: "eap"
- name: "JBOSS_EAP_VERSION"
value: "6.4.21.GA"
- name: "PRODUCT_VERSION"
value: "6.4.21.GA"
- name: "JBOSS_HOME"
value: "/opt/eap"
- name: "DEBUG"
example: "true"
description: "Specify true to enable development mode (debugging)."
- name: "DEBUG_PORT"
example: "8787"
description: "Specify the port to use for debugging. If not set, the default EAP debug port will be used (8787). Only applicable when development mode is enabled."
ports:
- value: 8080
- value: 8787
expose: false
packages:
repositories:
- name: base
id: rhel-7-server-rpms
modules:
repositories:
- name: cct_module
git:
url: https://github.com/jboss-openshift/cct_module.git
ref: master
- path: modules
install:
- name: eap
artifacts:
- path: jboss-eap-6.4.0.zip
description: "Artifact is available on Customer Portal: https://access.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=37393&product=appplatform&version=6.4&downloadType=distributions"
md5: 9a5d37631919a111ddf42ceda1a9f0b5
- path: jboss-eap-6.4.9-patch.zip
md5: fdc6cd3bf51ba2714b98de2923266537
- path: jboss-eap-6.4.19-patch.zip
sha256: 02d46374ef3fa226655a29216fa9d95b379c1037a4dc3c5d1b23869495ff6ebc
- path: jboss-eap-6.4.21-patch.zip
md5: 70876697dc6b8022c3981bcec91820fb
run:
user: 185
cmd:
- "/opt/eap/bin/standalone.sh"
- "-b"
- "0.0.0.0"
- name: jboss.container.openjdk.jdk
version: "8"
- name: eap-6.4-latest
osbs:
repository:
name: containers/jboss-eap-6
Expand Down
8 changes: 8 additions & 0 deletions modules/eap/6.4-latest/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
schema_version: 1

name: "eap-6.4-latest"
description: "Red Hat JBoss Enterprise Application Platform 6.4 latest version install module"
modules:
install:
- name: eap-6.4.21
- name: eap-install-cleanup
11 changes: 11 additions & 0 deletions modules/eap/6.4.0/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

set -e

SOURCES_DIR=/tmp/artifacts/
DISTRIBUTION_ZIP="jboss-eap-6.4.0.zip"
EAP_VERSION="6.4"

unzip -q $SOURCES_DIR/$DISTRIBUTION_ZIP
mv jboss-eap-$EAP_VERSION $JBOSS_HOME

55 changes: 55 additions & 0 deletions modules/eap/6.4.0/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
schema_version: 1

name: "eap-6.4.0"
description: "Red Hat JBoss Enterprise Application Platform 6.4.0 install"
labels:
- name: "org.jboss.product"
value: "eap"
- name: "org.jboss.product.version"
value: "6.4.0.GA"
- name: "org.jboss.product.eap.version"
value: "6.4.0.GA"
- name: "org.jboss.deployments-dir"
value: "/opt/eap/standalone/deployments"
- name: "com.redhat.deployments-dir"
value: "/opt/eap/standalone/deployments"
- name: "com.redhat.dev-mode"
value: "DEBUG:true"
description: "Environment variable used to enable development mode (debugging). A value of true will enable development mode."
- name: "com.redhat.dev-mode.port"
value: "DEBUG_PORT:8787"
description: "Environment variable used to specify the debug port. If not set, the default EAP debug port will be used (8787). Only applicable when development mode is enabled."
envs:
- name: "LAUNCH_JBOSS_IN_BACKGROUND"
value: "true"
- name: "JBOSS_PRODUCT"
value: "eap"
- name: "JBOSS_EAP_VERSION"
value: "6.4.0.GA"
- name: "PRODUCT_VERSION"
value: "6.4.0.GA"
- name: "JBOSS_HOME"
value: "/opt/eap"
- name: "DEBUG"
example: "true"
description: "Specify true to enable development mode (debugging)."
- name: "DEBUG_PORT"
example: "8787"
description: "Specify the port to use for debugging. If not set, the default EAP debug port will be used (8787). Only applicable when development mode is enabled."
ports:
- value: 8080
- value: 8787
expose: false
artifacts:
- path: jboss-eap-6.4.0.zip
description: "Artifact is available on Customer Portal: https://access.redhat.com/jbossnetwork/restricted/softwareDetail.html?softwareId=37393&product=appplatform&version=6.4&downloadType=distributions"
md5: 9a5d37631919a111ddf42ceda1a9f0b5
run:
user: 185
cmd:
- "/opt/eap/bin/standalone.sh"
- "-b"
- "0.0.0.0"
execute:
- script: install.sh

7 changes: 7 additions & 0 deletions modules/eap/6.4.19/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

SOURCES_DIR=/tmp/artifacts/

$JBOSS_HOME/bin/jboss-cli.sh --command="patch apply $SOURCES_DIR/jboss-eap-6.4.19-patch.zip"
22 changes: 22 additions & 0 deletions modules/eap/6.4.19/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
schema_version: 1

name: "eap-6.4.19"
description: "Red Hat JBoss Enterprise Application Platform 6.4.19 patch upgrade"
labels:
- name: "org.jboss.product.version"
value: "6.4.19.GA"
- name: "org.jboss.product.eap.version"
value: "6.4.19.GA"
envs:
- name: "JBOSS_EAP_VERSION"
value: "6.4.19.GA"
- name: "PRODUCT_VERSION"
value: "6.4.19.GA"
artifacts:
- path: jboss-eap-6.4.19-patch.zip
sha256: 02d46374ef3fa226655a29216fa9d95b379c1037a4dc3c5d1b23869495ff6ebc
modules:
install:
- name: eap-6.4.9
execute:
- script: install.sh
7 changes: 7 additions & 0 deletions modules/eap/6.4.21/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

SOURCES_DIR=/tmp/artifacts/

$JBOSS_HOME/bin/jboss-cli.sh --command="patch apply $SOURCES_DIR/jboss-eap-6.4.21-patch.zip"
22 changes: 22 additions & 0 deletions modules/eap/6.4.21/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
schema_version: 1

name: "eap-6.4.21"
description: "Red Hat JBoss Enterprise Application Platform 6.4.21 patch upgrade"
labels:
- name: "org.jboss.product.version"
value: "6.4.21.GA"
- name: "org.jboss.product.eap.version"
value: "6.4.21.GA"
envs:
- name: "JBOSS_EAP_VERSION"
value: "6.4.21.GA"
- name: "PRODUCT_VERSION"
value: "6.4.21.GA"
artifacts:
- path: jboss-eap-6.4.21-patch.zip
md5: 70876697dc6b8022c3981bcec91820fb
modules:
install:
- name: eap-6.4.19
execute:
- script: install.sh
7 changes: 7 additions & 0 deletions modules/eap/6.4.9/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -e

SOURCES_DIR=/tmp/artifacts/

$JBOSS_HOME/bin/jboss-cli.sh --command="patch apply $SOURCES_DIR/jboss-eap-6.4.9-patch.zip"
22 changes: 22 additions & 0 deletions modules/eap/6.4.9/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
schema_version: 1

name: "eap-6.4.9"
description: "Red Hat JBoss Enterprise Application Platform 6.4.9 patch upgrade"
labels:
- name: "org.jboss.product.version"
value: "6.4.9.GA"
- name: "org.jboss.product.eap.version"
value: "6.4.9.GA"
envs:
- name: "JBOSS_EAP_VERSION"
value: "6.4.9.GA"
- name: "PRODUCT_VERSION"
value: "6.4.9.GA"
artifacts:
- path: jboss-eap-6.4.9-patch.zip
md5: fdc6cd3bf51ba2714b98de2923266537
modules:
install:
- name: eap-6.4.0
execute:
- script: install.sh
16 changes: 5 additions & 11 deletions modules/eap/install.sh → modules/eap/install-cleanup/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,6 @@

set -e

SOURCES_DIR=/tmp/artifacts/
DISTRIBUTION_ZIP="jboss-eap-6.4.0.zip"
EAP_VERSION="6.4"

unzip -q $SOURCES_DIR/$DISTRIBUTION_ZIP
mv jboss-eap-$EAP_VERSION $JBOSS_HOME

$JBOSS_HOME/bin/jboss-cli.sh --command="patch apply $SOURCES_DIR/jboss-eap-6.4.9-patch.zip"
$JBOSS_HOME/bin/jboss-cli.sh --command="patch apply $SOURCES_DIR/jboss-eap-6.4.19-patch.zip"
$JBOSS_HOME/bin/jboss-cli.sh --command="patch apply $SOURCES_DIR/jboss-eap-6.4.21-patch.zip"

# https://issues.jboss.org/browse/CLOUD-1260
# https://issues.jboss.org/browse/CLOUD-1431
function remove_scrapped_jars {
Expand All @@ -34,6 +23,11 @@ function update_permissions {
}

function aggregate_patched_modules {
local sys_pkgs="$JBOSS_MODULES_SYSTEM_PKGS"
if [ -n "$sys_pkgs" ]; then
export JBOSS_MODULES_SYSTEM_PKGS=""
fi

export JBOSS_PIDFILE=/tmp/jboss.pid
cp -r $JBOSS_HOME/standalone /tmp/

Expand Down
6 changes: 6 additions & 0 deletions modules/eap/install-cleanup/module.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
schema_version: 1

name: "eap-install-cleanup"
description: "Cleans up filesystem after EAP installation and upgrades."
execute:
- script: install.sh
5 changes: 0 additions & 5 deletions modules/eap/module.yaml

This file was deleted.

0 comments on commit 0358caf

Please sign in to comment.