cisagov / manage.get.gov

A Django-based domain name registrar used by the .gov domain to communicate with an EPP registry
https://get.gov
Other
54 stars 15 forks source link

Developer Onboarding: Matt-Spence #2400

Open Matt-Spence opened 1 week ago

Matt-Spence commented 1 week ago

Developer Onboarding

Installation

There are several tools we use locally that you will need to have.

Access

Steps for the onboardee

Steps for the onboarder

Documents to Review

Setting up commit signing

Follow the instructions here to generate a new GPG key (default configurations are okay) and add it to your GPG keys on Github.

Configure your key locally:

git config --global commit.gpgsign true
git config --global user.signingkey <YOUR KEY>

Where your key is the thing you generated to run the command

gpg --armor --export <YOUR KEY>

when setting up your key in Github.

Now test commit signing is working by checking out a branch (yourname/test-commit-signing) and making some small change to a file. Commit the change (it should prompt you for your GPG credential) and push it to Github. Look on Github at your branch and ensure the commit is verified.

Note: if you are on a mac and not able to successfully create a signed commit, getting the following error:

error: gpg failed to sign the data
fatal: failed to write commit object

You may need to add these two lines to your shell's rc file (e.g. .bashrc or .zshrc)

GPG_TTY=$(tty)
export GPG_TTY

and then

source ~/.bashrc

or

source ~/.zshrc

Setting up developer sandbox

We have three types of environments: stable, staging, and sandbox. Stable (production)and staging (pre-prod) get deployed via tagged release, and developer sandboxes are given to get.gov developers to mess around in a production-like environment without disrupting stable or staging. Each sandbox is namespaced and will automatically be deployed too when the appropriate branch syntax is used for that space in an open pull request. There are several things you need to setup to make the sandbox work for a developer.

All automation for setting up a developer sandbox is documented in the scripts for creating a developer sandbox and removing a developer sandbox. A Cloud.gov organization administrator will have to perform the script in order to create the sandbox.

vickyszuchin commented 1 week ago

Pulling this onboarding ticket into sprint 48 from sprint 49 since it is "In-progress"