Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update README.md with more information for deploying process #307

Merged
merged 2 commits into from
Feb 6, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,41 @@ If you add a new API, be careful to add ```request.header.origin``` as cacheKey,

## Deploying

Deploys are automated using Github Actions and Flux.
Deploys are automated using Github Actions and Flux in combination. A deployment is made for 3 environments: `dev`, `testnet` and `mainnet`; and 2 systems: lambdas and deamon.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

deamon -> daemon


To deploy to the `testnet` environment, simply commit to the `main` branch.
Watch logs and alerts related to the deployment of the services in [SOP Logs](https://github.com/HathorNetwork/ops-tools/blob/master/docs/sops/hathor-explorer-service.md#logs).

To deploy to the `mainnet` environment, create a release in Github using a tag in the format `v0.0.0`
### Systems

Currently we do not have an automated mechanism to be warned if some automated deployment fails. So, after triggering the deploy, you should check if a commit was made by `fluxcdbot` in https://github.com/HathorNetwork/ops-tools/commits/master, updating the project's manifests with the new Docker image tag.
There are 2 systems.

#### Lambdas

It happens by the make script method `deploy-lambdas-ci`, which build and deploy the source code to lambda services in the AWS.

#### Deamon

It happens by the make script method `deploy-deamons`, which build a docker image and push it to ECR, in the `hathor-explorer-service` repository. Once an image is pushed to ECR, the [fluxcdbot] identifies the lastest version tag and commit it in the ops-tools, in the hathor-explorer-service's kubernetes manifest. When the new definition is commited, a scheme sync happens in the kubernetes and new pods for the new version are lifted up.

>[!TIP]
>After a deploy job finish with success in the GitHub action, look at the [Ops-Tools repository commits](https://github.com/HathorNetwork/ops-tools/commits/master) and check if the new hathor-explorer-service image for the new version is commited.

### Environments

There are 3 environments.

#### Dev

Every push to `dev` branch triggers the deployment for both systems in the `dev` environment.

#### Testnet

Every push to `main` branch triggers the deployment for both systems in the `testnet` environment.

#### Mainnet

Every push of a tag in the format `v0.0.0` triggers the deployment for both systems in the `mainnet` environment.

### Troubleshooting

Look for issues and possible solutions in the [On-Call Incidents repository](https://github.com/HathorNetwork/on-call-incidents/issues?q=is:issue+explorer-service), [Internal Issues](https://github.com/HathorNetwork/internal-issues/issues?q=is:issue+is:open+explorer-service), or in the repository itself.