...
As an open source platform to easily build enterprise web apps for cloud and mobile, Joget is a good complement for the Google Cloud Platform.
Image Removed
Image Added
Image Removed
Image Added
This article describes the steps required to deploy Joget on a Linux VM using the Compute Engine. You can also use other OS platforms (e.g. Windows, OSXmacOS, etc) by adapting the commands accordingly.
...
Code Block |
---|
|
export INSTANCE_NAME=joget6joget7
export IMAGE_ID=ubuntu-16041804-xenialbionic-v20170307v20200129a
export IMAGE_PROJECT=ubuntugce-osuefi-cloudimages
export MACHINE_TYPE=f1n1-standard-micro1
export JOGET_VERSION=67.0.200
export MYSQL_VERSION=5.7
export MYSQL_PASSWORD=root
echo "== Create VM instance $INSTANCE_NAME for $IMAGE_ID on $MACHINE_TYPE =="
gcloud compute instances create $INSTANCE_NAME --image $IMAGE_ID --image-project $IMAGE_PROJECT --machine-type=$MACHINE_TYPE
|
Code Block |
---|
|
set INSTANCE_NAME=joget6joget7
set IMAGE_ID=ubuntu-16041804-xenialbionic-v20170307v20200129a
set IMAGE_PROJECT=ubuntugce-osuefi-cloudimages
set MACHINE_TYPE=f1n1-standard-micro1
set JOGET_VERSION=67.0.200
set MYSQL_VERSION=5.7
set MYSQL_PASSWORD=root
echo "== Create VM instance %INSTANCE_NAME% for %IMAGE_ID% on %MACHINE_TYPE% =="
gcloud compute instances create %INSTANCE_NAME% --image %IMAGE_ID% --image-project %IMAGE_PROJECT% --machine-type=%MACHINE_TYPE% |
...
Code Block |
---|
|
echo "== Deploy Joget =="
gcloud compute ssh $INSTANCE_NAME -- "\
echo === Install Java ===;\
sudo apt-get update;\
sudo apt-get install -y openjdk-8-jdk-headless;\
echo === Install MySQL ===;\
sudo debconf-set-selections <<< \"mysql-server-$MYSQL_VERSION mysql-server/root_password password $MYSQL_PASSWORD\";\
sudo debconf-set-selections <<< \"mysql-server-$MYSQL_VERSION mysql-server/root_password_again password $MYSQL_PASSWORD\";\
sudo apt-get -y install mysql-server-$MYSQL_VERSION;\
sudo -E apt-get -q -y install mysql-server;\
echo === Download Joget $JOGET_VERSION ===;\
cd ~;\
wget https://dev.joget.org/downloads/enterprise/joget-enterprise-linux-$JOGET_VERSION.tar.gz;\
echo === Extract Bundle ===;\
tar xvfz joget-enterprise-linux-$JOGET_VERSION.tar.gz;\
cd joget-enterprise-linux-$JOGET_VERSION;\
echo === Setup Datasource ===;\
apache-ant-1.7.1/bin/ant setup -Dprofile.name=default -Ddb.name=jwdb -Ddb.host=localhost -Ddb.port=3306 -Ddb.user=root -Ddb.password=$MYSQL_PASSWORD;\
echo === Reduce JAVA VM Memory Allocation ===;\
sed -i -e 's/512768/256/g' tomcat8.sh;\
echo === Clean Bundle ===;\
cd ..;\
rm -r joget-enterprise-linux-$JOGET_VERSION.tar.gz;\
echo === Start Joget $JOGET_VERSION ===;\
cd joget-enterprise-linux-$JOGET_VERSION;\
./tomcat8.sh start" |
Code Block |
---|
|
echo "== Deploy Joget =="
gcloud compute ssh %INSTANCE_NAME% --command="echo === Install Java ===;sudo apt-get install -y openjdk-8-jdk-headless; echo === Install MySQL ===; sudo debconf-set-selections ^<^<^< \"mysql-server-%MYSQL_VERSION% mysql-server/root_password password %MYSQL_PASSWORD%\"; sudo debconf-set-selections ^<^<^< \"mysql-server-%MYSQL_VERSION% mysql-server/root_password_again password %MYSQL_PASSWORD%\"; sudo apt-get -y install mysql-server-%MYSQL_VERSION%; sudo -E apt-get -q -y install mysql-server; echo === Download Joget %JOGET_VERSION% ===; cd ~; wget https://dev.joget.org/downloads/enterprise/joget-enterprise-linux-%JOGET_VERSION%.tar.gz; echo === Extract Bundle ===; tar xvfz joget-enterprise-linux-%JOGET_VERSION%.tar.gz; cd joget-enterprise-linux-%JOGET_VERSION%; echo === Setup Datasource ===; apache-ant-1.7.1/bin/ant setup -Dprofile.name=default -Ddb.name=jwdb -Ddb.host=localhost -Ddb.port=3306 -Ddb.user=root -Ddb.password=%MYSQL_PASSWORD%; echo === Reduce JAVA VM Memory Allocation ===; sed -i -e 's/512768/256/g' tomcat8.sh; echo === Clean Bundle ===; cd ..; rm -r joget-enterprise-linux-%JOGET_VERSION%.tar.gz; echo === Start Joget %JOGET_VERSION% ===; cd joget-enterprise-linux-%JOGET_VERSION%; ./tomcat8.sh start" |
...
The deployment is complete once you see the following in the logs:
Code Block |
---|
2312-Mar-20172020 07:24:02.199 INFO [main] org.apache.catalina.startup.Catalina.start Server startup in XXXXX ms |
...