From 90888a858fe826d0c5cd4803a9a6fb7699f0d40e Mon Sep 17 00:00:00 2001 From: Silas Mahler Date: Thu, 17 Feb 2022 23:09:34 +0100 Subject: [PATCH 1/4] update update "" add quickerstart . . . . --- quickerstart.sh | 56 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 quickerstart.sh diff --git a/quickerstart.sh b/quickerstart.sh new file mode 100644 index 0000000..1d4555b --- /dev/null +++ b/quickerstart.sh @@ -0,0 +1,56 @@ +#!/usr/bin/env bash +# Use bash quickstart.sh myemail@example.com Testpassword123 dockerapex21xe mysetting.env +##### Create environment variables file. ##### +APEX_ADMIN_EMAIL=$1 +ORACLE_PWD=$2 +CONTAINER_NAME=$3 +ENV_FILE_NAME=$4 + +cat << EOF > $ENV_FILE_NAME +ORACLE_SID=XE +ORACLE_PDB=XEPDB1 +ORACLE_PWD=$ORACLE_PWD +APEX_ADMIN_EMAIL=$APEX_ADMIN_EMAIL +APEX_ADMIN_PWD=$ORACLE_PWD +APEX_PUBLIC_USER_PWD=$ORACLE_PWD +APEX_LISTENER_PWD=$ORACLE_PWD +APEX_REST_PUBLIC_USER_PWD=$ORACLE_PWD +ORDS_PUBLIC_USER_PWD=$ORACLE_PWD +INSTALL_FILE_APEX=apex-latest.zip +INSTALL_FILE_ORDS=ords-latest.zip +INSTALL_FILE_JAVA=OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz +DOCKER_ORDS_PORT=50080 +DOCKER_EM_PORT=55500 +DOCKER_DB_PORT=51521 +DB_VERSION=21.3.0 +DB_EDITION=xe +DOCKER_NETWORK_NAME=das_network +ALLOW_DB_PATCHING=N +OML4R_SUPPORT=N +REST_ENABLED_SQL=Y +RTU_ENABLED=N +SQLDEVWEB=Y +DATABASEAPI=Y +FILES_DIR=/files +XE_USE_LOCAL_COPY=N +EOF + +##### Download files ##### +echo "##### Downloading latest binaries for APEX and ORDS #####" +curl https://download.oracle.com/otn_software/apex/apex-latest.zip --output files/apex-latest.zip +curl https://download.oracle.com/otn_software/java/ords/ords-latest.zip --output files/ords-latest.zip +curl https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz --output files/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz + +echo "Set Permissions" +sudo chmod +x 01-build.sh +sudo chmod +x 02-run.sh + +echo "##### Running the build #####" +# bash ./01-build.sh $ENV_FILE_NAME 2>&1 | tee 01-build.log +bash ./01-build.sh $ENV_FILE_NAME &> /dev/null + +echo "##### Deploying the container #####" +# bash ./02-run.sh ${CONTAINER_NAME} $ENV_FILE_NAME 2>&1 | tee 02-run.log +bash ./02-run.sh ${CONTAINER_NAME} $ENV_FILE_NAME &> /dev/null + +echo "Finished" \ No newline at end of file From 8c6c15181178a74e2440f851c0f0ba76707251ce Mon Sep 17 00:00:00 2001 From: Silas Mahler Date: Thu, 17 Feb 2022 23:33:10 +0100 Subject: [PATCH 2/4] add doc . . . --- README.md | 15 +++++++++++++++ quickerstart.sh | 2 +- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 60ea61f..3a7f325 100644 --- a/README.md +++ b/README.md @@ -62,6 +62,21 @@ Type "Y" to continue or CTRL-C to exit: y > > Should you forget to save your password, you can find it in the generated settings file along with any other details about the container. It is named after your container, e.g. `apexiscool.env`. +## Quick-er Start +By [SilasMahler](https://github.com/silasmahler) + +The [`quickerstart.sh`](./quickerstart.sh) is a modification of the quickstart.sh to be more convenient and even faster to use. Thanks for the nice work Adrian and Martin :) + +### Usage +Just insert email, password, containername and desired settingsfile-name. + + ```bash + $ bash quickerstart.sh myemail@example.com MyPassword123 dockerapex21xe mysettings.env + ``` + +You can modify the quickstarter.sh to adjust more environment-variables if needed. + + ## Additional Notes About the Settings File * Specify the Docker network to attach to using the parameter `DOCKER_NETWORK_NAME`. The run script will check if the network exists, and if not, create it. diff --git a/quickerstart.sh b/quickerstart.sh index 1d4555b..a56bf6c 100644 --- a/quickerstart.sh +++ b/quickerstart.sh @@ -1,5 +1,5 @@ #!/usr/bin/env bash -# Use bash quickstart.sh myemail@example.com Testpassword123 dockerapex21xe mysetting.env +# Use bash quickerstart.sh myemail@example.com Testpassword123 dockerapex21xe mysetting.env ##### Create environment variables file. ##### APEX_ADMIN_EMAIL=$1 ORACLE_PWD=$2 From 657c11ea38ed93c5dd93d44fa3c0e9c150372258 Mon Sep 17 00:00:00 2001 From: Silas Mahler Date: Fri, 18 Feb 2022 01:47:38 +0100 Subject: [PATCH 3/4] adjust for java17, as openjdk isnt working with the stack --- quickerstart.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/quickerstart.sh b/quickerstart.sh index a56bf6c..31c615c 100644 --- a/quickerstart.sh +++ b/quickerstart.sh @@ -18,7 +18,7 @@ APEX_REST_PUBLIC_USER_PWD=$ORACLE_PWD ORDS_PUBLIC_USER_PWD=$ORACLE_PWD INSTALL_FILE_APEX=apex-latest.zip INSTALL_FILE_ORDS=ords-latest.zip -INSTALL_FILE_JAVA=OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz +INSTALL_FILE_JAVA=jdk-17_linux-x64_bin.tar.gz DOCKER_ORDS_PORT=50080 DOCKER_EM_PORT=55500 DOCKER_DB_PORT=51521 @@ -39,7 +39,7 @@ EOF echo "##### Downloading latest binaries for APEX and ORDS #####" curl https://download.oracle.com/otn_software/apex/apex-latest.zip --output files/apex-latest.zip curl https://download.oracle.com/otn_software/java/ords/ords-latest.zip --output files/ords-latest.zip -curl https://github.com/adoptium/temurin11-binaries/releases/download/jdk-11.0.14%2B9/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz --output files/OpenJDK11U-jdk_x64_linux_hotspot_11.0.14_9.tar.gz +curl https://download.oracle.com/java/17/latest/jdk-17_linux-x64_bin.tar.gz --output files/jdk-17_linux-x64_bin.tar.gz echo "Set Permissions" sudo chmod +x 01-build.sh From 704ff8e2e1d148d65e67fe4d6ce6dc7bc2cd1b9f Mon Sep 17 00:00:00 2001 From: Silas Mahler Date: Sat, 19 Feb 2022 17:35:15 +0100 Subject: [PATCH 4/4] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3a7f325..d263f50 100644 --- a/README.md +++ b/README.md @@ -74,7 +74,7 @@ Just insert email, password, containername and desired settingsfile-name. $ bash quickerstart.sh myemail@example.com MyPassword123 dockerapex21xe mysettings.env ``` -You can modify the quickstarter.sh to adjust more environment-variables if needed. +You can modify the quickerstarter.sh to adjust more environment-variables if needed. ## Additional Notes About the Settings File