Set Up Basic Development Kit/Improve New Developer Onboarding
Problem
Developing the customer portal requires a long installation process/setup.
Proposal
Create a development kit such as GDK that will let us install and update the customer portal easily.
Right now we have a basic CDK script - https://gitlab.com/gitlab-org/customers-gitlab-com/-/blob/staging/cdk/setup.rb
The idea would be to add steps to it that go through the different stages of the setup:
- Install
asdf
- Run ./bin/bootstrap
- Start posgresql/redis
- Setup ngrok (use something like https://github.com/piotrmurach/tty-prompt to prompt for the token, etc...)
- Setup Unleash (we should probably have a Settings class that reads, merges, and writes to the
secrets.yml
file) - Setup Zuora (Using tty-prompt or similar plus the Settings class, to keep it interactive)
- For setting up Zuora, we could build a Slack command to retrieve this via CI and GitLab Chatops as a future iteration
- Setup the local environment via
bundle install
,yarn install
,DB setup
, etc... - Start ngrok
- Setup GitLab (optional): We could again use the prompt to ask for details and update them using Settings. As a future iteration asking for a token and URL may suffice to do the whole thing ourselves.
- Start the app
A few commands I would expect CDK to handle (some in future iterations):
bin/cdk setup # Runs all of the steps above, ideally idempotent
bin/cdk setup ngrok # Runs just this specific step
bin/cdk update # Updates to latest, merges new secrets files using Settings, runs migrations, restarts app...
bin/cdk start/restart/stop # Starts/restarts/stops the application
Also this is largely inspired by the application that use to deploy GitLab not long ago: https://gitlab.com/gitlab-org/takeoff
Result
Set up time for future developers would decrease.