diff --git a/README.md b/README.md index b47daab..85e37fd 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,75 @@ # shuttle Shuttle Docker project -## [Shuttle 4.7.0 released at 13 October 2017](whatsnew-470.md) -## [Shuttle 4.8.0 released at 23 March 2018](whatsnew-480.md) -## [Shuttle 4.8.1 released at April 2018](whatsnew-481.md) +## Docker example with scientific linux + + +## Shuttle 4.8.1 released at April 2018 + +### What's New ? + +### General +- Improved performance when processing large volumes of data. +- Added support for SAML HTTP-Redirect binding mode. +#### Shuttle Client +- Improved Login menu behavior when working with multiple connections. +- Better support for configuration with multiple servers using SAML authentication + +## Shuttle 4.8.0 released at 23 March 2018 + +- What's new + + General + - Rebranding and UI improvements + - New kShuttle logo, icons, and branding elements. + - Redesigned and optimized installer screen flow. + - Multiple UI and usability improvements. + - Enhanced support of Cloud Operations and Administration + - New superuser user with full privileges to administrate server and users. + - Improved security of default admin supervisor. + - Improved authentication logic to fully support multiple authentication sources (embedded and/or LDAP). + - Improved Life Cycle management + - More reliable and secure repository life-cycle during create, clear, delete operations. + - Advanced repository meta-data to control backup and restore operations. + - Authentication sources life cycle now decoupled from repository’s. + - Robust security and seamless client deployment + - More advanced encryption capability to comply with ANSSI and NIST standards. + - Simplified proxy management with unified configuration. + + Shuttle Studio + - Improved UI and usability. + - Repository listing and operations + - User listing and operations + + Shuttle Client + - Brand new 64-bit version (in addition to 32-bit) to leverage full capabilities of 64-bit OS. + - Simplified proxy management with unified configuration. + - Improved support for system proxy configuration. + + Platform Policy + - Full support of both 32-bit and 64-bit OS for Shuttle clients. + - New support of Microsoft Windows 8.1 for Shuttle clients. + - New support of Microsoft Windows Server 2016 for Shuttle Server + - New support of Microsoft SQLServer 2016 for Shuttle datastore. + + +## Shuttle 4.7.0 released at 13 October 2017 + +### What's New ? + +#### General + +- Single-Sign On is now available with support of SAML v2 standard. +- Dropdown list on text cells: a text cell can be associated with a list of choices defined as a member list (enabling scripting). This option enables to guide users for their textual data input. The input can be limited to the choice list. +- Ability to export a report as a PowerPoint presentation through a script calling an external resource. +Important: You must have an external resource enabling to build PowerPoint presentations. +- Native support of proxy auto-config files (PAC) + +#### Shuttle Studio +- Improved treatment of columns/rows addition: spanned cells are automatically increased when impacted by an addition. +#### Shuttle Client +- Possibility to link to Shuttle Client screens through a share button enabling to copy the link or share it via e-mail. +- Improved the focus for comments: on the subject field when creating a comment, on the body field when answering to or editing a comment. +- Improved chart ranges order when values are missing. + + diff --git a/autoinstall/client_autoupdate.xml b/autoinstall/client_autoupdate.xml new file mode 100644 index 0000000..d562591 --- /dev/null +++ b/autoinstall/client_autoupdate.xml @@ -0,0 +1,40 @@ + + + + +${DATA_FOLDER}/shuttle/home + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/autoinstall/mysql_autoinstall.xml b/autoinstall/mysql_autoinstall.xml new file mode 100644 index 0000000..656bf6a --- /dev/null +++ b/autoinstall/mysql_autoinstall.xml @@ -0,0 +1,77 @@ + + + + +${DATA_FOLDER}/shuttle/home + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/autoinstall/oracle_autoinstall.xml b/autoinstall/oracle_autoinstall.xml new file mode 100644 index 0000000..1ae82aa --- /dev/null +++ b/autoinstall/oracle_autoinstall.xml @@ -0,0 +1,77 @@ + + + + +${DATA_FOLDER}/shuttle/home + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/autoinstall/postgres_autoinstall.xml b/autoinstall/postgres_autoinstall.xml new file mode 100644 index 0000000..88a8a7f --- /dev/null +++ b/autoinstall/postgres_autoinstall.xml @@ -0,0 +1,77 @@ + + + + +${DATA_FOLDER}/shuttle/home + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/autoinstall/sqlserver_autoinstall.xml b/autoinstall/sqlserver_autoinstall.xml new file mode 100644 index 0000000..00d3ea1 --- /dev/null +++ b/autoinstall/sqlserver_autoinstall.xml @@ -0,0 +1,77 @@ + + + + +${DATA_FOLDER}/shuttle/home + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bin/colorecho b/bin/colorecho new file mode 100644 index 0000000..c5027e4 --- /dev/null +++ b/bin/colorecho @@ -0,0 +1,20 @@ +#!/usr/bin/env bash + +ccred='\033[0;31m' +ccyellow='\033[0;33m' +ccgreen='\033[32m' +ccend='\033[0m' + +echo_red() { + echo -e "${ccred}$@${ccend}" +} + +echo_yellow() { + echo -e "${ccyellow}$@${ccend}" +} + +echo_green() { + echo -e "${ccgreen}$@${ccend}" +} + + diff --git a/bin/entrypoint.sh b/bin/entrypoint.sh new file mode 100644 index 0000000..a06f0ed --- /dev/null +++ b/bin/entrypoint.sh @@ -0,0 +1,108 @@ +#!/usr/bin/env bash +#set -e +source colorecho + + +# load default env if not defined +source env-defaults.sh + + +#-------------------------------------------------------------------------------------------- + + +[ ! -z $DEBUG ] && set -x + +# update timezone if TZ is define +timezone_update.sh + + +if [ "$1" = '--run' ]; then + + +# wait database available + echo_yellow "wait database ..." + ${DB_TYPE}_wait.sh + if [ $? -ne 0 ]; then + echo_red "database is not running " + exit -1 + fi + echo_green "database is up - executing command" + + +# Create license key file + echo $LICENSEKEY > /tmp/license.lic + +# If $DATA_FOLDER/shuttle does not exist then install for the 1st time + if [ ! -d $DATA_FOLDER/shuttle ]; then + echo_yellow "First time install, please wait ...." + shuttle_install.sh + fi + +# If $DATA_FOLDER/shuttle exist but licence key change + if [ -d $DATA_FOLDER/shuttle ]; then + diff /tmp/license.lic /data/shuttle/home/config/license.lic >/dev/null + if [ $? -ne 0 ]; then + echo_yellow "Update licence file with given LICENSEKEY" + cat /tmp/license.lic > /data/shuttle/home/config/license.lic + fi + fi + +# Force reinstall if there is any update in variables or if $SHUTTLE_RELEASE != $DATA_FOLDER/shuttle/RELEASE + if [ -d $DATA_FOLDER/shuttle ]; then + + + envsubst < /usr/local/shuttle/autoinstall/${DB_TYPE}_autoinstall.xml > /tmp/autoinstall.xml + + if [ ! -f $DATA_FOLDER/shuttle/.autoinstall.xml ]; then + cp /tmp/autoinstall.xml $DATA_FOLDER/shuttle/.autoinstall.xml + fi + + # if any update in variables, fore reinstall + diff /tmp/autoinstall.xml $DATA_FOLDER/shuttle/.autoinstall.xml >/dev/null + if [ $? -ne 0 ]; then + echo_yellow "Force reinstall cause of updates on variables ..." + shuttle_install.sh -f + # if currenrly release not equal to SHUTTLE_RELEASE, force reinstall + elif [ ! -f $DATA_FOLDER/shuttle/RELEASE ] || [ "${SHUTTLE_RELEASE}" != "$( /tmp/license.lic + + shuttle_install.sh "$@" +elif [ "$1" = '--cleanup' ]; then + shift 1 + shuttle_clean.sh "$@" + +elif [ "$1" = '--cleanup-database' ]; then + shift 1 + echo_red "delete database and user ..." + ${DB_TYPE}_clean.sh + echo_green "create database and user if needed ..." + ${DB_TYPE}_init.sh + +elif [ "$1" = '--help' ]; then + shift 1 + envsubst < /usr/local/shuttle/USAGE.md +else + exec "$@" + +fi diff --git a/bin/env-defaults.sh b/bin/env-defaults.sh new file mode 100644 index 0000000..2a603fe --- /dev/null +++ b/bin/env-defaults.sh @@ -0,0 +1,77 @@ +#!/bin/sh + +export DEBUG=${DEBUG:-} + + + +[ -z "${CATALINA_OPTS}" ] && export CATALINA_OPTS="-Xms512m -Xmx8192m -XX:MaxPermSize=256m -Dfile.encoding=UTF-8 -Djava.awt.headless=true" + +export TZ=${TZ:-Europe/Paris} + +export DATA_FOLDER=${DATA_FOLDER:-/data} +export CATALINA_BASE=${CATALINA_BASE:-/data/shuttle/instance} + +export DB_MAX_WAIT=${DB_MAX_WAIT:-30} +export DB_HOST=${DB_HOST:-db} +export DB_PORT=${DB_PORT:-5432} +export DB_TYPE=${DB_TYPE:-postgres} +export DB_CREATE_USER=${DB_CREATE_USER:-true} +export DB_SYSTEM_USER=${DB_SYSTEM_USER:-postgres} +export DB_SYSTEM_PASSWORD=${DB_SYSTEM_PASSWORD:-mysecretpassword} +export DB_SHUTTLE_REPO=${DB_SHUTTLE_REPO:-SHUT_REPO} +export DB_SHUTTLE_USER=${DB_SHUTTLE_USER:-shuttle} +export DB_SHUTTLE_PASSWORD=${DB_SHUTTLE_PASSWORD:-password} +export DB_INSTANCE=${DB_INSTANCE:-ORCLCDB} +export WEBAPP_NAME=${WEBAPP_NAME:-Shuttles} +export EXTERNAL_URL_PROTOCOL=${EXTERNAL_URL_PROTOCOL:-http} +export EXTERNAL_URL_PORT=${EXTERNAL_URL_PORT:-8080} +export EXTERNAL_URL_SERVER=${EXTERNAL_URL_SERVER:-localhost} +export KERBEROS_ENABLE=${KERBEROS_ENABLE:-false} +export PROXY_ENABLE=${PROXY_ENABLE:-true} +export PROXY_HOST=${PROXY_HOST:-} +export PROXY_PORT=${PROXY_PORT:-0} +export PROXY_USER=${PROXY_USER:-} +export PROXY_PASSWORD=${PROXY_PASSWORD:-} + + +export CLIENT_USESSL=${CLIENT_USESSL:-false} +[ "${EXTERNAL_URL_PROTOCOL}" == "https" ] && export CLIENT_USESSL=true + +export PROXY_USE_SHUTTLE_CREDENTIALS=${PROXY_USE_SHUTTLE_CREDENTIALS:-false} +#[ -z "${PROXY_USER}" ] && [ -z "${PROXY_PASSWORD}" ] && export PROXY_USE_SHUTTLE_CREDENTIALS=true + + +export PROXY_USE_DEFAULT_CONFIG=${PROXY_USE_DEFAULT_CONFIG:-false} +[ -z "${PROXY_HOST}" ] && [ -z "${PROXY_PORT}" ] && export PROXY_USE_DEFAULT_CONFIG=true + + +## update for 4.7 +export SAML_ENABLE=${SAML_ENABLE:-false} +export SSO_ENABLE=${SSO_ENABLE:-false} +export SSO_TYPE=${SSO_TYPE:-kerb} +([ "${SAML_ENABLE}" == "true" ] || [ "${KERBEROS_ENABLE}" == "true" ]) && export SSO_ENABLE=true +[ "${SAML_ENABLE}" == "true" ] && export SSO_TYPE=saml + + +export FORCE_INSTALL=${FORCE_INSTALL:-false} +export ALTERNATE_CONNEXION=${ALTERNATE_CONNEXION:-true} +export DEFAULT_CONNEXION_NAME=${DEFAULT_CONNEXION_NAME:-Default} +export ALTERNATE_CONNEXION_NAME=${ALTERNATE_CONNEXION_NAME:-standard} + +export JAXWS_ENABLE_MTOM=${JAXWS_ENABLE_MTOM:-true} + +## update for 4.8 +export FORCE_SUPERUSER=${FORCE_SUPERUSER:-false} +export FORCE_ADMIN=${FORCE_ADMIN:-false} +export ADMIN_PASSWORD=${ADMIN_PASSWORD:-} +export SUPERUSER_PASSWORD=${SUPERUSER_PASSWORD:-} + +# allow JMX and/or Jolokia connection +export JMX_ENABLE=${JMX_ENABLE:-false} +export JMX_REGISTRYPORT=${JMX_REGISTRYPORT:-8086} +export JMX_SERVERPORT=${JMX_SERVERPORT:-8087} +export JOLOKIA_ENABLE=${JOLOKIA_ENABLE:-false} + +export DISABLE_CONNEXIONS=${DISABLE_CONNEXIONS:-false} +export ALTERNATE_TRANSLATE=${ALTERNATE_TRANSLATE:-false} + diff --git a/bin/mysql_clean.sh b/bin/mysql_clean.sh new file mode 100644 index 0000000..78b349f --- /dev/null +++ b/bin/mysql_clean.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +[ ! -z $DEBUG ] && set -x + +DB_CREATE_USER=${DB_CREATE_USER:-true} + +if [ "$DB_CREATE_USER" == "true" ]; then + +sqlline_run.sh <<-EOF + !connect "jdbc:mysql://$DB_HOST:$DB_PORT" $DB_SYSTEM_USER $DB_SYSTEM_PASSWORD + + DROP USER '${DB_SHUTTLE_USER}' ; + + DROP DATABASE ${DB_SHUTTLE_REPO}; + + + + !quit +EOF + + +fi \ No newline at end of file diff --git a/bin/mysql_init.sh b/bin/mysql_init.sh new file mode 100644 index 0000000..ff6e51f --- /dev/null +++ b/bin/mysql_init.sh @@ -0,0 +1,24 @@ +#!/bin/bash + +[ ! -z $DEBUG ] && set -x + +DB_CREATE_USER=${DB_CREATE_USER:-true} + +if [ "$DB_CREATE_USER" == "true" ]; then + + +sqlline_run.sh <<-EOF + !connect "jdbc:mysql://$DB_HOST:$DB_PORT" $DB_SYSTEM_USER $DB_SYSTEM_PASSWORD + + CREATE USER '${DB_SHUTTLE_USER}' IDENTIFIED BY '${DB_SHUTTLE_PASSWORD}'; + + CREATE DATABASE ${DB_SHUTTLE_REPO}; + + GRANT ALL PRIVILEGES ON ${DB_SHUTTLE_REPO}.* TO '${DB_SHUTTLE_USER}'; + + + !quit +EOF + + +fi diff --git a/bin/mysql_wait.sh b/bin/mysql_wait.sh new file mode 100644 index 0000000..f4c5585 --- /dev/null +++ b/bin/mysql_wait.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# wait-for-postgres.sh + +[ ! -z $DEBUG ] && set -x + + + +DB_MAX_WAIT=${DB_MAX_WAIT:-30} +DB_CREATE_USER=${DB_CREATE_USER:-true} + +USER_DB=${DB_SHUTTLE_USER} +USER_PWD=${DB_SHUTTLE_PASSWORD} + + +if [ "$DB_CREATE_USER" == "true" ]; then + USER_DB=${DB_SYSTEM_USER} + USER_PWD=${DB_SYSTEM_PASSWORD} +fi + + +COUNTER=0 +until [ $COUNTER -ge ${DB_MAX_WAIT} ] || sqlline_run.sh <<-EOF + !connect "jdbc:mysql://$DB_HOST:$DB_PORT" $USER_DB $USER_PWD + !quit +EOF +do + echo "database is unavailable - sleeping" + sleep 1 + let COUNTER=COUNTER+1 +done + +if [ $COUNTER -ge ${DB_MAX_WAIT} ]; then + exit -1 +else + exit 0 +fi diff --git a/bin/oracle_clean.sh b/bin/oracle_clean.sh new file mode 100644 index 0000000..b3b5158 --- /dev/null +++ b/bin/oracle_clean.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +[ ! -z $DEBUG ] && set -x + + + +#-------------------------------------------------------------------------------------------- +# Create tablespace function +drop_tablespace() { + echo_yellow drop tablespace for ${DB_SHUTTLE_REPO} + sqlline_run.sh <<-EOF + !connect "jdbc:oracle:thin:@//${DB_HOST}:${DB_PORT}/${DB_INSTANCE}" ${DB_SYSTEM_USER} ${DB_SYSTEM_PASSWORD} + + DROP TABLESPACE ${DB_SHUTTLE_REPO} INCLUDING CONTENTS AND DATAFILES CASCADE CONSTRAINTS; + + !quit +EOF + +} + +#-------------------------------------------------------------------------------------------- +drop_user() { + echo_yellow drop user for ${DB_SHUTTLE_USER} + sqlline_run.sh <<-EOF + !connect "jdbc:oracle:thin:@//${DB_HOST}:${DB_PORT}/${DB_INSTANCE}" ${DB_SYSTEM_USER} ${DB_SYSTEM_PASSWORD} + + DROP USER ${DB_SHUTTLE_USER} CASCADE; + + !quit +EOF + +} + +DB_CREATE_USER=${DB_CREATE_USER:-true} + +if [ "$DB_CREATE_USER" == "true" ]; then + + +drop_user +drop_tablespace + +fi diff --git a/bin/oracle_init.sh b/bin/oracle_init.sh new file mode 100644 index 0000000..c654f41 --- /dev/null +++ b/bin/oracle_init.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +[ ! -z $DEBUG ] && set -x + + +#-------------------------------------------------------------------------------------------- +# Create tablespace function +create_tablespace() { + echo_yellow create tablespace for ${DB_SHUTTLE_REPO} + sqlline_run.sh <<-EOF + !connect "jdbc:oracle:thin:@//${DB_HOST}:${DB_PORT}/${DB_INSTANCE}" ${DB_SYSTEM_USER} ${DB_SYSTEM_PASSWORD} + CREATE TABLESPACE ${DB_SHUTTLE_REPO} + DATAFILE SIZE 268435456 + AUTOEXTEND ON NEXT 12800 + MAXSIZE 34359721984 + EXTENT MANAGEMENT LOCAL + AUTOALLOCATE + ONLINE; + !quit +EOF + +} + +#-------------------------------------------------------------------------------------------- +create_user() { + echo_yellow create user for ${DB_SHUTTLE_USER} + sqlline_run.sh <<-EOF + !connect "jdbc:oracle:thin:@//$DB_HOST:$DB_PORT/$DB_INSTANCE" $DB_SYSTEM_USER $DB_SYSTEM_PASSWORD + ALTER PROFILE DEFAULT LIMIT PASSWORD_LIFE_TIME UNLIMITED; + + create user ${DB_SHUTTLE_USER} identified by ${DB_SHUTTLE_PASSWORD} default tablespace ${DB_SHUTTLE_REPO} temporary tablespace TEMP profile DEFAULT; + grant RESOURCE to ${DB_SHUTTLE_USER}; + grant CONNECT to ${DB_SHUTTLE_USER}; + grant CREATE PROCEDURE to ${DB_SHUTTLE_USER}; + grant CREATE VIEW to ${DB_SHUTTLE_USER}; + grant CREATE DATABASE LINK to ${DB_SHUTTLE_USER}; + grant CREATE SEQUENCE to ${DB_SHUTTLE_USER}; + grant CREATE SYNONYM to ${DB_SHUTTLE_USER}; + grant CREATE TYPE to ${DB_SHUTTLE_USER}; + grant CREATE TABLE to ${DB_SHUTTLE_USER}; + grant CREATE SESSION to ${DB_SHUTTLE_USER}; + grant CREATE TRIGGER to ${DB_SHUTTLE_USER}; + alter user ${DB_SHUTTLE_USER} default role RESOURCE,CONNECT; + alter user ${DB_SHUTTLE_USER} quota unlimited on ${DB_SHUTTLE_REPO}; + !quit +EOF + +} + +DB_CREATE_USER=${DB_CREATE_USER:-true} + +if [ "$DB_CREATE_USER" == "true" ]; then + +create_tablespace +create_user +fi diff --git a/bin/oracle_wait.sh b/bin/oracle_wait.sh new file mode 100644 index 0000000..219343c --- /dev/null +++ b/bin/oracle_wait.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# wait-for-postgres.sh + +[ ! -z $DEBUG ] && set -x + + +DB_MAX_WAIT=${DB_MAX_WAIT:-30} +DB_CREATE_USER=${DB_CREATE_USER:-true} + +USER_DB=${DB_SHUTTLE_USER} +USER_PWD=${DB_SHUTTLE_PASSWORD} + + +if [ "$DB_CREATE_USER" == "true" ]; then + USER_DB=${DB_SYSTEM_USER} + USER_PWD=${DB_SYSTEM_PASSWORD} +fi + + +COUNTER=0 +until [ $COUNTER -ge ${DB_MAX_WAIT} ] || sqlline_run.sh <<-EOF + !connect "jdbc:oracle:thin:@//${DB_HOST}:${DB_PORT}/${DB_INSTANCE}" ${USER_DB} ${USER_PWD} + !quit +EOF +do + echo "database is unavailable - sleeping" + sleep 1 + let COUNTER=COUNTER+1 +done + +if [ $COUNTER -ge ${DB_MAX_WAIT} ]; then + exit -1 +else + exit 0 +fi diff --git a/bin/postgres_clean.sh b/bin/postgres_clean.sh new file mode 100644 index 0000000..f7f770b --- /dev/null +++ b/bin/postgres_clean.sh @@ -0,0 +1,21 @@ +#!/bin/bash + + +DB_CREATE_USER=${DB_CREATE_USER:-true} + +if [ "$DB_CREATE_USER" == "true" ]; then + +# create user and databases +export PGPASSWORD=${DB_SYSTEM_PASSWORD} +psql --host=${DB_HOST} -P pager=off --port=${DB_PORT} --username=${DB_SYSTEM_USER} <<-EOF + + + DROP DATABASE "${DB_SHUTTLE_REPO}"; + DROP ROLE "${DB_SHUTTLE_USER}"; + + + +EOF + + +fi diff --git a/bin/postgres_init.sh b/bin/postgres_init.sh new file mode 100644 index 0000000..8277970 --- /dev/null +++ b/bin/postgres_init.sh @@ -0,0 +1,29 @@ +#!/bin/bash + +[ ! -z $DEBUG ] && set -x + +DB_CREATE_USER=${DB_CREATE_USER:-true} + +if [ "$DB_CREATE_USER" == "true" ]; then + +# create user and databases +export PGPASSWORD=${DB_SYSTEM_PASSWORD} +psql --host=${DB_HOST} -P pager=off --port=${DB_PORT} --username=${DB_SYSTEM_USER} <<-EOF + CREATE ROLE "${DB_SHUTTLE_USER}" WITH PASSWORD '${DB_SHUTTLE_PASSWORD}' VALID UNTIL 'infinity'; + ALTER ROLE "${DB_SHUTTLE_USER}" WITH LOGIN; + + + CREATE DATABASE "${DB_SHUTTLE_REPO}" + WITH OWNER="${DB_SHUTTLE_USER}" + ENCODING='UTF8' + TEMPLATE=template0 + LC_COLLATE='C' + LC_CTYPE='C' ; + + + GRANT ALL PRIVILEGES ON DATABASE "${DB_SHUTTLE_REPO}" TO "${DB_SHUTTLE_USER}"; + +EOF + +fi + diff --git a/bin/postgres_wait.sh b/bin/postgres_wait.sh new file mode 100644 index 0000000..93340ef --- /dev/null +++ b/bin/postgres_wait.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# wait-for-postgres.sh + +[ ! -z $DEBUG ] && set -x + + +DB_MAX_WAIT=${DB_MAX_WAIT:-30} +DB_CREATE_USER=${DB_CREATE_USER:-true} + +USER_DB=${DB_SHUTTLE_USER} +USER_PWD=${DB_SHUTTLE_PASSWORD} + + +if [ "$DB_CREATE_USER" == "true" ]; then + USER_DB=${DB_SYSTEM_USER} + USER_PWD=${DB_SYSTEM_PASSWORD} +fi + + +# create user and databases +export PGPASSWORD=${USER_PWD} + +#!/bin/bash +COUNTER=0 +until [ $COUNTER -ge ${DB_MAX_WAIT} ] || psql -P pager=off --host=${DB_HOST} --port=${DB_PORT} --username=${USER_DB} -c '\l' ; do + echo "database is unavailable - sleeping" + sleep 1 + let COUNTER=COUNTER+1 +done + +if [ $COUNTER -ge ${DB_MAX_WAIT} ]; then + exit -1 +else + exit 0 +fi diff --git a/bin/shuttle_clean.sh b/bin/shuttle_clean.sh new file mode 100644 index 0000000..69cf659 --- /dev/null +++ b/bin/shuttle_clean.sh @@ -0,0 +1,85 @@ +#!/usr/bin/env bash + +# stop on first error +##set -e + +source colorecho + + + +[ -z "$DB_TYPE" ] && echo_red please define DB_TYPE && exit 1 +[ -z "$DB_SYSTEM_USER" ] && echo_red please define DB_SYSTEM_USER && exit 1 +[ -z "$DB_SYSTEM_PASSWORD" ] && echo_red please define DB_SYSTEM_PASSWORD && exit 1 +[ -z "$DB_HOST" ] && echo_red please define DB_HOST && exit 1 +[ -z "$DB_PORT" ] && echo_red please define DB_PORT && exit 1 + + +[ -z "$DB_SHUTTLE_REPO" ] && echo_red please define DB_SHUTTLE_REPO && exit 1 +[ -z "$DB_SHUTTLE_USER" ] && echo_red please define DB_SHUTTLE_USER && exit 1 +[ -z "$DB_SHUTTLE_PASSWORD" ] && echo_red please define DB_SHUTTLE_PASSWORD && exit 1 + + + + + +#-------------------------------------------------------------------------------------------- +usage() { + echo "Usage: $0 [-f]" 1>&2; + exit 1; +} + + + +# monitor $logfile +monitor() { + tail -F -n 0 $1 | while read line; do echo -e "$2: $line"; done +} + + + + +#-------------------------------------------------------------------------------------------- +cleanup() { + + +echo_yellow "start cleanup ... $1" + + if [ -d $DATA_FOLDER/shuttle ] ; then + + rm -rf $DATA_FOLDER/shuttle + + # create schema / user for DB_TYPE + ${DB_TYPE}_clean.sh + + fi + + +} + + +#-------------------------------------------------------------------------------------------- +# main +#-------------------------------------------------------------------------------------------- +force=0 +while getopts "f" opt; do + case $opt in + f) + force=1 + ;; + *) + usage + ;; + esac +done + +shift $((OPTIND-1)) + + +#if [ $# -eq 0 ]; then +# usage +# exit 1 +#fi + + + +cleanup diff --git a/bin/shuttle_install.sh b/bin/shuttle_install.sh new file mode 100644 index 0000000..8e19019 --- /dev/null +++ b/bin/shuttle_install.sh @@ -0,0 +1,344 @@ +#!/usr/bin/env bash + +# stop on first error +##set -e + +source colorecho + +[ ! -z $DEBUG ] && set -x + + + +[ -z "$DB_TYPE" ] && echo_red please define DB_TYPE && exit 1 +[ -z "$DB_SYSTEM_USER" ] && echo_red please define DB_SYSTEM_USER && exit 1 +[ -z "$DB_SYSTEM_PASSWORD" ] && echo_red please define DB_SYSTEM_PASSWORD && exit 1 +[ -z "$DB_HOST" ] && echo_red please define DB_HOST && exit 1 +[ -z "$DB_PORT" ] && echo_red please define DB_PORT && exit 1 + + +[ -z "$DB_SHUTTLE_REPO" ] && echo_red please define DB_SHUTTLE_REPO && exit 1 +[ -z "$DB_SHUTTLE_USER" ] && echo_red please define DB_SHUTTLE_USER && exit 1 +[ -z "$DB_SHUTTLE_PASSWORD" ] && echo_red please define DB_SHUTTLE_PASSWORD && exit 1 + + + + + +#-------------------------------------------------------------------------------------------- +usage() { + echo "Usage: $0 [-f]" 1>&2; + exit 1; +} + + + +# monitor $logfile +monitor() { + tail -F -n 0 $1 | while read line; do echo -e "$2: $line"; done +} + + + + +#-------------------------------------------------------------------------------------------- +install_Shuttle() { +echo_yellow "start install Shuttle ..." + + if [ ! -d $DATA_FOLDER/shuttle ] || [ $force -eq 1 ]; then + + # Create shuttle data folder if needed + if [ ! -d $DATA_FOLDER/shuttle ]; then + mkdir -p $DATA_FOLDER/shuttle + fi + + #export CATALINA_BASE=${DATA_FOLDER}/shuttle/instance + # copy tomcat instance folder + if [ ! -d $CATALINA_BASE ]; then + mkdir -p $CATALINA_BASE + cp -r $CATALINA_HOME/conf $CATALINA_BASE + cp -r $CATALINA_HOME/logs $CATALINA_BASE + cp -r $CATALINA_HOME/temp $CATALINA_BASE + cp -r $CATALINA_HOME/webapps $CATALINA_BASE + cp -r $CATALINA_HOME/work $CATALINA_BASE + fi + + # force attributs scheme,proxyName,proxyPort,secure on Connector if they are defined + if [ ! -z "${EXTERNAL_URL_PROTOCOL}" ] && [ ! -z "${EXTERNAL_URL_PORT}" ] && [ ! -z "${EXTERNAL_URL_SERVER}" ] && [ ! -z "${CLIENT_USESSL}" ]; then + envsubst < /usr/local/shuttle/tomcat/server.xml.dist > $CATALINA_BASE/conf/server.xml + fi + + + # REJECTED ::: change logging.properties from date rotate to size rotate + ### cp /usr/local/shuttle/tomcat/logging-by-size.properties $CATALINA_BASE/conf/logging.properties + + # remove default webapps coming with tomcat + # OpenVAS - Vulnerability Detection Method : Details: Apache Tomcat servlet/JSP container default files (OID: 1.3.6.1.4.1.25623.1.0.12085) + rm -rf $CATALINA_BASE/webapps/* + + # copy driver folder into $DATA_FOLDER to allow update later + if [ ! -d $DATA_FOLDER/shuttle/drivers ]; then + cp -r /usr/local/shuttle/drivers $DATA_FOLDER/shuttle/drivers + else + echo_yellow "update $DATA_FOLDER/shuttle/drivers with last jdbc drivers" + cp -r /usr/local/shuttle/drivers/* $DATA_FOLDER/shuttle/drivers/ + fi + + # create schema / user for DB_TYPE if needed + echo_green "create database and user if needed ..." + ${DB_TYPE}_init.sh + + # if exist old xxx.WebServce or xxx.Updater under conf/Catalina, then remove them + if [ -d $CATALINA_BASE/conf/Catalina/localhost ]; then + rm -f $CATALINA_BASE/conf/Catalina/localhost/*.WebService.xml + rm -f $CATALINA_BASE/conf/Catalina/localhost/*.Updater.xml + fi + + # cause SHUTTLE-7997 : old module jar must be deleted before installer + echo_yellow "remove old jar modules ..." + for jarfile in $(find ${DATA_FOLDER}/shuttle/home/modules -name "*.jar"); do + echo_yellow "remove $jarfile" + rm -f $jarfile + done + echo_green "done" + + + + # run shutlle installer + echo_green "launch shuttle installer ..." + envsubst < /usr/local/shuttle/autoinstall/${DB_TYPE}_autoinstall.xml > $DATA_FOLDER/shuttle/.autoinstall.xml + ${JAVA_HOME}/bin/java -Dfile.encoding=UTF-8 -jar /usr/local/shuttle/installer/ShuttleInstaller.jar $DATA_FOLDER/shuttle/.autoinstall.xml + echo_green "done" + + # force enable-mtom according to the variable {JAXWS_ENABLE_MTOM} + envsubst < /usr/local/shuttle/tomcat/sun-jaxws.xml.dist > ${DATA_FOLDER}/shuttle/home/war/${WEBAPP_NAME}.WebService/WEB-INF/sun-jaxws.xml + + else + echo_red "Shuttle is ever installed. You can use -f option to force" + exit 1 + fi + + +} + + +#-------------------------------------------------------------------------------------------- +patch_shuttle_client() { + + echo_yellow "start patching for client ..." + + + + if [ ! -d $DATA_FOLDER/shuttle ]; then + echo_red "Shuttle is not configured. " + return 1 + fi + + # Auto update Shuttle Client un needed + if [ -f /usr/local/shuttle/patches/client/ShuttleClientUpdater.jar ]; then + + envsubst < /usr/local/shuttle/autoinstall/client_autoupdate.xml > /tmp/client_autoupdate.xml + ${JAVA_HOME}/bin/java -jar /usr/local/shuttle/patches/client/ShuttleClientUpdater.jar /tmp/client_autoupdate.xml + else + echo "no patches client" + fi + echo_green "done" + +} +#-------------------------------------------------------------------------------------------- +patch_shuttle_server() { + +echo_yellow "start patching for server ..." + + if [ ! -d $DATA_FOLDER/shuttle ]; then + echo_red "Shuttle is not configured. " + return 1 + fi + + # create patches_rollback + if [ ! -d $DATA_FOLDER/shuttle/patches_rollback ]; then + mkdir -p $DATA_FOLDER/shuttle/patches_rollback + fi + + + #Convert string ${SHUTTLE_RELEASE} to array + # Exemple Regexp for 4.6.1: ^(shuttle-.*-4\.6\.1)\.([0-9]+)\.jar$ + IFS='.'; read -ra RELEASE_PART <<< "${SHUTTLE_RELEASE}" + REGEXP='^(shuttle-.*-'${RELEASE_PART[0]}'\.'${RELEASE_PART[1]}'\.'${RELEASE_PART[2]}')\.([0-9]+)\.jar$' + unset IFS + + # Update Server patches + for f in /usr/local/shuttle/patches/server/*.jar; do + b=$(basename $f) + + if [[ "$b" =~ ${REGEXP} ]]; then + r=${BASH_REMATCH[1]} + + # rollback patches + echo_yellow apply new server patch $b + + for jarfile in $(find ${DATA_FOLDER}/shuttle/home/war -name "$r*.jar"); do + d=$(dirname $jarfile) + echo replace $jarfile + mv $jarfile ${DATA_FOLDER}/shuttle/patches_rollback + cp $f $d + done + + else + echo "no patches server" + fi + done + + echo_green "done" +} + + +#-------------------------------------------------------------------------------------------- +patch_shuttle_modules() { + +echo_yellow "start patching for modules ..." + + if [ ! -d $DATA_FOLDER/shuttle ]; then + echo_red "Shuttle is not configured. " + return 1 + fi + + # create patches_rollback + if [ ! -d $DATA_FOLDER/shuttle/patches_rollback ]; then + mkdir -p $DATA_FOLDER/shuttle/patches_rollback + fi + + + + #Convert string ${SHUTTLE_RELEASE} to array + # Exemple Regexp for 4.7.0: ^(Plugin.*-4\.7\.0)\.([0-9]+)\.jar$ + # Plugin.ManageDatamartObjects-4.7.0.28000.jar + IFS='.'; read -ra RELEASE_PART <<< "${SHUTTLE_RELEASE}" + REGEXP='^(Plugin.*)-'${RELEASE_PART[0]}'\.'${RELEASE_PART[1]}'\.'${RELEASE_PART[2]}'\.([0-9]+)\.jar$' + unset IFS + + # Update plugin patches + for f in /usr/local/shuttle/patches/module/*.jar; do + b=$(basename $f) + + if [[ "$b" =~ ${REGEXP} ]]; then + r=${BASH_REMATCH[1]} + + # seach if there is previous patched jar to replace + for jarfile in $(find ${DATA_FOLDER}/shuttle/home/modules -name "$r*.jar"); do + d=$(dirname $jarfile) + echo backup previous plugin $jarfile into ${DATA_FOLDER}/shuttle/patches_rollback + mv $jarfile ${DATA_FOLDER}/shuttle/patches_rollback + done + + # copy new plugin + if [ ! -z "$jarfile" ] ; then + echo apply new plugin patch $b into $d + cp $f $d + else + echo_green "can not find exiting jar into ${DATA_FOLDER}/shuttle/home/modules to be replace by the new patch $b" + fi + else + echo "no patches modules" + fi + done + + # Clean tomcat Cache + + echo_green "done" +} + + + + +#-------------------------------------------------------------------------------------------- +patch_shuttle_classes() { + +echo_yellow "start patching for classes ..." + + if [ ! -d $DATA_FOLDER/shuttle ]; then + echo_red "Shuttle is not configured. " + return 1 + fi + + # create patches_rollback + if [ ! -d $DATA_FOLDER/shuttle/patches_rollback ]; then + mkdir -p $DATA_FOLDER/shuttle/patches_rollback + fi + + + REGEXP='^([^\*]+)\.class$' + + # Update plugin patches + for f in /usr/local/shuttle/patches/class/*.class; do + b=$(basename $f) + + if [[ "$b" =~ ${REGEXP} ]]; then + r=${BASH_REMATCH[1]} + + # seach if there is previous patched jar to replace + for class in $(find ${DATA_FOLDER}/shuttle/home/war -name "$r*.class"); do + d=$(dirname $class) + echo backup previous class $class into ${DATA_FOLDER}/shuttle/patches_rollback + mv $class ${DATA_FOLDER}/shuttle/patches_rollback + done + + # copy new class + if [ ! -z "$class" ] ; then + echo apply new class patch $b into $d + cp $f $d + else + echo_green "can not find exiting class into ${DATA_FOLDER}/shuttle/home/war to be replace by the new patch $b" + fi + else + echo "no patches classes" + fi + done + + # Clean tomcat Cache + + echo_green "done" +} + +#-------------------------------------------------------------------------------------------- +clean_tomcat_cache() { + echo_yellow "clean tomcat cache ..." + rm -rf $CATALINA_BASE/work/* + echo_green "done" +} + + + +#-------------------------------------------------------------------------------------------- +# main +#-------------------------------------------------------------------------------------------- +force=0 +while getopts "f" opt; do + case $opt in + f) + force=1 + ;; + *) + usage + ;; + esac +done + +shift $((OPTIND-1)) + + +#if [ $# -eq 0 ]; then +# usage +# exit 1 +#fi + +install_Shuttle +patch_shuttle_client +patch_shuttle_server +patch_shuttle_modules +patch_shuttle_classes +clean_tomcat_cache + + + +# mark current release +echo -n $SHUTTLE_RELEASE >$DATA_FOLDER/shuttle/RELEASE \ No newline at end of file diff --git a/bin/sqlline_run.sh b/bin/sqlline_run.sh new file mode 100644 index 0000000..1b7a8b2 --- /dev/null +++ b/bin/sqlline_run.sh @@ -0,0 +1,7 @@ +#!/bin/bash +# sqlline - Script to launch SQL shell on Unix, Linux or Mac OS + +BINPATH=/usr/local/sqlline:/usr/lib/jvm/java-8-openjdk-amd64/jre/lib/ext +exec java -Djava.ext.dirs=$BINPATH sqlline.SqlLine "$@" + +# End sqlline \ No newline at end of file diff --git a/bin/sqlserver_clean.sh b/bin/sqlserver_clean.sh new file mode 100644 index 0000000..25c6f78 --- /dev/null +++ b/bin/sqlserver_clean.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +[ ! -z $DEBUG ] && set -x + + +sqlline_run.sh <<-EOF + !connect "jdbc:sqlserver://${DB_HOST}:${DB_PORT};databaseName=master;" ${DB_SYSTEM_USER} ${DB_SYSTEM_PASSWORD} + USE ${DB_SHUTTLE_REPO}; + DROP USER ${DB_SHUTTLE_USER} ; + + USE master; + DROP LOGIN ${DB_SHUTTLE_USER}; + + !quit + + +EOF + + diff --git a/bin/sqlserver_init.sh b/bin/sqlserver_init.sh new file mode 100644 index 0000000..a8e25ee --- /dev/null +++ b/bin/sqlserver_init.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +[ ! -z $DEBUG ] && set -x + + +sqlline_run.sh <<-EOF + + !connect "jdbc:sqlserver://${DB_HOST}:${DB_PORT};databaseName=master;" ${DB_SYSTEM_USER} ${DB_SYSTEM_PASSWORD} + + CREATE DATABASE ${DB_SHUTTLE_REPO}; + + ALTER DATABASE ${DB_SHUTTLE_REPO} MODIFY FILE ( NAME = '${DB_SHUTTLE_REPO}' , SIZE = 10240KB , MAXSIZE = UNLIMITED, FILEGROWTH = 1024KB ); + ALTER DATABASE ${DB_SHUTTLE_REPO} MODIFY FILE ( NAME = '${DB_SHUTTLE_REPO}_Log' , SIZE = 1536KB , MAXSIZE = 2048GB , FILEGROWTH = 10%); + ALTER DATABASE ${DB_SHUTTLE_REPO} SET RECOVERY SIMPLE WITH NO_WAIT; + + CREATE LOGIN ${DB_SHUTTLE_USER} WITH PASSWORD='${DB_SHUTTLE_PASSWORD}', DEFAULT_DATABASE=[master], CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF ; + + USE ${DB_SHUTTLE_REPO}; + CREATE USER ${DB_SHUTTLE_USER} FOR LOGIN ${DB_SHUTTLE_USER} WITH DEFAULT_SCHEMA=[dbo]; + EXECUTE sp_addrolemember N'db_owner', N'${DB_SHUTTLE_USER}'; + !quit + +EOF + + diff --git a/bin/sqlserver_wait.sh b/bin/sqlserver_wait.sh new file mode 100644 index 0000000..c33ad2b --- /dev/null +++ b/bin/sqlserver_wait.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# wait-for-postgres.sh + +[ ! -z $DEBUG ] && set -x + + + +DB_MAX_WAIT=${DB_MAX_WAIT:-30} +DB_CREATE_USER=${DB_CREATE_USER:-true} + +USER_DB=${DB_SHUTTLE_USER} +USER_PWD=${DB_SHUTTLE_PASSWORD} + + +if [ "$DB_CREATE_USER" == "true" ]; then + USER_DB=${DB_SYSTEM_USER} + USER_PWD=${DB_SYSTEM_PASSWORD} +fi + + +COUNTER=0 +until [ $COUNTER -ge ${DB_MAX_WAIT} ] || sqlline_run.sh <<-EOF + !connect "jdbc:sqlserver://${DB_HOST}:${DB_PORT};databaseName=master;" ${USER_DB} ${USER_PWD} + !quit +EOF +do + echo "database is unavailable - sleeping" + sleep 1 + let COUNTER=COUNTER+1 +done + +if [ $COUNTER -ge ${DB_MAX_WAIT} ]; then + exit -1 +else + exit 0 +fi diff --git a/bin/timezone_update.sh b/bin/timezone_update.sh new file mode 100644 index 0000000..2f7646a --- /dev/null +++ b/bin/timezone_update.sh @@ -0,0 +1,13 @@ +#!/usr/bin/env bash +#set -e + +[ ! -z $DEBUG ] && set -x + + +if [ ! -z "$TZ" ]; then + if [ ! -f /etc/timezone ] || [ "$TZ" != "$(cat /etc/timezone)" ]; then + echo "$TZ" > /etc/timezone + rm /etc/localtime + dpkg-reconfigure -f noninteractive tzdata + fi +fi diff --git a/compose/scientific-linux/docker-compose.yml b/compose/scientific-linux/docker-compose.yml new file mode 100644 index 0000000..f28bdfc --- /dev/null +++ b/compose/scientific-linux/docker-compose.yml @@ -0,0 +1,59 @@ +version: '2' +volumes: + postgres-data: {} + shuttle-data: {} +services: + shuttle: + image: konvergence/shuttle:4.8.1.29276.24-sl + depends_on: [postgres] + ports: + - 8080:8080 + environment: + DB_HOST: postgres + DB_PORT: '5432' + DB_SHUTTLE_PASSWORD: password + DB_SHUTTLE_REPO: SHUT_REPO + DB_SHUTTLE_USER: shuttle + DB_SYSTEM_PASSWORD: YourPostgresSecretPassword + DB_SYSTEM_USER: postgres + DB_TYPE: postgres + EXTERNAL_URL_PORT: '8080' + EXTERNAL_URL_PROTOCOL: http + EXTERNAL_URL_SERVER: + LICENSEKEY: 'KEY=changeit' + WEBAPP_NAME: Shuttles + stdin_open: true + volumes: + - shuttle-data:/data + tty: true + command: + - --run + labels: + io.rancher.scheduler.affinity:container_label: io.rancher.stack_service.name=$${stack_name}/postgres + postgres: + image: postgres:9.5.13 + environment: + PGDATA: /var/lib/postgresql/data + POSTGRES_PASSWORD: YourPostgresSecretPassword + POSTGRES_USER: postgres + stdin_open: true + volumes: + - postgres-data:/var/lib/postgresql/data + tty: true + tailon: + image: konvergence/tailon:1.2.1 + depends_on: [shuttle] + environment: + OPTIONS: --relative-root /Shuttles.Tailon/ --allow-transfers --follow-names --tail-lines 1000 + stdin_open: true + volumes: + - shuttle-data:/data + tty: true + command: + - /data/shuttle/home/logs/ + - /data/shuttle/home/logs/perf/ + - /data/shuttle/home/logs/audit/ + - /data/shuttle/instance/logs/ + labels: + io.rancher.container.pull_image: always + io.rancher.scheduler.affinity:container_label: io.rancher.stack_service.name=$${stack_name}/shuttle \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml deleted file mode 100644 index bcd9371..0000000 --- a/docker-compose.yml +++ /dev/null @@ -1,39 +0,0 @@ -version: '2' -volumes: - postgres-data: {} - shuttle-data: {} -services: - shuttle46: - image: konvergence/shuttle:latest - environment: - DB_HOST: postgres95 - DB_PORT: '5432' - DB_SHUTTLE_PASSWORD: password - DB_SHUTTLE_REPO: SHUT_REPO - DB_SHUTTLE_USER: shuttle - DB_SYSTEM_PASSWORD: mysecretpassword - DB_SYSTEM_USER: postgres - DB_TYPE: postgres - EXTERNAL_URL_PORT: '443' - EXTERNAL_URL_PROTOCOL: https - EXTERNAL_URL_SERVER: demo.shuttle-cloud.com - LICENSEKEY: 'KEY=changeit' - WEBAPP_NAME: Shuttles - stdin_open: true - volumes: - - shuttle-data:/data - tty: true - command: - - --run - labels: - io.rancher.scheduler.affinity:container_label: io.rancher.stack_service.name=$${stack_name}/postgres95 - postgres95: - image: postgres:9.5 - environment: - PGDATA: /var/lib/postgresql/data - POSTGRES_PASSWORD: YourPostgresSecretPassword - POSTGRES_USER: postgres - stdin_open: true - volumes: - - postgres-data:/var/lib/postgresql/data - tty: true diff --git a/dockerfile/scientific-linux/Dockerfile b/dockerfile/scientific-linux/Dockerfile new file mode 100644 index 0000000..9361435 --- /dev/null +++ b/dockerfile/scientific-linux/Dockerfile @@ -0,0 +1,205 @@ +FROM sl:7 + +## install EPL repo and last update +RUN yum -y install yum-conf-repo yum-conf-epel \ + && yum -y update + +## add prerequistes packages for Shuttle +RUN yum -y install \ + curl \ + wget \ + unzip \ + gettext + +# add posgress 9.5 client +# see https://yum.postgresql.org/repopackages.php#pg95 +RUN rpm -Uvh https://download.postgresql.org/pub/repos/yum/9.5/redhat/rhel-7-x86_64/pgdg-sl95-9.5-3.noarch.rpm \ + && yum -y install postgresql95-contrib + + +# Add Tini +ARG TINI_VERSION="v0.17.0" +ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini +RUN chmod +x /tini + + +#install OpenJDK +ENV JAVA_VERSION=8u181 \ + JAVA_RHEL_VERSION=1.8.0.181-3.b13 +RUN yum -y install java-1.8.0-openjdk-devel-${JAVA_RHEL_VERSION}.el7_5.x86_64 + + +## postgresql-client-9.6 not available + + + +# Add install TTF +RUN echo "#### Get Microsoft's Core Fonts" \ + && yum -y install curl cabextract xorg-x11-font-utils fontconfig \ + && rpm -i http://li.nux.ro/download/nux/dextop/el7/x86_64/webcore-fonts-3.0-1.noarch.rpm + + +##install FROM tomcat +ENV TOMCAT_MAJOR="8" \ + TOMCAT_VERSION="8.5.32" \ + CATALINA_HOME="/usr/local/tomcat" + +ENV TOMCAT_TGZ_URLS="https://www.apache.org/dyn/closer.cgi?action=download&filename=tomcat/tomcat-${TOMCAT_MAJOR}/v${TOMCAT_VERSION}/bin/apache-tomcat-${TOMCAT_VERSION}.tar.gz" + +##RUN groupadd tomcat \ +## && useradd -M -s /bin/nologin -g tomcat -d ${CATALINA_HOME} tomcat \ +## && cd /usr/local \ +## && wget -O apache-tomcat-${TOMCAT_VERSION}.tar.gz ${TOMCAT_TGZ_URLS} \ +## && tar -xzvf apache-tomcat-${TOMCAT_VERSION}.tar.gz \ +## && mv apache-tomcat-${TOMCAT_VERSION} tomcat \ +## && chown -hR tomcat:tomcat tomcat + +RUN cd /usr/local \ + && wget -O apache-tomcat-${TOMCAT_VERSION}.tar.gz ${TOMCAT_TGZ_URLS} \ + && tar -xzvf apache-tomcat-${TOMCAT_VERSION}.tar.gz \ + && mv apache-tomcat-${TOMCAT_VERSION} tomcat + + +RUN echo "#### Add catalina-jmx-remote.jar" \ + && curl -s -L http://archive.apache.org/dist/tomcat/tomcat-8/v${TOMCAT_VERSION}/bin/extras/catalina-jmx-remote.jar -o $CATALINA_HOME/lib/catalina-jmx-remote.jar + + + +## install jdbc drivers + +#### Download ORACLE JDBC drivers - NEED AUTHENTICATE" +# http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html +# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn/utilities_drivers/jdbc/121010/ojdbc7.jar +# Add usr/local/drivers/jdbc for Oracle driver +COPY usr/local/drivers/jdbc/ /usr/local/drivers/jdbc/ + +# Install other jdbc drivers +RUN echo "#### Download JDBC drivers for postgresql, mysql, MSSQL" \ + && mkdir -p /usr/local/drivers/jdbc \ + && curl -s -L https://jdbc.postgresql.org/download/postgresql-42.2.1.jar -o /usr/local/drivers/jdbc/postgresql-42.2.1.jar \ + && curl -s -L https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-java-5.1.45.tar.gz -o /tmp/mysql-connector-java-5.1.45.tar.gz \ + && tar -zxvf /tmp/mysql-connector-java-5.1.45.tar.gz -C /tmp \ + && cp /tmp/mysql-connector-java-5.1.45/mysql-connector-java-5.1.45-bin.jar /usr/local/drivers/jdbc \ + && curl -s -L https://download.microsoft.com/download/0/2/A/02AAE597-3865-456C-AE7F-613F99F850A8/sqljdbc_6.0.8112.200_enu.tar.gz -o /tmp/sqljdbc_6.0.8112.200_enu.tar.gz \ + && tar -zxvf /tmp/sqljdbc_6.0.8112.200_enu.tar.gz -C /tmp \ + && cp /tmp/sqljdbc_6.0/enu/jre8/sqljdbc42.jar /usr/local/drivers/jdbc \ + && rm -rf /tmp/* + +RUN echo "#### Symolic link on jdbc drivers for Shuttle" \ + && mkdir -p /usr/local/shuttle/drivers \ + && ln -s /usr/local/drivers/jdbc/mysql-connector-java-5.1.45-bin.jar /usr/local/shuttle/drivers/mysql.jar \ + && ln -s /usr/local/drivers/jdbc/postgresql-42.2.1.jar /usr/local/shuttle/drivers/postgresql.jar \ + && ln -s /usr/local/drivers/jdbc/sqljdbc42.jar /usr/local/shuttle/drivers/mssql.jar \ + && ln -s /usr/local/drivers/jdbc/ojdbc7.jar /usr/local/shuttle/drivers/oracle.jar + + +RUN echo "#### Download sqlline 1.2.0 for https://github.com/julianhyde/sqlline and Make symbolic on jdbc drivers for sqlline " \ + && mkdir -p /usr/local/sqlline \ + && curl -s -L https://repo1.maven.org/maven2/sqlline/sqlline/1.2.0/sqlline-1.2.0-jar-with-dependencies.jar -o /usr/local/sqlline/sqlline-1.2.0-jar-with-dependencies.jar \ + && ln -s /usr/local/drivers/jdbc/mysql-connector-java-5.1.45-bin.jar /usr/local/sqlline/mysql.jar \ + && ln -s /usr/local/drivers/jdbc/postgresql-42.2.1.jar /usr/local/sqlline/postgresql.jar \ + && ln -s /usr/local/drivers/jdbc/sqljdbc42.jar /usr/local/sqlline/mssql.jar \ + && ln -s /usr/local/drivers/jdbc/ojdbc7.jar /usr/local/sqlline/oracle.jar + + +## install Shuttle + +# test mandatory args +ARG RELEASE_MAJOR +ARG RELEASE_MINOR +ARG SHUTTLE_RELEASE +ARG SHUTTLE_INSTALLER_RELEASE + +RUN [ -n "${SHUTTLE_RELEASE}" ] && [ -n "${RELEASE_MAJOR}" ] && [ -n "${RELEASE_MINOR}" ] + + +ENV SHUTTLE_INSTALLER_RELEASE=${SHUTTLE_INSTALLER_RELEASE} +ENV SHUTTLE_RELEASE=${SHUTTLE_RELEASE} + + + +# Download Shuttle Packages +RUN mkdir -p /usr/local/shuttle/installer \ + && mkdir -p /usr/local/shuttle/documentation \ + && mkdir -p /usr/local/shuttle/patches/client \ + && mkdir -p /usr/local/shuttle/patches/server \ + && mkdir -p /usr/local/shuttle/patches/module \ + && mkdir -p /usr/local/shuttle/patches/class + +# Image Label +LABEL maintainer="kShuttle" \ + website="https://www.kshuttle.io" \ + description="Business Management Platform" \ + release="${SHUTTLE_RELEASE}" + + + +# Add bin +COPY bin/ /usr/local/shuttle/bin/ + +# Readme +##COPY USAGE.md /usr/local/shuttle/ + +# change log of the image or shuttle +##COPY releases/${RELEASE_MAJOR}.${RELEASE_MINOR}/CHANGELOG.md /usr/local/shuttle/ + +# Add Shuttle autoinstall response files +COPY autoinstall/ /usr/local/shuttle/autoinstall/ + +# Add Documentation +COPY packages/documentation/ /usr/local/shuttle/documentation/ + + +# Add installer +COPY packages/installer/ShuttleInstaller-${SHUTTLE_INSTALLER_RELEASE}.jar /usr/local/shuttle/installer/ShuttleInstaller.jar + +# Add Patches +COPY packages/patches/ /usr/local/shuttle/patches/ + + +# Copy template server.xml.dit template according to the release of tomcat to force external url +COPY usr/local/tomcat/ /usr/local/shuttle/tomcat/ + + +ENV PATH=/usr/local/shuttle/bin/:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin \ + CATALINA_OPTS="-Xms512m -Xmx8192m -Dfile.encoding=UTF-8 -Djava.awt.headless=true" \ + DATA_FOLDER=/data \ + DB_MAX_WAIT=30 \ + DB_HOST=db \ + DB_PORT=5432 \ + DB_TYPE=postgres \ + DB_CREATE_USER=true \ + DB_SYSTEM_USER=postgres \ + DB_SYSTEM_PASSWORD=yoursecretpassword \ + DB_SHUTTLE_REPO=SHUT_REPO \ + DB_SHUTTLE_USER=shuttle \ + DB_SHUTTLE_PASSWORD=password \ + DB_INSTANCE=ORCLCDB \ + WEBAPP_NAME=Shuttles \ + DEFAULT_CONNEXION_NAME=Default \ + EXTERNAL_URL_PROTOCOL=http \ + EXTERNAL_URL_PORT=8080 \ + EXTERNAL_URL_SERVER=localhost \ + KERBEROS_ENABLE=false \ + PROXY_ENABLE=true \ + PROXY_USE_CREDENTIALS=true \ + PROXY_USE_SHUTTLE_CREDENTIALS=false \ + PROXY_USE_DEFAULT_CONFIG=true \ + PROXY_HOST="" \ + PROXY_PORT="0" \ + PROXY_USER="" \ + PROXY_PASSWORD="" \ + JAXWS_ENABLE_MTOM=false \ + FORCE_INSTALL=false + + + +# Metadata +EXPOSE 8080 +VOLUME [ "${DATA_FOLDER}" ] + + +# Entrypoint and CMD +ENTRYPOINT ["/tini", "--", "bash", "/usr/local/shuttle/bin/entrypoint.sh" ] +CMD ["--help"] + diff --git a/dockerfile/scientific-linux/build.sh b/dockerfile/scientific-linux/build.sh new file mode 100644 index 0000000..3fd2660 --- /dev/null +++ b/dockerfile/scientific-linux/build.sh @@ -0,0 +1,48 @@ +#!/bin/bash + + +# Define BUILD_FOLDER +pushd $(dirname $0) +DOCKER_FILENAME=Dockerfile +BUILD_FOLDER=$PWD/../.. +popd + +DOCKER_REPO=konvergence/shuttle + +# Release build is the last SVN release that include all previous build release for client or server +SHUTTLE_INSTALLER_RELEASE="4.8.1.28881" + +RELEASE_MAJOR="4.8" +RELEASE_MINOR="1" +SERVER_BUILD="29276" + +SHUTTLE_RELEASE=${RELEASE_MAJOR}.${RELEASE_MINOR}.${SERVER_BUILD} +IMAGE_BUILD=24 + + +# Release Build of the Docker Image +# Final Docker Image Name +IMAGE_TAG=${SHUTTLE_RELEASE}.${IMAGE_BUILD}-sl + + + + +#------------------------------------------------------------------------------------------------------- +echo "Building image ${DOCKER_REPO}:${IMAGE_TAG} ..." +#BUILD_OPTIONS="--force-rm=true --no-cache=true" +docker build $BUILD_OPTIONS -t ${DOCKER_REPO}:${IMAGE_TAG} \ + --build-arg SHUTTLE_INSTALLER_RELEASE=${SHUTTLE_INSTALLER_RELEASE} \ + --build-arg RELEASE_MAJOR=${RELEASE_MAJOR} \ + --build-arg RELEASE_MINOR=${RELEASE_MINOR} \ + --build-arg SHUTTLE_RELEASE=${SHUTTLE_RELEASE} \ + --file ${DOCKER_FILENAME} \ + ${BUILD_FOLDER} + + if [ $? -eq 0 ]; then + echo "Local Image created: ${DOCKER_REPO} " + docker images ${DOCKER_REPO} + else + echo docker builld return error code $? + fi + + diff --git a/packages/cleanup.sh b/packages/cleanup.sh new file mode 100644 index 0000000..4e0ff17 --- /dev/null +++ b/packages/cleanup.sh @@ -0,0 +1,8 @@ +#!/bin/bash + + +rm -rf installer/* +rm -rf patches/module/* +rm -rf patches/server/* +rm -rf patches/client/* +rm -rf patches/class/* diff --git a/packages/constellium_download_cred.sh b/packages/constellium_download_cred.sh new file mode 100644 index 0000000..f26571a --- /dev/null +++ b/packages/constellium_download_cred.sh @@ -0,0 +1,98 @@ +#!/bin/bash + +[ ! -z $DEBUG ] && set -x + +function urlencode() { + # urlencode + old_lc_collate=$LC_COLLATE + LC_COLLATE=C + + local length="${#1}" + for (( i = 0; i < length; i++ )); do + local c="${1:i:1}" + case $c in + [a-zA-Z0-9.~_-]) printf "$c" ;; + *) printf '%%%02X' "'$c" ;; + esac + done + + LC_COLLATE=$old_lc_collate +} + +function urldecode() { + # urldecode + + local url_encoded="${1//+/ }" + printf '%b' "${url_encoded//%/\\x}" +} + + +function download() { + + URL_LOGIN=https://constellium.konvergence.com/login + CONSTELLIUM_USER=$1 + CONSTELLIUM_PASSWORD=$2 + URL_FILE=$3 + OUTPUT_FILE=$4 + + echo get CONSTELLIUM_USER + USER=${CONSTELLIUM_USER} + echo get CONSTELLIUM_PASSWORD + PASS=${CONSTELLIUM_PASSWORD} + + + # https://constellium.konvergence.com/login + [ -z "${URL_LOGIN}" ] && echo "URL_LOGIN No supplied" && return 1 + + # https://constellium.konvergence.com/projects/base-de-connaissances-partners/repository/repo-partners-sources/raw/4.6/ShuttleInstaller-4.6.0.26304.jar + [ -z "${URL_FILE}" ] && echo "URL_FILE No supplied" && return 1 + + [ -z "${USER}" ] && echo "USER No supplied" && return 1 + [ -z "${PASS}" ] && echo "PASS No supplied" && return 1 + [ -z "${OUTPUT_FILE}" ] && echo "OUTPUT_FILE No supplied" && return 1 + + cookie_file=$(mktemp) + + + CURL_CONFIGS="--silent --show-error --fail --insecure --location -b ${cookie_file} -c ${cookie_file}" + CURL_CONFIGS2="--show-error --fail --insecure --location -b ${cookie_file} -c ${cookie_file}" + + + # Fetch CSRF authenticity token + echo Fetch CSRF authenticity token + CSRF1=$(curl $CURL_CONFIGS ${URL_LOGIN} | grep "name=\"authenticity_token" | sed 's/.*value="\(.*\)".*/\1/') + + if [[ $? -ne 0 ]]; then + echo "Error getting csrf token" + echo $CSRF1 + rm -f $cookie_file + return -1 + fi + + # Login + echo Login to CONSTELLIUM + HTML=$(curl $CURL_CONFIGS -d "login=Login&username=$(urlencode ${USER})&password=$(urlencode ${PASS})&authenticity_token=$(urlencode ${CSRF1})" ${URL_LOGIN}) + if [[ $? -ne 0 ]]; then + echo "Error logging in" + rm -f $cookie_file + return -1 + fi + + # Download file + echo download $URL_FILE + curl $CURL_CONFIGS2 $URL_FILE -o $OUTPUT_FILE + if [[ $? -ne 0 ]]; then + echo "Error downloading backup file" + rm -f $cookie_file + return -1 + fi + +# clear cookie file + rm -f $cookie_file + return 0 + + +} + +download "$@" + diff --git a/packages/documentation/ShuttleDocumentation-4.8.1.zip b/packages/documentation/ShuttleDocumentation-4.8.1.zip new file mode 100644 index 0000000..ec5c72c Binary files /dev/null and b/packages/documentation/ShuttleDocumentation-4.8.1.zip differ diff --git a/packages/get_packages.sh b/packages/get_packages.sh new file mode 100644 index 0000000..26db87c --- /dev/null +++ b/packages/get_packages.sh @@ -0,0 +1,27 @@ +#!/bin/bash + +RELEASE_MAJOR="4.8" +RELEASE_MINOR="1" +SERVER_BUILD="29276" + +SHUTTLE_REPO=https://constellium.konvergence.com/projects/base-de-connaissances-partners/repository/repo-partners-sources/raw/${RELEASE_MAJOR}.${RELEASE_MINOR} + +rm -rf installer/* +rm -rf patches/module/* +rm -rf patches/server/* +rm -rf patches/client/* +rm -rf patches/class/* + +read -p "CONSTELLIUM_USER:" CONSTELLIUM_USER +read -s -p "CONSTELLIUM_PASSWORD:" CONSTELLIUM_PASSWORD + +bash constellium_download_cred.sh ${CONSTELLIUM_USER} ${CONSTELLIUM_PASSWORD} ${SHUTTLE_REPO}/ShuttleInstaller-4.8.1.28881.jar installer/ShuttleInstaller-4.8.1.28881.jar +bash constellium_download_cred.sh ${CONSTELLIUM_USER} ${CONSTELLIUM_PASSWORD} ${SHUTTLE_REPO}/documentation/ShuttleDocumentation-4.8.1.zip documentation/ShuttleDocumentation-4.8.1.zip + + +bash constellium_download_cred.sh ${CONSTELLIUM_USER} ${CONSTELLIUM_PASSWORD} ${SHUTTLE_REPO}/Patches/Server/4.8.1.28924/Plugin.ManageDatamartObjects-4.8.1.28924.jar patches/module/Plugin.ManageDatamartObjects-4.8.1.28924.jar +bash constellium_download_cred.sh ${CONSTELLIUM_USER} ${CONSTELLIUM_PASSWORD} ${SHUTTLE_REPO}/Patches/Server/4.8.1.28924/shuttle-vdb-4.8.1.28924.jar patches/server/shuttle-vdb-4.8.1.28924.jar +bash constellium_download_cred.sh ${CONSTELLIUM_USER} ${CONSTELLIUM_PASSWORD} ${SHUTTLE_REPO}/Patches/Server/4.8.1.29092/shuttle-security-4.8.1.29092.jar patches/server/shuttle-security-4.8.1.29092.jar +bash constellium_download_cred.sh ${CONSTELLIUM_USER} ${CONSTELLIUM_PASSWORD} ${SHUTTLE_REPO}/Patches/Server/4.8.1.29092/shuttle-sdk-4.8.1.29092.jar patches/server/shuttle-sdk-4.8.1.29092.jar +bash constellium_download_cred.sh ${CONSTELLIUM_USER} ${CONSTELLIUM_PASSWORD} ${SHUTTLE_REPO}/Patches/Server/4.8.1.29092/shuttle-commons-utils-4.8.1.29092.jar patches/server/shuttle-commons-utils-4.8.1.29092.jar +bash constellium_download_cred.sh ${CONSTELLIUM_USER} ${CONSTELLIUM_PASSWORD} ${SHUTTLE_REPO}/Patches/Server/4.8.1.29276/shuttle-schema-4.8.1.29276.jar patches/server/shuttle-schema-4.8.1.29276.jar \ No newline at end of file diff --git a/usr/local/drivers/jdbc/oracle-jdbc.md b/usr/local/drivers/jdbc/oracle-jdbc.md new file mode 100644 index 0000000..9f30566 --- /dev/null +++ b/usr/local/drivers/jdbc/oracle-jdbc.md @@ -0,0 +1,4 @@ +#### Download ORACLE JDBC drivers - ojdbc7.jar - NEED AUTHENTICATE" +# http://www.oracle.com/technetwork/database/features/jdbc/jdbc-drivers-12c-download-1958347.html +# wget --no-check-certificate --no-cookies --header "Cookie: oraclelicense=accept-securebackup-cookie" http://download.oracle.com/otn/utilities_drivers/jdbc/121010/ojdbc7.jar +# Add usr/local/drivers/jdbc for Oracle driver ojdbc7.jar diff --git a/usr/local/tomcat/error-pages.xml b/usr/local/tomcat/error-pages.xml new file mode 100644 index 0000000..e1e72e3 --- /dev/null +++ b/usr/local/tomcat/error-pages.xml @@ -0,0 +1,16 @@ + + 500 + /errors/500.html + + + 404 + /errors/404.html + + + 403 + /errors/403.html + + + 400 + /errors/400.html + \ No newline at end of file diff --git a/usr/local/tomcat/errors/400.html b/usr/local/tomcat/errors/400.html new file mode 100644 index 0000000..6057aac --- /dev/null +++ b/usr/local/tomcat/errors/400.html @@ -0,0 +1 @@ +HTTP Status 400 - Bad Request

