-
Notifications
You must be signed in to change notification settings - Fork 3
Application Deployment
Ben Matern edited this page Jan 27, 2022
·
12 revisions
- Version is in pom.xml.
- Is it committed to the proper branch? Probably we're deploying the "develop" branch
- DEV (local only): https://www.jhipster.tech/development/
- STAGING/PROD (aws instances): https://www.jhipster.tech/production/
./mvnw -Pprod clean package [verify]
- setup aws cli locally (first time only)
- install aws cli (https://aws.amazon.com/cli/?nc1=h_ls)
- run aws configure (user api keyand password must be known)
- copy file to aws s3 bucket
aws s3 cp ihiw-management-1.0.2.jar s3://ihiw.management.build.artifacts/
- ssh-add -D
- ssh-add -k *
- access bastion instance via ssh
ssh -A ec2-user@aws.ihiws.org
- access ihiw app server instance [STAGING 10.0.1.60; PROD 10.0.2.207]
ssh -A ec2-user@[server-IP]
- fetch build artifact from S3
sudo -s
cd /usr/local/ihiw
aws s3 cp s3://ihiw.management.build.artifacts/ihiw-management-1.0.2.jar .
- start/stop ihiw app
- run stop.sh
- adjust softlink to new build artifact:
ln -sf ihiw-management-1.0.2.jar ihiw-management-app
- run start.sh
- start.sh:
#!/bin/bash java -jar ihiw-management-app --spring.config.location=classpath:/config/application.yml,file:/usr/local/ihiw/application-prod.yml --spring.profiles.active=prod >> output.log 2>&1 & echo $! > ./pid.file &
- stop.sh:
#!/bin/bash kill $(cat ./pid.file)