-
Notifications
You must be signed in to change notification settings - Fork 32
Deployment
Anita Hapsari edited this page Nov 13, 2018
·
5 revisions
- You can access the production server and staging server, and name it properly as
staging.changelog.kartoza.com
andchangelog.kartoza.com
by creating appropriate entries in your.ssh/config
- You have
develop
branch - You have a remote repository called
upstream
that mapped togit@github.com:kartoza/prj.app.git
- Go to deployment directory (i.e.
prj.app/deployment
) - Check out
develop
branch and make sure it's up to date withdevelop
branch inhttps://github.com/kartoza/prj.app
. - To make sure it is up to date, on your local
develop
branch dogit pull
andgit fetch
. It will update your local machine with the latest code and tag. - Run
./tag_and_deploy_to_staging.sh
to see the latest tag. Press CTRL+C to abort it. Sample output:In that case, your current tag is 1.7.11.estragon:deployment ismailsunni$ ./tag_and_deploy_to_staging.sh Use this to tag a version on your local machine, push the tag upstream and then deploy it to the remote staging server. e.g. ./tag_and_deploy_to_staging.sh 1.2.3 Last tag on your local system is: 1.7.11 New tag to be added to your local repo and pushed upstream: Are you sure you want to continue?
- Decide the next tag, (e.g. 1.7.12). Then run
./tag_and_deploy_to_staging.sh 1.7.12
. Pressy
to continue. - Do migration to the staging server if needed:
- Run
ssh staging.changelog.kartoza.com
cd /home/projecta/deployment
make migrate
- Run
- Check and do some testing on the staging server.
- Go to deployment directory (i.e.
prj.app/deployment
) - Check out
develop
branch and make sure it's up to date withdevelop
branch inhttps://github.com/kartoza/prj.app
- Decide the version that you want to deploy, (e.g. 1.7.12). Then run
./deploy_to_production.sh 1.7.12
. Pressy
to continue. - Do migration to the production server if needed:
- Run
ssh changelog.kartoza.com
cd /home/projecta/deployment
make migrate
- Run
- Check and do some testing on the production server.