HTTP Status 400 - Bad Request


Type Status Report

Description The server cannot or will not process the request due to something that is perceived to be a client error (e.g., malformed request syntax, invalid request message framing, or deceptive request routing).


\ No newline at end of file diff --git a/usr/local/tomcat/errors/403.html b/usr/local/tomcat/errors/403.html new file mode 100644 index 0000000..810bc19 --- /dev/null +++ b/usr/local/tomcat/errors/403.html @@ -0,0 +1,3 @@ + +HTTP Status 403 - Forbidden

HTTP Status 403 - Forbidden


Type Status Report

Description The server understood the request, but is refusing to fulfill it.


+ \ No newline at end of file diff --git a/usr/local/tomcat/errors/404.html b/usr/local/tomcat/errors/404.html new file mode 100644 index 0000000..db085e0 --- /dev/null +++ b/usr/local/tomcat/errors/404.html @@ -0,0 +1,3 @@ + +HTTP Status 404 - Not Found

HTTP Status 404 - Not Found


Type Status Report

Description The origin server did not find a current representation for the target resource or is not willing to disclose that one exists.


+ \ No newline at end of file diff --git a/usr/local/tomcat/errors/500.html b/usr/local/tomcat/errors/500.html new file mode 100644 index 0000000..4ae4da5 --- /dev/null +++ b/usr/local/tomcat/errors/500.html @@ -0,0 +1,3 @@ + +HTTP Status 500 - Internal Error

