From 3449fdb7be7b1a25c52f51e44d9e63007ac18f68 Mon Sep 17 00:00:00 2001 From: Alex Ruzenhack Date: Thu, 18 Jan 2024 18:50:22 +0000 Subject: [PATCH 1/2] chore: update README.md with more information for deploying process --- README.md | 39 +++++++++++++++++++++++++++++++++++---- 1 file changed, 35 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index e5f079ec..ee5cc1d5 100644 --- a/README.md +++ b/README.md @@ -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. -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. \ No newline at end of file +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. From 4d96729848d0c3b657f6f93dfeb28d89d33d2069 Mon Sep 17 00:00:00 2001 From: Alex Ruzenhack Date: Tue, 30 Jan 2024 15:49:11 +0000 Subject: [PATCH 2/2] chore: migrate Deployment section to SOP --- README.md | 39 +-------------------------------------- 1 file changed, 1 insertion(+), 38 deletions(-) diff --git a/README.md b/README.md index ee5cc1d5..f2ca0c1b 100644 --- a/README.md +++ b/README.md @@ -14,41 +14,4 @@ If you add a new API, be careful to add ```request.header.origin``` as cacheKey, ## Deploying -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. - -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). - -### Systems - -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. +See in the [SOP](https://github.com/HathorNetwork/ops-tools/blob/master/docs/sops/hathor-explorer-service.md#deployment).