From 00eb9bcde703bbc0597bf67d100ceaf5ad3e62a0 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 7 Oct 2019 21:32:41 -0400 Subject: [PATCH 1/5] Update build to respect new dir structure Signed-off-by: 1000TurquoisePogs --- common.properties | 2 +- deploy.xml | 58 +++++++++++------------------------------------ 2 files changed, 14 insertions(+), 46 deletions(-) diff --git a/common.properties b/common.properties index 29838b4..d3e8dc6 100644 --- a/common.properties +++ b/common.properties @@ -1 +1 @@ -plugins=../zlux-app-server/plugins +plugins=../zlux-app-server/deploy/instance/ZLUX/plugins diff --git a/deploy.xml b/deploy.xml index 7ebf2a5..8b5f4d6 100644 --- a/deploy.xml +++ b/deploy.xml @@ -28,24 +28,15 @@ - - - - - - - - - + - - + + - @@ -64,20 +55,6 @@ - - - - - - - - - - - - - - @@ -86,8 +63,8 @@ - - + + @@ -96,23 +73,13 @@ - - - - - - - - - - @@ -135,7 +102,6 @@ - @@ -144,9 +110,11 @@ - + + + From 251b2e4fba43081378986e71fde0c2cc010da4ee Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 2 Dec 2019 17:49:26 -0500 Subject: [PATCH 2/5] Move away from the deploy property to instead use instance and site individually Signed-off-by: 1000TurquoisePogs --- build.xml | 10 +++++++- deploy.sh | 68 ++++++++++++++++++++++-------------------------------- deploy.xml | 45 ++++++++++++++++++------------------ 3 files changed, 59 insertions(+), 64 deletions(-) diff --git a/build.xml b/build.xml index f3be9d3..313559a 100644 --- a/build.xml +++ b/build.xml @@ -17,8 +17,16 @@ - + + + + + + + + + diff --git a/deploy.sh b/deploy.sh index 53ce013..5942b22 100755 --- a/deploy.sh +++ b/deploy.sh @@ -33,51 +33,39 @@ # Don't do permission changes in this script because final changes such as these happen after this script is executed # Such as, currently in zowe-runtime-authorize.sh -rm -rf ../zlux-app-server/deploy/product/ZLUX/plugins -rm -rf ../zlux-app-server/deploy/site/ZLUX/plugins -rm -rf ../zlux-app-server/deploy/instance/ZLUX/plugins +if [ -n WORKSPACE_DIR ] +then + zlux_instance_dir=$WORKSPACE_DIR/app-server + zlux_site_dir=$WORKSPACE_DIR/app-server/site +elif [ -n INSTANCE_DIR ] +then + zlux_instance_dir=$INSTANCE_DIR/workspace/app-server + zlux_site_dir=$INSTANCE_DIR/workspace/app-server/site +else + zlux_instance_dir=../zlux-app-server/deploy/instance + zlux_site_dir=../zlux-app-server/deploy/site +fi -mkdir -p ../zlux-app-server/deploy/product -mkdir -p ../zlux-app-server/deploy/product/ZLUX -mkdir -p ../zlux-app-server/deploy/product/ZLUX/plugins -mkdir -p ../zlux-app-server/deploy/product/ZLUX/pluginStorage -mkdir -p ../zlux-app-server/deploy/product/ZLUX/serverConfig +zlux_users_dir=$zlux_instance_dir/users +zlux_groups_dir=$zlux_instance_dir/groups + +mkdir -p ../zlux-app-server/defaults/plugins +mkdir -p ../zlux-app-server/defaults/ZLUX/pluginStorage +mkdir -p ../zlux-app-server/defaults/serverConfig -mkdir -p ../zlux-app-server/deploy/site -mkdir -p ../zlux-app-server/deploy/site/ZLUX -mkdir -p ../zlux-app-server/deploy/site/ZLUX/plugins -mkdir -p ../zlux-app-server/deploy/site/ZLUX/pluginStorage -mkdir -p ../zlux-app-server/deploy/site/ZLUX/serverConfig +mkdir -p $zlux_site_dir/plugins +mkdir -p $zlux_site_dir/ZLUX/pluginStorage +mkdir -p $zlux_site_dir/serverConfig -mkdir -p ../zlux-app-server/deploy/instance -mkdir -p ../zlux-app-server/deploy/instance/ZLUX -mkdir -p ../zlux-app-server/deploy/instance/ZLUX/plugins -mkdir -p ../zlux-app-server/deploy/instance/ZLUX/pluginStorage -mkdir -p ../zlux-app-server/deploy/instance/ZLUX/serverConfig +mkdir -p $zlux_instance_dir/plugins +mkdir -p $zlux_instance_dir/ZLUX/pluginStorage +mkdir -p $zlux_instance_dir/serverConfig -mkdir -p ../zlux-app-server/deploy/instance/users -mkdir -p ../zlux-app-server/deploy/instance/groups +mkdir -p $zlux_users_dir/ZLUX/pluginStorage +mkdir -p $zlux_groups_dir/ZLUX/pluginStorage -# MVD bootstrap -cp -vr ../zlux-app-server/config/* ../zlux-app-server/deploy/product/ZLUX/serverConfig -cp -vr ../zlux-app-server/plugins/*.json ../zlux-app-server/deploy/product/ZLUX/plugins -cp -v ../zlux-app-server/plugins/*.json ../zlux-app-server/deploy/instance/ZLUX/plugins - -cp -vr ../zlux-app-server/config/zluxserver.json ../zlux-app-server/deploy/instance/ZLUX/serverConfig -cp -vr ../zlux-app-server/config/zlux.keystore.key ../zlux-app-server/deploy/instance/ZLUX/serverConfig -cp -vr ../zlux-app-server/config/zlux.keystore.cer ../zlux-app-server/deploy/instance/ZLUX/serverConfig -cp -vr ../zlux-app-server/config/apiml-localca.cer ../zlux-app-server/deploy/instance/ZLUX/serverConfig -cp -vr ../zlux-app-server/config/tomcat.xml ../zlux-app-server/deploy/instance/ZLUX/serverConfig - -cp -vr ../zlux-app-server/pluginDefaults/* ../zlux-app-server/deploy/instance/ZLUX/pluginStorage - -mkdir -p ../zlux-app-server/deploy/instance/ZLUX/pluginStorage/org.zowe.terminal.tn3270 -mkdir -p ../zlux-app-server/deploy/instance/ZLUX/pluginStorage/org.zowe.terminal.tn3270/sessions -cp -v ../tn3270-ng2/_defaultTN3270.json ../zlux-app-server/deploy/instance/ZLUX/pluginStorage/org.zowe.terminal.tn3270/sessions/_defaultTN3270.json - -mkdir -p ../zlux-app-server/deploy/instance/ZLUX/pluginStorage/org.zowe.terminal.vt -mkdir -p ../zlux-app-server/deploy/instance/ZLUX/pluginStorage/org.zowe.terminal.vt/sessions -cp -v ../vt-ng2/_defaultVT.json ../zlux-app-server/deploy/instance/ZLUX/pluginStorage/org.zowe.terminal.vt/sessions/_defaultVT.json +cp -vr ../zlux-app-server/defaults/* $zlux_instance_dir/serverConfig +cp -vr ../zlux-app-server/defaults/ZLUX/pluginStorage/* $zlux_instance_dir/ZLUX/pluginStorage # This program and the accompanying materials are # made available under the terms of the Eclipse Public License v2.0 which accompanies # this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html diff --git a/deploy.xml b/deploy.xml index 8b5f4d6..8f823ad 100644 --- a/deploy.xml +++ b/deploy.xml @@ -35,34 +35,33 @@ - - + - - + + - - - + + + - - + + - - + + - + - + - + @@ -78,7 +77,7 @@ ${home}/defaults/serverConfig/zlux.keystore.key ${home}/defaults/serverConfig/apiml-localca.cer ${home}/defaults/serverConfig/tomcat.xml - ${deploy}/instance/ZLUX/serverConfig'"/> + ${instanceDir}/serverConfig'"/> @@ -95,25 +94,25 @@ - + - + - - + + - + - - + + - + From f474b7c977bbb90a05d04f13c6d0647f20fd71ac Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Mon, 2 Dec 2019 18:27:42 -0500 Subject: [PATCH 3/5] Consolidate copy from defaults to instance Signed-off-by: 1000TurquoisePogs --- deploy.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/deploy.sh b/deploy.sh index 5942b22..c80073c 100755 --- a/deploy.sh +++ b/deploy.sh @@ -64,8 +64,7 @@ mkdir -p $zlux_instance_dir/serverConfig mkdir -p $zlux_users_dir/ZLUX/pluginStorage mkdir -p $zlux_groups_dir/ZLUX/pluginStorage -cp -vr ../zlux-app-server/defaults/* $zlux_instance_dir/serverConfig -cp -vr ../zlux-app-server/defaults/ZLUX/pluginStorage/* $zlux_instance_dir/ZLUX/pluginStorage +cp -vr ../zlux-app-server/defaults/* $zlux_instance_dir/ # This program and the accompanying materials are # made available under the terms of the Eclipse Public License v2.0 which accompanies # this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html From 977c3be14e57147eaff4add2ea0a49f0e78838e5 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Tue, 3 Dec 2019 15:23:53 -0500 Subject: [PATCH 4/5] Remove deploy.sh, its actions will be done in initInstance.js Signed-off-by: 1000TurquoisePogs --- deploy.sh | 74 ------------------------------------------------------- 1 file changed, 74 deletions(-) delete mode 100755 deploy.sh diff --git a/deploy.sh b/deploy.sh deleted file mode 100755 index c80073c..0000000 --- a/deploy.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/sh -# This program and the accompanying materials are -# made available under the terms of the Eclipse Public License v2.0 which accompanies -# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html -# -# SPDX-License-Identifier: EPL-2.0 -# -# Copyright Contributors to the Zowe Project. - -# Create deploy directories, out of which the server runs. -# the heirarchy of the configuration is, from broadest to narrowest scope -# product -# site -# instance -# |-- group -# |-- user -# -# group and user are members of an instance, of which there can be more than one per site -# but the product folder is meant to be read-only defaults that Rocket ships. -# -# within each scope, the structure of the folder should contain the PRODUCT, such as MVD -# although the design accomodates for multiple products. -# -# Within a product, there exists 3 subdirectories -# plugins - includes a plugins for the server, by having this folder contain a collection of jsons -# which specify the location of each plugin -# -# pluginStorage - the folder for which any user data, preferences, configuration may be stored, accessible over a network -# -# serverConfig - the folder for storing information that the server needs at startup, such as a json describing -# the port to use, or other files for security certificates - -# Don't do permission changes in this script because final changes such as these happen after this script is executed -# Such as, currently in zowe-runtime-authorize.sh - -if [ -n WORKSPACE_DIR ] -then - zlux_instance_dir=$WORKSPACE_DIR/app-server - zlux_site_dir=$WORKSPACE_DIR/app-server/site -elif [ -n INSTANCE_DIR ] -then - zlux_instance_dir=$INSTANCE_DIR/workspace/app-server - zlux_site_dir=$INSTANCE_DIR/workspace/app-server/site -else - zlux_instance_dir=../zlux-app-server/deploy/instance - zlux_site_dir=../zlux-app-server/deploy/site -fi - -zlux_users_dir=$zlux_instance_dir/users -zlux_groups_dir=$zlux_instance_dir/groups - -mkdir -p ../zlux-app-server/defaults/plugins -mkdir -p ../zlux-app-server/defaults/ZLUX/pluginStorage -mkdir -p ../zlux-app-server/defaults/serverConfig - -mkdir -p $zlux_site_dir/plugins -mkdir -p $zlux_site_dir/ZLUX/pluginStorage -mkdir -p $zlux_site_dir/serverConfig - -mkdir -p $zlux_instance_dir/plugins -mkdir -p $zlux_instance_dir/ZLUX/pluginStorage -mkdir -p $zlux_instance_dir/serverConfig - -mkdir -p $zlux_users_dir/ZLUX/pluginStorage -mkdir -p $zlux_groups_dir/ZLUX/pluginStorage - -cp -vr ../zlux-app-server/defaults/* $zlux_instance_dir/ -# This program and the accompanying materials are -# made available under the terms of the Eclipse Public License v2.0 which accompanies -# this distribution, and is available at https://www.eclipse.org/legal/epl-v20.html -# -# SPDX-License-Identifier: EPL-2.0 -# -# Copyright Contributors to the Zowe Project. From d74179036db9b53b46f03dd9114e706b14677ea0 Mon Sep 17 00:00:00 2001 From: 1000TurquoisePogs Date: Thu, 5 Dec 2019 19:01:02 -0500 Subject: [PATCH 5/5] Support both old and new scheme, fix very old bug about pathing Signed-off-by: 1000TurquoisePogs --- build.xml | 2 +- build_ng2.xml | 8 ++++---- common.properties | 2 +- deploy.xml | 28 ++++++++++++++++------------ 4 files changed, 22 insertions(+), 18 deletions(-) diff --git a/build.xml b/build.xml index 313559a..35b6616 100644 --- a/build.xml +++ b/build.xml @@ -17,7 +17,7 @@ - + diff --git a/build_ng2.xml b/build_ng2.xml index 0277e1c..b9ce663 100644 --- a/build_ng2.xml +++ b/build_ng2.xml @@ -104,7 +104,7 @@ - + @@ -114,10 +114,10 @@ - + - + @@ -125,7 +125,7 @@ - + diff --git a/common.properties b/common.properties index d3e8dc6..4f78c5d 100644 --- a/common.properties +++ b/common.properties @@ -1 +1 @@ -plugins=../zlux-app-server/deploy/instance/ZLUX/plugins +plugins=../zlux-app-server/defaults/plugins diff --git a/deploy.xml b/deploy.xml index 8f823ad..4eb89d6 100644 --- a/deploy.xml +++ b/deploy.xml @@ -42,9 +42,14 @@ - + + + + + + + - @@ -54,14 +59,14 @@ - + - + - + @@ -77,7 +82,7 @@ ${home}/defaults/serverConfig/zlux.keystore.key ${home}/defaults/serverConfig/apiml-localca.cer ${home}/defaults/serverConfig/tomcat.xml - ${instanceDir}/serverConfig'"/> + ${serverConfig}'"/> @@ -94,9 +99,9 @@ - + - + @@ -104,15 +109,14 @@ - + - - + - +