HTTP Status 500 - Internal Error


Type Status Report

Description


+ \ No newline at end of file diff --git a/usr/local/tomcat/logging-by-date.properties b/usr/local/tomcat/logging-by-date.properties new file mode 100644 index 0000000..a2ad9c2 --- /dev/null +++ b/usr/local/tomcat/logging-by-date.properties @@ -0,0 +1,70 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +handlers = 1catalina.org.apache.juli.AsyncFileHandler, 2localhost.org.apache.juli.AsyncFileHandler, 3manager.org.apache.juli.AsyncFileHandler, 4host-manager.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler + +.handlers = 1catalina.org.apache.juli.AsyncFileHandler, java.util.logging.ConsoleHandler + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +1catalina.org.apache.juli.AsyncFileHandler.level = FINE +1catalina.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +1catalina.org.apache.juli.AsyncFileHandler.prefix = catalina. + +2localhost.org.apache.juli.AsyncFileHandler.level = FINE +2localhost.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +2localhost.org.apache.juli.AsyncFileHandler.prefix = localhost. + +3manager.org.apache.juli.AsyncFileHandler.level = FINE +3manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +3manager.org.apache.juli.AsyncFileHandler.prefix = manager. + +4host-manager.org.apache.juli.AsyncFileHandler.level = FINE +4host-manager.org.apache.juli.AsyncFileHandler.directory = ${catalina.base}/logs +4host-manager.org.apache.juli.AsyncFileHandler.prefix = host-manager. + +java.util.logging.ConsoleHandler.level = FINE +java.util.logging.ConsoleHandler.formatter = org.apache.juli.OneLineFormatter + + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.org.apache.juli.AsyncFileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.org.apache.juli.AsyncFileHandler + +# For example, set the org.apache.catalina.util.LifecycleBase logger to log +# each component that extends LifecycleBase changing state: +#org.apache.catalina.util.LifecycleBase.level = FINE + +# To see debug messages in TldLocationsCache, uncomment the following line: +#org.apache.jasper.compiler.TldLocationsCache.level = FINE + +# To see debug messages for HTTP/2 handling, uncomment the following line: +#org.apache.coyote.http2.level = FINE + +# To see debug messages for WebSocket handling, uncomment the following line: +#org.apache.tomcat.websocket.level = FINE diff --git a/usr/local/tomcat/logging-by-size.properties b/usr/local/tomcat/logging-by-size.properties new file mode 100644 index 0000000..cf88c62 --- /dev/null +++ b/usr/local/tomcat/logging-by-size.properties @@ -0,0 +1,77 @@ +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +handlers = 1catalina.java.util.logging.FileHandler, 2localhost.java.util.logging.FileHandler, 3manager.java.util.logging.FileHandler, 4host-manager.java.util.logging.FileHandler, java.util.logging.ConsoleHandler +.handlers = 1catalina.java.util.logging.FileHandler, java.util.logging.ConsoleHandler + + +java.util.logging.SimpleFormatter.format=%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS %4$-6s %2$s %5$s%6$s%n + +############################################################ +# Handler specific properties. +# Describes specific configuration info for Handlers. +############################################################ + +1catalina.java.util.logging.FileHandler.level = FINE +1catalina.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter +1catalina.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/catalina.%g.log +1catalina.java.util.logging.FileHandler.limit = 10485760 +1catalina.java.util.logging.FileHandler.count = 10 + +2localhost.java.util.logging.FileHandler.level = FINE +2localhost.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter +2localhost.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/localhost.%g.log +2localhost.java.util.logging.FileHandler.limit = 10485760 +2localhost.java.util.logging.FileHandler.count = 10 + +3manager.java.util.logging.FileHandler.level = FINE +3manager.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter +3manager.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/manager.%g.log +3manager.java.util.logging.FileHandler.limit = 10485760 +3manager.java.util.logging.FileHandler.count = 10 + +4host-manager.java.util.logging.FileHandler.level = FINE +4host-manager.java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter +4host-manager.java.util.logging.FileHandler.pattern = ${catalina.base}/logs/host-manager.%g.log +4host-manager.java.util.logging.FileHandler.limit = 10485760 +4host-manager.java.util.logging.FileHandler.count = 10 + + +java.util.logging.ConsoleHandler.level = FINE +java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter + + +############################################################ +# Facility specific properties. +# Provides extra control for each logger. +############################################################ + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].handlers = 2localhost.java.util.logging.FileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/manager].handlers = 3manager.java.util.logging.FileHandler + +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].level = INFO +org.apache.catalina.core.ContainerBase.[Catalina].[localhost].[/host-manager].handlers = 4host-manager.java.util.logging.FileHandler + + + +# For example, to log debug messages in ContextConfig and HostConfig +# classes and to log only warnings and errors in other +# org.apache.catalina.** classes, uncomment these lines: +#org.apache.catalina.startup.ContextConfig.level = FINE +#org.apache.catalina.startup.HostConfig.level = FINE +#org.apache.catalina.level = WARNING diff --git a/usr/local/tomcat/server.xml.dist b/usr/local/tomcat/server.xml.dist new file mode 100644 index 0000000..ebfdd15 --- /dev/null +++ b/usr/local/tomcat/server.xml.dist @@ -0,0 +1,173 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/usr/local/tomcat/sun-jaxws.xml.dist b/usr/local/tomcat/sun-jaxws.xml.dist new file mode 100644 index 0000000..6ab73c4 --- /dev/null +++ b/usr/local/tomcat/sun-jaxws.xml.dist @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/whatsnew-470.md b/whatsnew-470.md deleted file mode 100644 index dfdb1a3..0000000 --- a/whatsnew-470.md +++ /dev/null @@ -1,19 +0,0 @@ -## Shuttle 4.7.0 released at 13 October 2017 - -### What's New ? - -#### General - -- Single-Sign On is now available with support of SAML v2 standard. -- Dropdown list on text cells: a text cell can be associated with a list of choices defined as a member list (enabling scripting). This option enables to guide users for their textual data input. The input can be limited to the choice list. -- Ability to export a report as a PowerPoint presentation through a script calling an external resource. -Important: You must have an external resource enabling to build PowerPoint presentations. -- Native support of proxy auto-config files (PAC) - -#### Shuttle Studio -- Improved treatment of columns/rows addition: spanned cells are automatically increased when impacted by an addition. -#### Shuttle Client -- Possibility to link to Shuttle Client screens through a share button enabling to copy the link or share it via e-mail. -- Improved the focus for comments: on the subject field when creating a comment, on the body field when answering to or editing a comment. -- Improved chart ranges order when values are missing. - diff --git a/whatsnew-480.md b/whatsnew-480.md deleted file mode 100644 index 3388a9d..0000000 --- a/whatsnew-480.md +++ /dev/null @@ -1,36 +0,0 @@ -## Shuttle 4.8.0 released at 23 March 2018 - -- What's new - - General - - Rebranding and UI improvements - - New kShuttle logo, icons, and branding elements. - - Redesigned and optimized installer screen flow. - - Multiple UI and usability improvements. - - Enhanced support of Cloud Operations and Administration - - New superuser user with full privileges to administrate server and users. - - Improved security of default admin supervisor. - - Improved authentication logic to fully support multiple authentication sources (embedded and/or LDAP). - - Improved Life Cycle management - - More reliable and secure repository life-cycle during create, clear, delete operations. - - Advanced repository meta-data to control backup and restore operations. - - Authentication sources life cycle now decoupled from repository’s. - - Robust security and seamless client deployment - - More advanced encryption capability to comply with ANSSI and NIST standards. - - Simplified proxy management with unified configuration. - - Shuttle Studio - - Improved UI and usability. - - Repository listing and operations - - User listing and operations - - Shuttle Client - - Brand new 64-bit version (in addition to 32-bit) to leverage full capabilities of 64-bit OS. - - Simplified proxy management with unified configuration. - - Improved support for system proxy configuration. - - Platform Policy - - Full support of both 32-bit and 64-bit OS for Shuttle clients. - - New support of Microsoft Windows 8.1 for Shuttle clients. - - New support of Microsoft Windows Server 2016 for Shuttle Server - - New support of Microsoft SQLServer 2016 for Shuttle datastore. \ No newline at end of file diff --git a/whatsnew-481.md b/whatsnew-481.md deleted file mode 100644 index 97ab75c..0000000 --- a/whatsnew-481.md +++ /dev/null @@ -1,10 +0,0 @@ -## Shuttle 4.8.1 released at April 2018 - -### What's New ? - -### General -- Improved performance when processing large volumes of data. -- Added support for SAML HTTP-Redirect binding mode. -#### Shuttle Client -- Improved Login menu behavior when working with multiple connections. -- Better support for configuration with multiple servers using SAML authentication \ No newline at end of file