...
Code Block |
---|
|
export INSTANCE_NAME=joget7joget8
export IMAGE_ID=ubuntu-18042204-bionicjammy-v20200129av20240628
export IMAGE_PROJECT=gceubuntu-uefios-imagescloud
export MACHINE_TYPE=n1-standard-1
export JOGET_VERSION=8.01.02
export MYSQL_VERSION=58.74
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=joget7joget8
set IMAGE_ID=ubuntu-18042204-bionicjammy-v20200129av20240628
set IMAGE_PROJECT=gceubuntu-uefios-imagescloud
set MACHINE_TYPE=n1-standard-1
set JOGET_VERSION=8.01.02
set MYSQL_VERSION=58.74
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-811-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://devdownload.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/768/256/g' tomcat8tomcat.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;\
./tomcat8tomcat.sh start" |
Code Block |
---|
|
echo "== Deploy Joget =="
gcloud compute ssh %INSTANCE_NAME% --command="echo === Install Java ===;sudo apt-get install -y openjdk-811-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/768/256/g' tomcat8tomcat.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%; ./tomcat8tomcat.sh start" |
Deployment may take several minutes (depending on the type of VM) so be patient.
...