...
Step-by-step guide to complete release for mixed v2 and v3 system
- Softare Development - Development Branches and Servers
- Geodashboard v2
- Core
- Geodashboard V2 is used for multiple projects
- release will be decided by larger group - contacts are Luigi Marini, Indira Gutierrez Polo
- v2 should be on the most recent version of development branch on project's development server
- For creating a geodashboard (core) release. One of the committers needs to create a release branch. The release number should follow semantic versioning http://semver.org/. In the release branch there need to be the following 3 changes:
- Update version number in project/Build.scala
- Update version number in package.json
- In Changelog.md update version number and add release date
- After the release branch is merged, a tag needs to be created in the master branch. Instructions for creating a tag are here: https://git-scm.com/book/en/v2/Git-Basics-Tagging
- After creating the tag, create new branch, it's name could be custom 'master-to-develop-release-2.x.x' and merge that branch to develop.
- Project specific configuration
- Create a project specific (gltg/ilnlrs/imlczo/seagrant) release branch. Follow semantic versioning to determine the number for the release: http://semver.org/. In the release branch there need to be 2 changes:
- Update version number in package.json
- In changelog.md update version number and add release date
- After the release branch is merged, a tag needs to be created in the master branch. Instructions for creating a tag are here: https://git-scm.com/book/en/v2/Git-Basics-Tagging - The tag name for version 1.9.0 should be 'v1.9.0', add the letter v to indicate version before the release number for the tag.
- After creating the tag, create new branch, it's name could be custom 'master-to-develop-release-2.x.x' and merge that branch to develop. the project specific configuration develop branch should be up to date with all necessary updates
- Create a project specific (gltg/ilnlrs/imlczo/seagrant) release branch. Follow semantic versioning to determine the number for the release: http://semver.org/. In the release branch there need to be 2 changes:
- Geodashboard V2 is used for multiple projects
- Build
- If set up with Puppet, the development server should update automatically to the most recent build
- If you need to update manually, shh ssh to the geodashboard developement server
Code Block sudo /home/geodashboard/update-geodashboard.sh --force
- If set up with Puppet, the development server should update automatically to the most recent build
- Core
- Geodashboard v3
- Software
- Each project should have a specific branch of v3 named by project name, which the master branch merged into the configuration
- The master branch should be merged into the project branch which maintains it's specific configuration
- Each project should have a specific branch of v3 named by project name, which the master branch merged into the configuration
- Build (local by user)
Code Block git clone ssh://git@opensource.ncsa.illinois.edu:7999/geod/geodashboard-v3.git cd geodashboard-v3 checkout <project specific branch name> yarn install yarn run build
Copy the contents of the build directory of the system's proxy server
- check the nginx root directory
Code Block more /etc/nginx/sites-enabled/gltg<site> | grep root
this returns the path to the nginx root directory
- cd to nginx root directory
- there should be a directory call 'gd3' (maybe named something else)
- backup the directory
Code Block cp -r gd3 gd3_backup
- copy the new build files into the gd3 directory (delete the previous of just overwrite)
- Software
- Clowder
- clowder on dev uses the clowder development branch
- should update automatically
- to update manually
Code Block sudo /home/clowder/update-clowder.sh --force
TEST THE SITE!!!
- Geodashboard v2
- Development - Data
- Make sure all data is up to date and correct
- backup the database
On the database server:
Code Block sudo -u postgres pg_dump <geostream db name > geostream-backup.sql
If not sure of the geostream database name, on the clowder server:
Code Block more /home/clowder/clowder/custom/custom.conf | grep postgres.db
Make sure the cache is updated. If not sure run (this will take a while depending upon how much data there is):
Code Block <host>/clowder/api/geostreams/cache
Production - Branches and Servers (after thoroughly testing dev)
- Geodashboard
- Core - make sure the core master branch is ready
- project config
- Merge develop into master
All software on production branches need to be updated manually on geodashboard server
Code Block sudo /home/geodashboard/update-geodashboard.sh --force
- Clowder
On clowder server
Code Block sudo /home/clowder/update-clowder.sh --force
- Geodashboard
Production - Data
- If there is new data on dev and you decide to move the dev database to prod database and move the dev cache to the prod cache:
- turn on maintenance page
- ssh into postgres machine
backup development and production databases
Code Block sudo -u postgres pg_dump geostream_dev > geostream_dev_$(date +"%Y-%m-%d").sql # took 42 minutes to create 6.8G db sudo -u postgres pg_dump geostream > geostream_$(date +"%Y-%m-%d").sql # took 52 minutes to create 9.5G db
Copy dev database to production temp database
stop clowder on dev
copy
Code Block sudo -u postgres psql -c "create database geostream_prod_temp with template geostream_dev"
delete the production database
Stop clowder on production machine and:
Code Block sudo -u postgres dropdb geostream
Rename production database
Stop clowder on dev machine
Code Block sudo -u postgres psql -c "ALTER DATABASE geostream_prod_temp RENAME TO geostream;"
Restart both clowder instances
- Copy cache from dev machine to prod machine
- on production machine delete cache
- option 1, use clowder endpoint
option 2, on clowder machine delete cache files
Code Block sudo rm /home/clowder/cache/*
use ssh to copy cache from dev to production (rsync would be better) (using key would be better) . On production machine:
Code Block sudo scp <your_ubuntu_username_on_dev>@<dev_hostname>:/home/clowder/cache/* .
- on production machine delete cache
- turn off maintenance page
- If there is new data on dev and you decide to move the dev database to prod database and move the dev cache to the prod cache:
Info |
---|
Related articles
Content by Label | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...