-
Notifications
You must be signed in to change notification settings - Fork 0
Stages of SEED development
Here, we've listed general steps developers take when making changes to our fork. It is assumed that each section is done in sequential order.
If you need to merge changes from the main SEED repo, in your local branch, set up a remote for the main SEED repo (e.g. upstream
):
git remote add upstream https://github.com/SEED-platform/seed.git
We mainly develop on the opengb-develop
branch. Create a branch off of opengb-develop
. Make your changes there.
git checkout opengb-develop
git checkout -b $branch_name
Once our feature/fix is finished, we need to deploy our SEED to docker-hub (specifically this hub). Here are the steps:
- Navigate to our SEED repo (
opengb/seed
) root directory - Build a docker image from the current code:
docker build .
- Run
docker images
to view all docker images. The new SEED docker image will show up with the most recent "CREATED" timestamp. Copy/record the Image ID for your new SEED docker image (e.g.bb6ab498a932
). - Create a tag for your image with
docker tag $image_id "opengb/seed:$branch_name"
, where$branch_name
can be customized to be more descriptive - Push the docker image to staging server with
docker push "opengb/seed:$branch_name"
. You may need to ask the developer team for credentials (or check 1Pass).
Now you need to switch the staging environment to use your image on docker-hub.
- SSH into the staging environment:
ssh seed-stg-001
- In the staging server, navigate to
seed-docker
:cd seed-docker
- Edit
docker-compose.yml
- Edit the image on line 28 and 65 (for
web
andweb-celery
resp.) to point to your new image name (copy the title of your image on hub.docker.com) - Get back to the root directory on staging:
cd ..
- Run
./stop-seed-docker
to stop the server - Run
./start-seed-docker
to start the server up with the new image.
Your changes are now live on staging. Go to https://seed-stg-001.opengb.com/ to test it out.
If you want to use a brand new docker image tag, you'll need to switch the production environment docker-compose file.
- SSH into production SEED:
ssh grid-prd-seed-1
- Navigate to
/etc/docker-seed/
- Update the image on line 9 and 49 to point to the desired image.
- Restart the service with
sudo service docker-seed restart