Last active
October 17, 2019 09:02
-
-
Save tmkasun/2217956f1872d29bc50a0ed322e2b7fe to your computer and use it in GitHub Desktop.
Revisions
-
tmkasun revised this gist
Oct 17, 2019 . 1 changed file with 27 additions and 19 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,62 +1,70 @@ #! /usr/bin/env bash # HOW TO USE: Put this file inside the directory where you would like to extract and run the product-APIM build file (.zip file) # Change the below path variables accordingly *** NOTE: No trailing `/` slashes has been used # This will only work with APIM 3.0.0 latest version with Carbon 4.x kernel. Addition to coping and unziping the pack, # This script will only create symbolic links to the carbon-apimgt repository files. source_path="/Users/tmkasun/Documents/wso2/dev/products/apim/carbon-apimgt-forked/features/apimgt" product_apimgt_path="/Users/tmkasun/Documents/wso2/dev/products/apim/product-apim-forked" pack_name="wso2am-3.0.0-SNAPSHOT" action=$1 create_symlink() { sources=$1 destination=$2 mv $destination "${destination}_back" echo "Linking " "${sources}" " ==========> " "${destination}" # mkdir -p `pwd`"/${destination}" #sudo mount --bind "${sources}" `pwd`"/${destination}" ln -s "${sources}" "${destination}" } symlink_apps() { artifact_id=$1 dir_name=$2 alt_dir_name=$3 source="${source_path}/${artifact_id}/src/main/resources/${dir_name}" if [ $alt_dir_name ] then echo "Mapping $dir_name in source to $alt_dir_name in pack . . ." dir_name=$alt_dir_name fi create_symlink "${source}" "${pack_name}/repository/deployment/server/jaggeryapps/${dir_name}" } run() { echo "Running the setup ..." echo "Starting APIM ..." ./${pack_name}/bin/wso2server.sh } checkExitCode() { exit_code=$?; if [[ $exit_code != 0 ]]; then exit $exit_code; fi } setup() { echo "Setting-up the environment ..." echo "coping ${pack_name}zip from product apimgt build path to here ..." cp "${product_apimgt_path}/modules/distribution/product/target/${pack_name}.zip" . checkExitCode echo "Removing existing $pack_name" rm -R ${pack_name} echo "Unziping $pack_name" code=$(unzip "${pack_name}.zip") checkExitCode echo "Creating symlinks for Publisher ..." symlink_apps "org.wso2.carbon.apimgt.publisher.feature" "publisher" checkExitCode echo "Creating symlinks for Store ..." symlink_apps "org.wso2.carbon.apimgt.store.feature" "devportal" checkExitCode run } -
tmkasun revised this gist
Jan 25, 2018 . 1 changed file with 1 addition and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,8 +1,7 @@ #! /usr/bin/env bash # HOW TO USE: Put this file inside the directory where you would like to extract and run the product-APIM build file (.zip file) # Change the below path variables accordingly *** NOTE: No trailing `/` slashes has been used # This will only work with APIM 3.0.0 M15 and later Since the carbon kernel update to 5.2.0 source_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/carbon-apimgt-forked/features/apimgt" product_apimgt_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/product-apim-forked" pack_name="wso2apim-3.0.0-SNAPSHOT" @@ -34,9 +33,6 @@ run() { # Intentionally delayed to sync with APIM server startup (sleep 30 && cd "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT/" && sed -i -e 's/\r$//' ./bin/ballerina && gnome-terminal --tab -e "./bin/ballerina run service services.bsz") & echo "Starting APIM ..." ./${pack_name}/wso2/default/bin/carbon.sh } -
tmkasun revised this gist
Jan 25, 2018 . 1 changed file with 4 additions and 4 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,12 @@ #! /usr/bin/env bash # HOW TO USE: Put this file inside the directory where you would like to extract and run the product-APIM build file (.zip file) # Change the below path variables accordingly *** NOTE: No trailing `/` slashes has been used # This will only work with APIM 3.0.0 M9 and later Since the carbon kernel update to 5.2.0 # Need to remove IS 5.4.0 Service Providers before login to any app If you are re-using same WSO2 Identity Server Instance with new APIM pack source_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/carbon-apimgt-forked/features/apimgt" product_apimgt_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/product-apim-forked" pack_name="wso2apim-3.0.0-SNAPSHOT" ballerina_build_path="${product_apimgt_path}/modules/gateway/target" action=$1 @@ -29,7 +31,6 @@ run() { echo "Starting activeMQ ..." echo "Starting ballerina APIM Gateway Server ..." # Intentionally delayed to sync with APIM server startup (sleep 30 && cd "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT/" && sed -i -e 's/\r$//' ./bin/ballerina && gnome-terminal --tab -e "./bin/ballerina run service services.bsz") & @@ -43,7 +44,7 @@ run() { setup() { echo "Setting-up the environment ..." echo "coping ${pack_name}zip from product apimgt build path to here ..." cp "${product_apimgt_path}/modules/distribution/target/${pack_name}.zip" . echo "Removing existing $pack_name" rm -R ${pack_name} @@ -52,7 +53,6 @@ setup() { code=$(unzip "${pack_name}.zip") echo "Unzipping gateway server ..." rm -R "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT" (cd ${ballerina_build_path} && unzip "wso2apim-gateway-3.0.0-SNAPSHOT.zip") -
tmkasun revised this gist
Jan 24, 2018 . 1 changed file with 1 addition and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,12 +1,10 @@ #! /usr/bin/env bash # HOW TO USE: Put this file inside the directory where you would like to extract and run the product-APIM build file (.zip file) # Change the below path variables accordingly *** NOTE: No trailing `/` slashes has been used # This will only work with APIM 3.0.0 M15 and later Since the carbon kernel update to 5.2.0 source_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/carbon-apimgt-forked/features/apimgt" product_apimgt_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/product-apim-forked" pack_name="wso2apim-3.0.0-SNAPSHOT" action=$1 @@ -29,12 +27,6 @@ symlink_apps() { run() { echo "Running the setup ..." echo "Starting activeMQ ..." echo "Starting ballerina APIM Gateway Server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" -
tmkasun revised this gist
Jan 12, 2018 . 1 changed file with 0 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,6 @@ source_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/carbon-apimgt-f product_apimgt_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/product-apim-forked" pack_name="wso2apim-3.0.0-SNAPSHOT" active_mq_dir="/home/tmkasun/Documents/wso2/dev/tools/apache-activemq-5.14.0" action=$1 -
tmkasun revised this gist
Jan 12, 2018 . 1 changed file with 4 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -37,18 +37,16 @@ run() { activemq start echo "Starting ballerina APIM Gateway Server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" # Intentionally delayed to sync with APIM server startup (sleep 30 && cd "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT/" && sed -i -e 's/\r$//' ./bin/ballerina && gnome-terminal --tab -e "./bin/ballerina run service services.bsz") & echo "Starting APIM key-manager profile..." gnome-terminal --tab -e "./${pack_name}/wso2/key-manager/bin/carbon.sh" echo "Starting APIM ..." ./${pack_name}/wso2/default/bin/carbon.sh } setup() { @@ -85,4 +83,4 @@ else echo "Unknown parameter. Type either 'setup' or 'run'" fi exit 1 -
tmkasun revised this gist
Jan 5, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ source_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/carbon-apimgt-f product_apimgt_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/product-apim-forked" pack_name="wso2apim-3.0.0-SNAPSHOT" active_mq_dir="/home/tmkasun/Documents/wso2/dev/tools/apache-activemq-5.14.0" is_pack_path="/home/tmkasun/Documents/wso2/dev/products/is/latest/release/wso2is-5.4.0" action=$1 @@ -44,7 +44,7 @@ run() { echo "Starting ballerina APIM Gateway Server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" # Intentionally delayed to sync with APIM server startup (sleep 30 && cd "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT/" && sed -i -e 's/\r$//' ./bin/ballerina && gnome-terminal --tab -e "./bin/ballerina run service services.bsz") & echo "Starting APIM ..." ./${pack_name}/wso2/default/bin/carbon.sh -
tmkasun revised this gist
Dec 6, 2017 . 1 changed file with 21 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,13 @@ #! /usr/bin/env bash # HOW TO USE: Put this file inside the directory where you would like to extract and run the product-APIM build file (.zip file) # Change the below path variables accordingly *** NOTE: No trailing `/` slashes has been used # This will only work with APIM 3.0.0 M9 and later Since the carbon kernel update to 5.2.0 # Need to remove IS 5.4.0 Service Providers before login to any app If you are re-using same WSO2 Identity Server Instance with new APIM pack source_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/carbon-apimgt-forked/features/apimgt" product_apimgt_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/product-apim-forked" pack_name="wso2apim-3.0.0-SNAPSHOT" active_mq_dir="/home/tmkasun/Documents/wso2/dev/tools/apache-activemq-5.14.0" is_pack_path="/home/tmkasun/Documents/wso2/dev/products/is/latest/release/wso2is-5.4.0-alpha10" action=$1 @@ -14,7 +16,15 @@ create_symlink() { sources=$1 destination=$2 mv $destination "${destination}_back" ln -s "${sources}" "${destination}" } symlink_apps() { artifact_id=$1 dir_name=$2 source="${source_path}/${artifact_id}/src/main/resources/${dir_name}" create_symlink "${source}/public" "${pack_name}/deployment/web-ui-apps/${dir_name}/public" } run() { @@ -34,10 +44,10 @@ run() { echo "Starting ballerina APIM Gateway Server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" # Intentionally delayed to sync with APIM server startup (sleep 100 && cd "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT/" && sed -i -e 's/\r$//' ./bin/ballerina && gnome-terminal --tab -e "./bin/ballerina run service services.bsz") & echo "Starting APIM ..." ./${pack_name}/wso2/default/bin/carbon.sh } @@ -46,7 +56,7 @@ setup() { echo "coping ${pack_name}zip from product apimgt build path to here ..." cp "${product_apimgt_path}/product/target/${pack_name}.zip" . echo "Removing existing $pack_name" rm -R ${pack_name} echo "Unziping $pack_name" @@ -58,7 +68,10 @@ setup() { (cd ${ballerina_build_path} && unzip "wso2apim-gateway-3.0.0-SNAPSHOT.zip") echo "Creating symlinks for Publisher ..." symlink_apps "org.wso2.carbon.apimgt.publisher.feature" "publisher" echo "Creating symlinks for Store ..." symlink_apps "org.wso2.carbon.apimgt.store.feature" "store" run } -
tmkasun revised this gist
Aug 4, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -34,7 +34,7 @@ run() { echo "Starting ballerina APIM Gateway Server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" # Intentionally delayed to sync with APIM server startup (sleep 20 && cd "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT/" && sed -i -e 's/\r$//' ./bin/ballerina && gnome-terminal --tab -e "./bin/ballerina run service services.bsz") & echo "Starting APIM ..." ./${pack_name}/bin/carbon.sh -
tmkasun revised this gist
Jul 8, 2017 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -20,6 +20,11 @@ create_symlink() { run() { echo "Running the setup ..." echo "Starting activeMQ ..." if ! type activemq > /dev/null; then echo "Can't find active MQ installed, running from directory ..." export PATH="${active_mq_dir}/bin/:$PATH" fi activemq start echo "Starting IS ..." @@ -47,11 +52,6 @@ setup() { echo "Unziping $pack_name" code=$(unzip "${pack_name}.zip") echo "Unzipping gateway server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" rm -R "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT" -
tmkasun revised this gist
Jun 29, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ run() { activemq start echo "Starting IS ..." # For mac use osascript -e 'tell application "Terminal" to activate' -e 'tell application "System Events" to tell process "Terminal" to keystroke "t" using command down' gnome-terminal --tab -e "${is_pack_path}/bin/wso2server.sh" echo "Starting ballerina APIM Gateway Server ..." -
tmkasun revised this gist
Jun 29, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,12 +23,13 @@ run() { activemq start echo "Starting IS ..." # For mac use open -a Terminal "`pwd`" gnome-terminal --tab -e "${is_pack_path}/bin/wso2server.sh" echo "Starting ballerina APIM Gateway Server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" # Intentionally delayed to sync with APIM server startup (sleep 20 && cd "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT/" && sed -i -e 's/\r$//' ./bin/ballerina && gnome-terminal --tab -e "./bin/ballerina run service org/wso2/carbon/apimgt/gateway") & echo "Starting APIM ..." ./${pack_name}/bin/carbon.sh -
tmkasun created this gist
Jun 19, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,74 @@ #! /usr/bin/env bash # HOW TO USE: Put this file inside the directory where you would like to extract and run the product-APIM build file (.zip file) # Change the below path variables accordingly *** NOTE: No ending `/` slashes has been used source_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/carbon-apimgt-forked/features/apimgt/org.wso2.carbon.apimgt.publisher.feature/src/main/resources/publisher" product_apimgt_path="/home/tmkasun/Documents/wso2/dev/products/team/apim/product-apim-forked" pack_name="wso2apim-3.0.0-SNAPSHOT" active_mq_dir="/home/tmkasun/Documents/wso2/dev/tools/apache-activemq-5.14.0" is_pack_path="/home/tmkasun/Documents/wso2/dev/products/is/latest/release/wso2is-5.3.0" action=$1 create_symlink() { sources=$1 destination=$2 mv $destination "${destination}_back" ln -s "${sources}" "${destination}" } run() { echo "Running the setup ..." echo "Starting activeMQ ..." activemq start echo "Starting IS ..." gnome-terminal --tab -e "${is_pack_path}/bin/wso2server.sh" echo "Starting ballerina APIM Gateway Server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" # Intentionally delayed to sync with APIM server startup (sleep 10 && cd "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT/" && sed -i -e 's/\r$//' ./bin/ballerina && gnome-terminal --tab -e "./bin/ballerina run service org/wso2/carbon/apimgt/gateway") & echo "Starting APIM ..." ./${pack_name}/bin/carbon.sh } setup() { echo "Setting-up the environment ..." echo "coping ${pack_name}zip from product apimgt build path to here ..." cp "${product_apimgt_path}/product/target/${pack_name}.zip" . echo "Removing exsisting $pack_name" rm -R ${pack_name} echo "Unziping $pack_name" code=$(unzip "${pack_name}.zip") if ! type activemq > /dev/null; then echo "Can't find active MQ installed, running from directory ..." export PATH="${active_mq_dir}/bin/:$PATH" fi echo "Unzipping gateway server ..." ballerina_build_path="${product_apimgt_path}/gateway/target" rm -R "${ballerina_build_path}/wso2apim-gateway-3.0.0-SNAPSHOT" (cd ${ballerina_build_path} && unzip "wso2apim-gateway-3.0.0-SNAPSHOT.zip") echo "Creating symlinks for Publisher ..." create_symlink "${source_path}/public" "${pack_name}/deployment/webapps/publisher/public" run } if [ "$action" == "setup" ]; then setup elif [ "$action" == "run" ]; then run else echo "Unknown parameter. Type either 'setup' or 'run'" fi exit 1