Skip to content

Stages of SEED development

Bryan Luu edited this page Jun 14, 2022 · 2 revisions

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.

Set up remotes

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

Branch off of opengb-develop

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

Deploy changes to DockerHub

Once our feature/fix is finished, we need to deploy our SEED to docker-hub (specifically this hub). Here are the steps:

  1. Navigate to our SEED repo (opengb/seed) root directory
  2. Build a docker image from the current code: docker build .
  3. 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).
  4. 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
  5. 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).

Deploy changes to staging

Now you need to switch the staging environment to use your image on docker-hub.

  1. SSH into the staging environment: ssh seed-stg-001
  2. In the staging server, navigate to seed-docker: cd seed-docker
  3. Edit docker-compose.yml
  4. Edit the image on line 28 and 65 (for web and web-celery resp.) to point to your new image name (copy the title of your image on hub.docker.com)
  5. Get back to the root directory on staging: cd ..
  6. Run ./stop-seed-docker to stop the server
  7. 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.

Deploy changes to production

If you want to use a brand new docker image tag, you'll need to switch the production environment docker-compose file.

  1. SSH into production SEED: ssh grid-prd-seed-1
  2. Navigate to /etc/docker-seed/
  3. Update the image on line 9 and 49 to point to the desired image.
  4. Restart the service with sudo service docker-seed restart