Skip to content

Commit

Permalink
Merge pull request #150 from celo-org/odis-GCP-docs
Browse files Browse the repository at this point in the history
Odis gcp docs
  • Loading branch information
alvarof2 authored Nov 8, 2023
2 parents 68f6ccb + 0f5e591 commit 5da10a4
Show file tree
Hide file tree
Showing 14 changed files with 1,021 additions and 35 deletions.
2 changes: 2 additions & 0 deletions .changeset/quiet-taxis-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
24 changes: 16 additions & 8 deletions docs/kubernetes-deployment/combiner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ Notice the following:

- `<RELEASE_NAME>`: Name of the Helm release.
- `<NAMESPACE>`: Kubernetes namespace to deploy the Helm chart.
- `<VALUES_FILE_PATH>`: Path to your `values.yaml` file that define the Helm deployment. You can use the examples under [./values] as a guide, but you will have to modify it according to your needs. You can find a table defining the values file [here](https://github.com/celo-org/charts/tree/main/charts/odis-combiner#values).
- `<VERSION>`: The version of the Helm chart. If omitted, it will use the latest version (available at the [chart's README](https://github.com/celo-org/charts/tree/main/charts/odis-combiner#odis-combiner) as a GitHub badge).
- `<VALUES_FILE_PATH>`: Path to your `values.yaml` file that defines the Helm deployment. You can use the examples under [./values] as a guide, but you will have to modify it according to your needs. You can find a table defining the values file [here](https://github.com/celo-org/charts/tree/main/charts/odis-combiner#values).
- `<VERSION>`: The version of the Helm chart. If omitted, it will use the latest version (available in the [chart's README](https://github.com/celo-org/charts/tree/main/charts/odis-combiner#odis-combiner) as a GitHub badge).

## cLabs Developers

Expand All @@ -31,23 +31,23 @@ ODIS combiner is deployed in the following clusters:
- URL: `https://odis-combiner-staging.integration-tests.celo-networks-dev.org`
- Alfajores: cluster `alfajores`, namespace `odis-combiner-alfajores` with this [`values-alfajores.yaml` file](./values/values-alfajores.yaml).
- URL: `https://odis-combiner-alfajores.alfajores.celo-testnet.org`
- Mainnet: cluster `mainnet`, namespace `odis-combiner-mainnet` with this [`values-mainnet.yaml` file](./values/values-mainnet.yaml).
- URL: `https://odis-combiner-mainnet.mainnet.celo-testnet.org`
- Mainnet: cluster `rc1-us-west1`, namespace `odis-combiner-mainnet` with this [`values-mainnet.yaml` file](./values/values-mainnet.yaml).
- URL: `https://odis-combiner-mainnet.rc1-europe-west1.celo-testnet.org`

### Modifying the deployment

There are 2 main ways to modify the ODIS combiner deployment in Kubernetes.

- Directly modify the deployment in GCP console.
- Directly modify the deployment in the GCP console.
- Use [Helm](https://helm.sh/).

#### Directly modify the deployment in GCP console
#### Directly modify the deployment in the GCP console

You can access the ODIS deployment following these links. There you can edit the deployment and modify any value as needed (image, Env. Vars., etc.).
You can access the ODIS deployment by following these links. There you can edit the deployment and modify any value as needed (image, Env. Vars., etc.).

- [Staging](https://console.cloud.google.com/kubernetes/deployment/us-west1-b/integration-tests/odis-combiner-staging/odis-combiner-staging/yaml/view?project=celo-testnet&supportedpurview=project)
- [Alfajores](https://console.cloud.google.com/kubernetes/deployment/us-west1-a/alfajores/odis-combiner-alfajores/odis-combiner-alfajores/yaml/view?project=celo-testnet-production&supportedpurview=project)
- [Mainnet](https://console.cloud.google.com/kubernetes/deployment/us-west1-a/mainnet/odis-combiner-mainnet/odis-combiner-mainnet/overview?project=celo-testnet-production&supportedpurview=project)
- [Mainnet](https://console.cloud.google.com/kubernetes/deployment/europe-west1-b/rc1-europe-west1/odis-combiner-mainnet/odis-combiner-mainnet/yaml/view?project=celo-testnet-production&supportedpurview=project)

#### Use Helm

Expand All @@ -66,3 +66,11 @@ You can access the ODIS deployment following these links. There you can edit the
```

5. Ensure there are no sensitive values in the `./values/values-<staging|alfajores|mainnet>.yaml` file and commit it to this repo.

### Tracing

Tracing is enabled in the ODIS combiner. The combiners send traces to a Grafana Agent deployed in the same cluster as the combiners.

- Staging Grafana Agent URL: `http://grafana-agent.monitoring:14268/api/traces`
- Alfajores Grafana Agent URL: `http://grafana-agent.monitoring:14268/api/traces`
- Mainnet Grafana Agent URL: `http://grafana-agent.monitoring:14268/api/traces`
115 changes: 107 additions & 8 deletions docs/kubernetes-deployment/combiner/values/values-alfajores.yaml
Original file line number Diff line number Diff line change
@@ -1,92 +1,191 @@
# Default values for odis-combiner-helm.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.

# -- Chart name override
nameOverride: ""
# -- Chart full name override
fullnameOverride: ""

# -- Number of deployment replicas
replicaCount: 1

image:
repository: us-west1-docker.pkg.dev/devopsre/dev-images/odis-combiner
# -- Image repository
repository: us-west1-docker.pkg.dev/devopsre/social-connect/odis-combiner
# -- Image pullpolicy
pullPolicy: Always
tag: "85baf6c3854aff588d88332addd709d544ebd6c4"
# -- Image tag
# Overrides the image tag whose default is the chart appVersion.
tag: "odis-combiner-3.3.1"

# -- Image pull secrets
imagePullSecrets: []

serviceAccount:
# -- Specifies whether a service account should be created
create: true
# -- Annotations to add to the service account
annotations: {}
# -- The name of the service account to use. If not set and create is true, a name is generated using the fullname template
name: ""

env:
tracing:
# -- Enable tracing
enabled: true
endpoint: "https://grafana-agent.odis-alfajores-signer-3.celo-networks-dev.org/api/traces"
# -- Env. Var TRACER_ENDPOINT. If enabled is false, will not be added to the deployment.
endpoint: "http://grafana-agent.monitoring:14268/api/traces"
# -- Env. Var TRACING_SERVICE_NAME. If enabled is false, will not be added to the deployment.
serviceName: "odis-combiner-alfajores-k8s"
log:
# -- Env. Var LOG_FORMAT.
format: stackdriver
# -- Env. Var LOG_LEVEL.
level: trace
blockchain:
# -- Env. Var BLOCKCHAIN_PROVIDER.
blockchainProvider: "https://alfajores-forno.celo-testnet.org"
# -- Existing secret for Env. Var BLOCKCHAIN_API_KEY.
blockchainApiKeyExistingSecret: "odis-combiner-forno-key"
domain:
# -- Env. Var DOMAINS_API_ENABLED.
domainEnabled: true
# -- Env. Var DOMAIN_FULL_NODE_DELAY_MS
domainFullNodeDelayMs: "100"
# -- Env. Var DOMAIN_FULL_NODE_RETRY_COUNT
domainFullNodeRetryCount: "5"
# -- Env. Var DOMAIN_FULL_NODE_TIMEOUT_MS
domainFullNodeTimeoutMs: "1000"
# -- Env. Var DOMAIN_KEYS_CURRENT_VERSION
domainKeysCurrentVersion: "1"
# -- Env. Var DOMAIN_KEYS_VERSIONS
domainKeysVersions: '[{"keyVersion":1,"threshold":2,"polynomial":"0200000000000000f99af1c8fbcb0a15945ff0f23f0e93b86c101f48250c911b4ab4b15004723f93eea98c8ffd4e166535757b46c0522a0167a40224c88ba43c13685bf2f159e63394416cb41432b320e69e3e0810aa8fa1e1b0c7dcc948fc5742f2b8d752b65081f10d83821b4e2cf90b56cc4fc8c98dc00e5f24f2c5b53fa8ad7c2ebd3963c9223cf95209692d267a4f8084edfc0b5f01f7a31d82bf5421c544b6258749c691b79e6f36d9ba963ead6f25b9986b6bcb7d45b5edb33a616af630b4ce17bf552c81","pubKey":"+ZrxyPvLChWUX/DyPw6TuGwQH0glDJEbSrSxUARyP5PuqYyP/U4WZTV1e0bAUioBZ6QCJMiLpDwTaFvy8VnmM5RBbLQUMrMg5p4+CBCqj6HhsMfcyUj8V0LyuNdStlCB"},{"keyVersion":2,"threshold":2,"polynomial":"0200000000000000f99af1c8fbcb0a15945ff0f23f0e93b86c101f48250c911b4ab4b15004723f93eea98c8ffd4e166535757b46c0522a0167a40224c88ba43c13685bf2f159e63394416cb41432b320e69e3e0810aa8fa1e1b0c7dcc948fc5742f2b8d752b65081f10d83821b4e2cf90b56cc4fc8c98dc00e5f24f2c5b53fa8ad7c2ebd3963c9223cf95209692d267a4f8084edfc0b5f01f7a31d82bf5421c544b6258749c691b79e6f36d9ba963ead6f25b9986b6bcb7d45b5edb33a616af630b4ce17bf552c81","pubKey":"+ZrxyPvLChWUX/DyPw6TuGwQH0glDJEbSrSxUARyP5PuqYyP/U4WZTV1e0bAUioBZ6QCJMiLpDwTaFvy8VnmM5RBbLQUMrMg5p4+CBCqj6HhsMfcyUj8V0LyuNdStlCB"}]'
# -- Env. Var DOMAIN_ODIS_SERVICES_SIGNERS
domainOdisServicesSigners: '[{"url": "https://odis-alfajores-signer2.azurefd.net"},{"url": "https://odis-alfajores-signer3.azurefd.net"},{"url": "https://odis-alfajores-signer-1-b.azurefd.net"}]'
# -- Env. Var DOMAIN_ODIS_SERVICES_TIMEOUT_MILLISECONDS
domainOdisServicesTimeoutMillisecond: "5000"
# -- Env. Var DOMAIN_SERVICE_NAME
domainServiceName: "odis_combiner"
# -- Env. Var DOMAIN_SHOULD_AUTHENTICATE
domainShouldAuthenticate: true
# -- Env. Var DOMAIN_SHOULD_CHECK_QUOTA
domainShouldCheckQuota: false
pnp:
# -- Env. Var PHONE_NUMBER_PRIVACY_API_ENABLED.
pnpEnabled: true
# -- Env. Var PNP_FULL_NODE_DELAY_MS
pnpFullNodeDelayMs: "100"
# -- Env. Var PNP_FULL_NODE_RETRY_COUNT
pnpFullNodeRetryCount: "5"
# -- Env. Var PNP_FULL_NODE_TIMEOUT_MS
pnpFullNodeTimeoutMs: "1000"
# -- Env. Var PNP_KEYS_CURRENT_VERSION
pnpKeysCurrentVersion: "1"
# -- Env. Var PNP_KEYS_VERSIONS
pnpKeysVersions: '[{"keyVersion":1,"threshold":2,"polynomial":"0200000000000000ec5b161ac167995bd17cc0e9cf3f79369efac1fff5b0f68ad0e83dca207e3fc41b8e20bc155ebb3416a7b3d87364490169032189aa7380c47a0a464864fbe0c106e803197ae4959165e7067b95775cee2c74a78d7a67406764f342e5a4b99a003a510287524c9437b12ebb0bfdc7ea46078b807d1b665966961784bd71c4227c272b01c0fcd19c5b92226c1aac324b010abef36192e8ff3abb25686b3e6707bc747b129c32e572b5850db8446bd8f0af9a3fbf6b579793002b1b68528ca4ac00","pubKey":"kPoRxWdEdZ/Nd3uQnp3FJFs54zuiS+ksqvOm9x8vY6KHPG8jrfqysvIRU0wtqYsBKA7SoAsICMBv8C/Fb2ZpDOqhSqvr/sZbZoHmQfvbqrzbtDIPvUIrHgRS0ydJCMsA"},{"keyVersion":2,"threshold":2,"polynomial":"0200000000000000ec5b161ac167995bd17cc0e9cf3f79369efac1fff5b0f68ad0e83dca207e3fc41b8e20bc155ebb3416a7b3d87364490169032189aa7380c47a0a464864fbe0c106e803197ae4959165e7067b95775cee2c74a78d7a67406764f342e5a4b99a003a510287524c9437b12ebb0bfdc7ea46078b807d1b665966961784bd71c4227c272b01c0fcd19c5b92226c1aac324b010abef36192e8ff3abb25686b3e6707bc747b129c32e572b5850db8446bd8f0af9a3fbf6b579793002b1b68528ca4ac00","pubKey":"kPoRxWdEdZ/Nd3uQnp3FJFs54zuiS+ksqvOm9x8vY6KHPG8jrfqysvIRU0wtqYsBKA7SoAsICMBv8C/Fb2ZpDOqhSqvr/sZbZoHmQfvbqrzbtDIPvUIrHgRS0ydJCMsA"}]'
# -- Env. Var PNP_MOCK_DECK
pnpMockDeck: "0xbf8a2b73baf8402f8fe906ad3f42b560bf14b39f7df7797ece9e293d6f162188"
# -- Env. Var PNP_ODIS_SERVICES_SIGNERS
pnpOdisServicesSigners: '[{"url": "https://odis-alfajores-signer2.azurefd.net"},{"url": "https://odis-alfajores-signer3.azurefd.net"},{"url": "https://odis-alfajores-signer-1-b.azurefd.net"}]'
# -- Env. Var PNP_ODIS_SERVICES_TIMEOUT_MILLISECONDS
pnpOdisServicesTimeoutMilliseconds: "5000"
# -- Env. Var PNP_SERVICE_NAME
pnpServiceName: "odis_combiner"
# -- Env. Var PNP_SHOULD_AUTHENTICATE
pnpShouldAuthenticate: true
# -- Env. Var PNP_SHOULD_CHECK_QUOTA
pnpShouldCheckQuota: false
# -- Env. Var PNP_SHOULD_MOCK_ACCOUNT_SERVICE
pnpShouldMockAccountService: false
service:
# -- Env. Var SERVICE_NAME
serviceName: "odis-combiner-k8s"
podAnnotations:
prometheus.io/path: /metrics
prometheus.io/port: "8080"
prometheus.io/scrape: "true"
# -- Env. Var SERVICE_PORT
serverPort: 8081

# -- Custom pod annotations
podAnnotations: {}

# -- Custom pod security context
podSecurityContext: {}
# fsGroup: 2000

# -- Custom container security context
securityContext: {}
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000

ingress:
# -- Enable ingress resource
enabled: true
# -- Ingress class name
className: "nginx"
# -- Ingress annotations
annotations:
kubernetes.io/tls-acme: "true"
hosts:
# kubernetes.io/ingress.class: nginx
# -- Ingress hostnames
hosts:
- host: odis-combiner-alfajores.alfajores.celo-testnet.org
paths:
- path: /
pathType: ImplementationSpecific
# -- Ingress TLS configuration
tls:
- secretName: odis-combiner-alfajores.alfajores.celo-testnet.org-tls
hosts:
- odis-combiner-alfajores.alfajores.celo-testnet.org

# -- Liveness probe configuration
livenessProbe:
timeoutSeconds: 30
initialDelaySeconds: 60
httpGet:
path: /status
port: http

# -- Readiness probe configuration
readinessProbe:
timeoutSeconds: 30
initialDelaySeconds: 60
httpGet:
path: /status
port: http

# -- Container resources
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
# choice for the user. This also increases chances charts run on environments with little
# resources, such as Minikube. If you do want to specify resources, uncomment the following
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
# limits:
# cpu: 100m
# memory: 128Mi
# requests:
# cpu: 100m
# memory: 128Mi

autoscaling:
# -- Enable autoscaling
enabled: false
# -- Minimum replicas
minReplicas: 1
# -- Maximum replicas
maxReplicas: 3
# -- CPU target utilization
targetCPUUtilizationPercentage: 80
# targetMemoryUtilizationPercentage: 80

# -- Kubernetes node selector
nodeSelector: {}

# -- Kubernetes tolerations
tolerations: []

# -- Kubernetes pod affinity
affinity: {}
Loading

0 comments on commit 5da10a4

Please sign in to comment.