GreenSTAR is an accounting application built for the new generation.
$ brew install jq yq # Just useful tools for JSON and YAML manipulation
$ brew install go node # Programming languages
$ brew install kubernetes-cli # Kubernetes CLI
Install Telepresence by following this guide. Note
that this will add the ambassador
namespace to the cluster.
It's also possible you'll need to apply these changes if you need to have volume mounts working on macOS.
You'll also need to connect to the cluster once with a durable connection, like so:
$ telepresence connect
The developer story for GreenSTAR is architected on the following principals:
- Every change is done in a feature or bugfix branch
- This branch is pushed to GitHub and a pull request is created for it (PR creation has been automated)
- PR creation triggers a dedicated environment to be created for the PR
- This environment is deployed to a dedicated namespace in the cluster
- The environment is accessible via a dedicated URL
- Telepresence is then used to run the backend or frontend locally yet replacing their counterpart in the remote namespace. For instance, the backend can be run locally, but traffic arriving to the dedicated environment's backend will reach the locally-running process of the backend (thanks to Telepresence).
- Once the PR is merged, the dedicated environment is deleted
The IntelliJ IDEA project is stored in the repository (the parts that should be shared across engineers) and it contains run configurations for the backend and frontend. These run configurations are configured to run the application locally.
However, you need to first start a Telepresence intercept, like so:
# If you want to intercept the backend locally:
$ telepresence intercept --namespace=MY-ENV greenstar-frontend --port 8080:http --env-file ./frontend/intercept.env
# If you want to intercept the frontend locally:
$ telepresence intercept --namespace=MY-ENV greenstar-backend --port 8000:http --env-file ./backend/intercept.env
End-to-end tests are available in the e2e
directory. To run them use the following:
$ npx playwright test # Runs the end-to-end tests.
$ npx playwright test --ui # Starts the interactive UI mode.
$ npx playwright test --debug # Runs the tests in debug mode.
See this blog post for more information.