diff --git a/os-sso73/added/import-realm.json b/os-sso73/added/import-realm.json new file mode 100644 index 00000000..1c9f1df3 --- /dev/null +++ b/os-sso73/added/import-realm.json @@ -0,0 +1,4 @@ +[ { + "realm" : "##REALM##", + "enabled" : true +} ] diff --git a/os-sso73/added/index.html b/os-sso73/added/index.html new file mode 100644 index 00000000..6feab05a --- /dev/null +++ b/os-sso73/added/index.html @@ -0,0 +1,6 @@ +!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> + + + + + diff --git a/os-sso73/added/launch/add-sso-admin-user.sh b/os-sso73/added/launch/add-sso-admin-user.sh new file mode 100755 index 00000000..0b4293e2 --- /dev/null +++ b/os-sso73/added/launch/add-sso-admin-user.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +function prepareEnv() { + unset SSO_ADMIN_USERNAME + unset SSO_ADMIN_PASSWORD +} + +function configure() { + add_admin_user +} + +function add_admin_user() { + if [ -n "$SSO_ADMIN_USERNAME" ] && [ -n "$SSO_ADMIN_PASSWORD" ]; then + /opt/eap/bin/add-user-keycloak.sh -r master -u $SSO_ADMIN_USERNAME -p $SSO_ADMIN_PASSWORD + fi +} + diff --git a/os-sso73/added/launch/add-sso-realm.sh b/os-sso73/added/launch/add-sso-realm.sh new file mode 100755 index 00000000..bbfa4d21 --- /dev/null +++ b/os-sso73/added/launch/add-sso-realm.sh @@ -0,0 +1,28 @@ +#!/bin/bash + +function prepareEnv() { + unset SSO_REALM + unset IMPORT_REALM_FILE + unset SSO_SERVICE_USERNAME + unset SSO_SERVICE_PASSWORD +} + +function configure() { + realm_import +} + +function realm_import() { + if [ -n "$SSO_REALM" ]; then + sed -i "s|##REALM##|${SSO_REALM}|" "${IMPORT_REALM_FILE}" + + if [ -n "$SSO_SERVICE_USERNAME" ]; then + + if [ -n "$SSO_SERVICE_PASSWORD" ]; then + $JBOSS_HOME/bin/add-user-keycloak.sh -r $SSO_REALM -u $SSO_SERVICE_USERNAME -p $SSO_SERVICE_PASSWORD --roles realm-management/realm-admin + fi + fi + + SSO_IMPORT_FILE="$IMPORT_REALM_FILE" + fi +} + diff --git a/os-sso73/added/launch/datasource.sh b/os-sso73/added/launch/datasource.sh new file mode 100644 index 00000000..fe24c200 --- /dev/null +++ b/os-sso73/added/launch/datasource.sh @@ -0,0 +1,89 @@ +source $JBOSS_HOME/bin/launch/datasource-common.sh + +function prepareEnv() { + clearDatasourcesEnv + clearTxDatasourceEnv +} + +function configure() { + NON_XA_DATASOURCE="true" + DB_JNDI="java:jboss/datasources/KeycloakDS" + DB_POOL="KeycloakDS" + + inject_datasources +} + +function configureEnv() { + inject_external_datasources +} + +function inject_datasources() { + inject_datasources_common + + inject_default_job_repositories +} + +function generate_datasource() { + local pool_name="${1}" + local jndi_name="${2}" + local username="${3}" + local password="${4}" + local host="${5}" + local port="${6}" + local databasename="${7}" + local checker="${8}" + local sorter="${9}" + local driver="${10}" + local service_name="${11}" + local jta="${12}" + local validate="${13}" + local url="${14}" + + generate_datasource_common "${1}" "${2}" "${3}" "${4}" "${5}" "${6}" "${7}" "${8}" "${9}" "${10}" "${11}" "${12}" "${13}" "${14}" + + if [ -z "$service_name" ]; then + service_name="ExampleDS" + pool_name="ExampleDS" + if [ -n "$DB_POOL" ]; then + pool_name="$DB_POOL" + fi + fi + + if [ -n "$DEFAULT_JOB_REPOSITORY" -a "$DEFAULT_JOB_REPOSITORY" = "${service_name}" ]; then + inject_default_job_repository $pool_name + inject_job_repository $pool_name + fi + + if [ -z "$DEFAULT_JOB_REPOSITORY" ]; then + inject_default_job_repository in-memory + fi + +} + +# $1 - refresh-interval +function refresh_interval() { + echo "refresh-interval=\"$1\"" +} + +function inject_default_job_repositories() { + defaultjobrepo=" " + + sed -i "s||${defaultjobrepo%$'\n'}|g" $CONFIG_FILE +} + +# Arguments: +# $1 - default job repository name +function inject_default_job_repository() { + defaultjobrepo=" " + + sed -i "s||${defaultjobrepo%$'\n'}|" $CONFIG_FILE +} + +function inject_job_repository() { + jobrepo=" \ + \ + \ + " + + sed -i "s||${jobrepo%$'\n'}|" $CONFIG_FILE +} diff --git a/os-sso73/added/launch/keycloak-server-notruststore.json b/os-sso73/added/launch/keycloak-server-notruststore.json new file mode 100644 index 00000000..b2b22d4d --- /dev/null +++ b/os-sso73/added/launch/keycloak-server-notruststore.json @@ -0,0 +1,71 @@ +{ + "admin": { + "realm": "master" + }, + + "eventsStore": { + "provider": "jpa", + "jpa": { + "exclude-events": [ "REFRESH_TOKEN" ] + } + }, + + "realm": { + "provider": "jpa" + }, + + "user": { + "provider": "jpa" + }, + + "userCache": { + "default" : { + "enabled": true + } + }, + + "userSessionPersister": { + "provider": "jpa" + }, + + "timer": { + "provider": "basic" + }, + + "theme": { + "staticMaxAge": 2592000, + "cacheTemplates": true, + "cacheThemes": true, + "folder": { + "dir": "${jboss.home.dir}/themes" + } + }, + + "scheduled": { + "interval": 900 + }, + + "connectionsHttpClient": { + "default": {} + }, + + "connectionsJpa": { + "default": { + "dataSource": "java:jboss/datasources/KeycloakDS", + "databaseSchema": "update" + } + }, + + "realmCache": { + "default" : { + "enabled": true + } + }, + + "connectionsInfinispan": { + "provider": "default", + "default": { + "cacheContainer" : "java:comp/env/infinispan/Keycloak" + } + } +} diff --git a/os-sso73/added/launch/keycloak-spi.sh b/os-sso73/added/launch/keycloak-spi.sh new file mode 100755 index 00000000..5ef0ee23 --- /dev/null +++ b/os-sso73/added/launch/keycloak-spi.sh @@ -0,0 +1,23 @@ +#!/bin/bash + +function prepareEnv() { + unset SSO_TRUSTSTORE + unset SSO_TRUSTSTORE_DIR + unset SSO_TRUSTSTORE_PASSWORD +} + +function configure() { + add_truststore +} + +function add_truststore() { + + if [ -n "$SSO_TRUSTSTORE" ] && [ -n "$SSO_TRUSTSTORE_DIR" ] && [ -n "$SSO_TRUSTSTORE_PASSWORD" ]; then + + local truststore="" + + sed -i "s||${truststore}|" "${CONFIG_FILE}" + + fi +} + diff --git a/os-sso73/added/launch/openshift-common.sh b/os-sso73/added/launch/openshift-common.sh new file mode 100755 index 00000000..f0bed859 --- /dev/null +++ b/os-sso73/added/launch/openshift-common.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# Openshift EAP launch script + +if [ "${SCRIPT_DEBUG}" = "true" ] ; then + set -x + echo "Script debugging is enabled, allowing bash commands and their arguments to be printed as they are executed" +fi + +CONFIG_FILE=$JBOSS_HOME/standalone/configuration/standalone-openshift.xml +LOGGING_FILE=$JBOSS_HOME/standalone/configuration/logging.properties + +#For backward compatibility +ADMIN_USERNAME=${ADMIN_USERNAME:-${EAP_ADMIN_USERNAME:-$DEFAULT_ADMIN_USERNAME}} +ADMIN_PASSWORD=${ADMIN_PASSWORD:-$EAP_ADMIN_PASSWORD} +NODE_NAME=${NODE_NAME:-$EAP_NODE_NAME} +HTTPS_NAME=${HTTPS_NAME:-$EAP_HTTPS_NAME} +HTTPS_PASSWORD=${HTTPS_PASSWORD:-$EAP_HTTPS_PASSWORD} +HTTPS_KEYSTORE_DIR=${HTTPS_KEYSTORE_DIR:-$EAP_HTTPS_KEYSTORE_DIR} +HTTPS_KEYSTORE=${HTTPS_KEYSTORE:-$EAP_HTTPS_KEYSTORE} +SECDOMAIN_USERS_PROPERTIES=${SECDOMAIN_USERS_PROPERTIES:-${EAP_SECDOMAIN_USERS_PROPERTIES:-users.properties}} +SECDOMAIN_ROLES_PROPERTIES=${SECDOMAIN_ROLES_PROPERTIES:-${EAP_SECDOMAIN_ROLES_PROPERTIES:-roles.properties}} +SECDOMAIN_NAME=${SECDOMAIN_NAME:-$EAP_SECDOMAIN_NAME} +SECDOMAIN_PASSWORD_STACKING=${SECDOMAIN_PASSWORD_STACKING:-$EAP_SECDOMAIN_PASSWORD_STACKING} + +IMPORT_REALM_FILE=$JBOSS_HOME/standalone/configuration/import-realm.json + +CONFIGURE_SCRIPTS=( + $JBOSS_HOME/bin/launch/configure_extensions.sh + $JBOSS_HOME/bin/launch/passwd.sh + $JBOSS_HOME/bin/launch/datasource.sh + $JBOSS_HOME/bin/launch/resource-adapter.sh + $JBOSS_HOME/bin/launch/admin.sh + $JBOSS_HOME/bin/launch/ha.sh + $JBOSS_HOME/bin/launch/openshift-x509.sh + $JBOSS_HOME/bin/launch/jgroups.sh + $JBOSS_HOME/bin/launch/https.sh + $JBOSS_HOME/bin/launch/json_logging.sh + $JBOSS_HOME/bin/launch/security-domains.sh + $JBOSS_HOME/bin/launch/jboss_modules_system_pkgs.sh + $JBOSS_HOME/bin/launch/deploymentScanner.sh + $JBOSS_HOME/bin/launch/ports.sh + $JBOSS_HOME/bin/launch/access_log_valve.sh + $JBOSS_HOME/bin/launch/add-sso-admin-user.sh + $JBOSS_HOME/bin/launch/add-sso-realm.sh + $JBOSS_HOME/bin/launch/keycloak-spi.sh + $JBOSS_HOME/bin/launch/access_log_valve.sh + /opt/run-java/proxy-options +) diff --git a/os-sso73/added/launch/openshift-x509.sh b/os-sso73/added/launch/openshift-x509.sh new file mode 100755 index 00000000..d56b7abb --- /dev/null +++ b/os-sso73/added/launch/openshift-x509.sh @@ -0,0 +1,113 @@ +#!/bin/bash + +# Import logging module +source $JBOSS_HOME/bin/launch/logging.sh + +function prepareEnv() { + unset X509_CA_BUNDLE +} + +function configure() { + autogenerate_keystores +} + +function autogenerate_keystores() { + # Keystore infix notation as used in templates to keystore name mapping + declare -A KEYSTORES=( ["https"]="HTTPS" ["jgroups"]="JGroups" ) + + # CLOUD-2436 Don't generate the JGroups keystore if custom + # JGROUPS_ENCRYPT_SECRET was provided + if [ -n "${JGROUPS_ENCRYPT_SECRET}" ]; then + unset KEYSTORES["jgroups"] + fi + + local KEYSTORES_STORAGE="${JBOSS_HOME}/keystores" + if [ ! -d "${KEYSTORES_STORAGE}" ]; then + mkdir -p "${KEYSTORES_STORAGE}" + fi + + # Auto-generate the HTTPS and JGroups keystores if volumes for OpenShift's + # serving x509 certificate secrets service were properly mounted + for KEYSTORE_TYPE in "${!KEYSTORES[@]}"; do + + local X509_KEYSTORE_DIR="/etc/x509/${KEYSTORE_TYPE}" + local X509_CRT="tls.crt" + local X509_KEY="tls.key" + local NAME="rh-sso-${KEYSTORE_TYPE}-key" + local PASSWORD=$(openssl rand -base64 32) + local JKS_KEYSTORE_FILE="${KEYSTORE_TYPE}-keystore.jks" + local PKCS12_KEYSTORE_FILE="${KEYSTORE_TYPE}-keystore.pk12" + + if [ -d "${X509_KEYSTORE_DIR}" ]; then + + log_info "Creating ${KEYSTORES[$KEYSTORE_TYPE]} keystore via OpenShift's service serving x509 certificate secrets.." + + openssl pkcs12 -export \ + -name "${NAME}" \ + -inkey "${X509_KEYSTORE_DIR}/${X509_KEY}" \ + -in "${X509_KEYSTORE_DIR}/${X509_CRT}" \ + -out "${KEYSTORES_STORAGE}/${PKCS12_KEYSTORE_FILE}" \ + -password pass:"${PASSWORD}" >& /dev/null + + keytool -importkeystore -noprompt \ + -srcalias "${NAME}" -destalias "${NAME}" \ + -srckeystore "${KEYSTORES_STORAGE}/${PKCS12_KEYSTORE_FILE}" \ + -srcstoretype pkcs12 \ + -destkeystore "${KEYSTORES_STORAGE}/${JKS_KEYSTORE_FILE}" \ + -storepass "${PASSWORD}" -srcstorepass "${PASSWORD}" >& /dev/null + + if [ -f "${KEYSTORES_STORAGE}/${JKS_KEYSTORE_FILE}" ]; then + log_info "${KEYSTORES[$KEYSTORE_TYPE]} keystore successfully created at: ${KEYSTORES_STORAGE}/${JKS_KEYSTORE_FILE}" + fi + + # Propagate values of NAME, PASSWORD, KEYSTORES_STORAGE, and JKS_KEYSTORE_FILE variables + # to appropriate variables used by subsequent modules depending on KEYSTORE_TYPE + # (IOW either set HTTPS_ or JGROUPS_ENCRYPT_ variables) + [ "${KEYSTORE_TYPE}" == "https" ] && HTTPS_NAME="${NAME}" || JGROUPS_ENCRYPT_NAME="${NAME}" + [ "${KEYSTORE_TYPE}" == "https" ] && HTTPS_PASSWORD="${PASSWORD}" || JGROUPS_ENCRYPT_PASSWORD="${PASSWORD}" + [ "${KEYSTORE_TYPE}" == "https" ] && HTTPS_KEYSTORE_DIR="${KEYSTORES_STORAGE}" || JGROUPS_ENCRYPT_KEYSTORE_DIR="${KEYSTORES_STORAGE}" + [ "${KEYSTORE_TYPE}" == "https" ] && HTTPS_KEYSTORE="${JKS_KEYSTORE_FILE}" || JGROUPS_ENCRYPT_KEYSTORE="${JKS_KEYSTORE_FILE}" + + fi + + done + + # Auto-generate the RH-SSO truststore if X509_CA_BUNDLE was provided + local -r X509_CRT_DELIMITER="/-----BEGIN CERTIFICATE-----/" + local JKS_TRUSTSTORE_FILE="truststore.jks" + local JKS_TRUSTSTORE_PATH="${KEYSTORES_STORAGE}/${JKS_TRUSTSTORE_FILE}" + local PASSWORD=$(openssl rand -base64 32) + if [ -n "${X509_CA_BUNDLE}" ]; then + log_info "Creating RH-SSO truststore.." + csplit -s -z -f crt- "${X509_CA_BUNDLE}" "${X509_CRT_DELIMITER}" '{*}' + for CERT_FILE in crt-*; do + keytool -import -noprompt -keystore "${JKS_TRUSTSTORE_PATH}" -file "${CERT_FILE}" \ + -storepass "${PASSWORD}" -alias "service-${CERT_FILE}" >& /dev/null + done + + if [ -f "${JKS_TRUSTSTORE_PATH}" ]; then + log_info "RH-SSO truststore successfully created at: ${JKS_TRUSTSTORE_PATH}" + fi + + # Import existing system CA certificates into the newly generated truststore + local SYSTEM_CACERTS=$(readlink -e $(dirname $(readlink -e $(which keytool)))"/../lib/security/cacerts") + if keytool -v -list -keystore "${SYSTEM_CACERTS}" -storepass "changeit" > /dev/null; then + log_info "Importing certificates from system's Java CA certificate bundle into RH-SSO truststore.." + keytool -importkeystore -noprompt \ + -srckeystore "${SYSTEM_CACERTS}" \ + -destkeystore "${JKS_TRUSTSTORE_PATH}" \ + -srcstoretype jks -deststoretype jks \ + -storepass "${PASSWORD}" -srcstorepass "changeit" >& /dev/null + if [ "$?" -eq "0" ]; then + log_info "Successfully imported certificates from system's Java CA certificate bundle into RH-SSO truststore at: ${JKS_TRUSTSTORE_PATH}" + else + log_error "Failed to import certificates from system's Java CA certificate bundle into RH-SSO truststore!" + fi + fi + + # Propagate the trustore related variables to subsequent modules + SSO_TRUSTSTORE_PASSWORD="${PASSWORD}" + SSO_TRUSTSTORE_DIR="${KEYSTORES_STORAGE}" + SSO_TRUSTSTORE="${JKS_TRUSTSTORE_FILE}" + fi +} diff --git a/os-sso73/added/openshift-launch.sh b/os-sso73/added/openshift-launch.sh new file mode 100755 index 00000000..cc8db872 --- /dev/null +++ b/os-sso73/added/openshift-launch.sh @@ -0,0 +1,70 @@ +#!/bin/sh +# Openshift EAP launch script + +source ${JBOSS_HOME}/bin/launch/openshift-common.sh +source $JBOSS_HOME/bin/launch/logging.sh + +# TERM signal handler +function clean_shutdown() { + log_error "*** JBossAS wrapper process ($$) received TERM signal ***" + $JBOSS_HOME/bin/jboss-cli.sh -c ":shutdown(timeout=60)" + wait $! +} + +function runServer() { + local instanceDir=$1 + local count=$2 + export NODE_NAME="${NODE_NAME:-node}-${count}" + + source $JBOSS_HOME/bin/launch/configure.sh + + log_info "Running $JBOSS_IMAGE_NAME image, version $JBOSS_IMAGE_VERSION" + + trap "clean_shutdown" TERM + + if [ -n "$SSO_IMPORT_FILE" ] && [ -f $SSO_IMPORT_FILE ]; then + $JBOSS_HOME/bin/standalone.sh -c standalone-openshift.xml -bmanagement 127.0.0.1 $JBOSS_HA_ARGS -Djboss.server.data.dir="$instanceDir" ${JBOSS_MESSAGING_ARGS} -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=${SSO_IMPORT_FILE} -Dkeycloak.migration.strategy=IGNORE_EXISTING ${JAVA_PROXY_OPTIONS} & + else + $JBOSS_HOME/bin/standalone.sh -c standalone-openshift.xml -bmanagement 127.0.0.1 $JBOSS_HA_ARGS -Djboss.server.data.dir="$instanceDir" ${JBOSS_MESSAGING_ARGS} ${JAVA_PROXY_OPTIONS} & + fi + + PID=$! + wait $PID 2>/dev/null + wait $PID 2>/dev/null +} + +function init_data_dir() { + local DATA_DIR="$1" + if [ -d "${JBOSS_HOME}/standalone/data" ]; then + cp -rf ${JBOSS_HOME}/standalone/data/* $DATA_DIR + fi +} + +if [ "${SPLIT_DATA^^}" = "TRUE" ]; then + source /opt/partition/partitionPV.sh + + DATA_DIR="${JBOSS_HOME}/standalone/partitioned_data" + + partitionPV "${DATA_DIR}" "${SPLIT_LOCK_TIMEOUT:-30}" +else + source $JBOSS_HOME/bin/launch/configure.sh + + log_info "Running $JBOSS_IMAGE_NAME image, version $JBOSS_IMAGE_VERSION" + + trap "clean_shutdown" TERM + + if [ -n "$CLI_GRACEFUL_SHUTDOWN" ] ; then + trap "" TERM + log_info "Using CLI Graceful Shutdown instead of TERM signal" + fi + + if [ -n "$SSO_IMPORT_FILE" ] && [ -f $SSO_IMPORT_FILE ]; then + $JBOSS_HOME/bin/standalone.sh -c standalone-openshift.xml -bmanagement 127.0.0.1 $JBOSS_HA_ARGS ${JBOSS_MESSAGING_ARGS} -Dkeycloak.migration.action=import -Dkeycloak.migration.provider=singleFile -Dkeycloak.migration.file=${SSO_IMPORT_FILE} -Dkeycloak.migration.strategy=IGNORE_EXISTING ${JAVA_PROXY_OPTIONS} & + else + $JBOSS_HOME/bin/standalone.sh -c standalone-openshift.xml -bmanagement 127.0.0.1 $JBOSS_HA_ARGS ${JBOSS_MESSAGING_ARGS} ${JAVA_PROXY_OPTIONS} & + fi + + PID=$! + wait $PID 2>/dev/null + wait $PID 2>/dev/null +fi diff --git a/os-sso73/added/openshift-migrate.sh b/os-sso73/added/openshift-migrate.sh new file mode 100755 index 00000000..2e23348e --- /dev/null +++ b/os-sso73/added/openshift-migrate.sh @@ -0,0 +1,7 @@ +#!/bin/sh +# Openshift SSO migration script + +RECOVERY_TIMEOUT=${RECOVERY_TIMEOUT:-360} +RECOVERY_PAUSE=${RECOVERY_PAUSE:-10} + +source ${JBOSS_HOME}/bin/launch/openshift-migrate-common.sh diff --git a/os-sso73/added/standalone-openshift.xml b/os-sso73/added/standalone-openshift.xml new file mode 100644 index 00000000..2d18c473 --- /dev/null +++ b/os-sso73/added/standalone-openshift.xml @@ -0,0 +1,651 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + jdbc:h2:mem:test;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE + h2 + + sa + sa + + + + + org.h2.jdbcx.JdbcDataSource + + + com.mysql.jdbc.jdbc2.optional.MysqlXADataSource + + + org.postgresql.xa.PGXADataSource + + + + + + + + + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + auth + + classpath:${jboss.home.dir}/providers/* + + master + 900 + + 2592000 + true + true + ${jboss.home.dir}/themes + + + + + + + + + + + + + jpa + + + basic + + + + + + + + + + + + + + + + + + + default + + + + + + + + ${keycloak.jta.lookup.provider:jboss} + + + + + + + + + + + ${keycloak.x509cert.lookup.provider:default} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/os-sso73/configure.sh b/os-sso73/configure.sh new file mode 100755 index 00000000..fdea9106 --- /dev/null +++ b/os-sso73/configure.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +SCRIPT_DIR=$(dirname $0) +ADDED_DIR=${SCRIPT_DIR}/added + +cp ${ADDED_DIR}/standalone-openshift.xml $JBOSS_HOME/standalone/configuration +cp ${ADDED_DIR}/import-realm.json $JBOSS_HOME/standalone/configuration +cp ${ADDED_DIR}/openshift-launch.sh ${ADDED_DIR}/openshift-migrate.sh $JBOSS_HOME/bin/ + +mkdir -p ${JBOSS_HOME}/bin/launch +cp -r ${ADDED_DIR}/launch/* ${JBOSS_HOME}/bin/launch + +mkdir ${JBOSS_HOME}/root-app-redirect +cp ${ADDED_DIR}/index.html ${JBOSS_HOME}/root-app-redirect +rm -rf ${JBOSS_HOME}/welcome-content + +chown -R jboss:root $JBOSS_HOME +chmod -R g+rwX $JBOSS_HOME diff --git a/os-sso73/module.yaml b/os-sso73/module.yaml new file mode 100644 index 00000000..e229f602 --- /dev/null +++ b/os-sso73/module.yaml @@ -0,0 +1,24 @@ +schema_version: 1 +name: os-sso73 +version: '1.0' +description: Legacy os-sso73 script package. + +modules: + install: + - name: os-eap-launch + - name: os-eap7-launch + - name: os-eap-migration + +packages: + repositories: + - jboss-os + install: + - openssl + +execute: +- script: configure.sh + +run: + user: 185 + cmd: + - "/opt/eap/bin/openshift-launch.sh"