Skip to content

This repository explains how to install the issuer node on gcloud

Notifications You must be signed in to change notification settings

wakeuplabs-io/opid-issuer-gcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Overview

Optimism ID issuer refers to the entity responsible for issuing unique identifiers, known as Optimism IDs, on the Optimism network. The Optimism network is a popular Layer 2 scaling solution for Ethereum, designed to improve scalability and reduce transaction costs.

Architecture

Architecture diagram

Installation

Command line instructions

You can use Google Cloud Shell or a local workstation to complete the following steps.

Prerequisites

Set up command-line tools

Make sure you have these tools installed.

Configure gcloud as a Docker credential helper:

gcloud auth configure-docker

Create a Google Kubernetes Engine cluster

If you have an existing GKE cluster you can use that otherwise you can create a new cluster from the command line.

export CLUSTER=YOUR_CLUSTER_NAME
export PROJECT=YOUR_PROJECT_ID
export REGION=YOUR_REGION
export ZONE=YOUR_ZONE

gcloud container clusters create $CLUSTER --region=$REGION --project $PROJECT

Configure kubectl to connect to the new cluster.

gcloud container clusters get-credentials $CLUSTER --region=$REGION --project $PROJECT

For zonal clusters, use --zone=ZONE instead of --region=REGION.

Request a static ip

gcloud compute addresses create ip-name --global
gcloud compute addresses describe ip-name --global

# ...
# address: 203.0.113.32
# ...

Install application resource definition

kubectl apply -f "https://raw.githubusercontent.com/GoogleCloudPlatform/marketplace-k8s-app-tools/master/crd/app-crd.yaml"

Add kubernetes service account

Service account name is ${APP_INSTANCE_NAME}-default-service-account

kubectl create serviceaccount --namespace default issuer-default-service-account 

Enable workload identity on cluster

If you want to do it through CLI, go ahead and follow this link Through UI, under the cluster details tab, there should be a section which says Wokload Identity, it should be enabled.

Enable GKE Metadata Server on the node pool

Once Workload Identity is enabled, under the cluster nodes tab, go into the node pool details and edit the node pool.

Under the security section, the option Enable GKE Metadata Server should be enabled.

Configure the app with environment variables

Create ./scripts/secrets.sh

export APP_INSTANCE_NAME=issuer
export NAMESPACE=default
export MAINNET=false
export RPC_URL="https://opt-sepolia.g.alchemy.com/v2/..."
export UI_USERNAME=user
export UI_PASSWORD=password
export API_UI_USERNAME=user
export API_UI_PASSWORD=password
export API_USERNAME=user    
export API_PASSWORD=password
export STATIC_IP_NAME="opid"
export APP_HOST=app.34.54.152.126.nip.io  
export UI_HOST=ui.34.54.152.126.nip.io    
export API_HOST=api.34.54.152.126.nip.io  
export ISSUER_NAME="OPID Issuer"
export PRIVATE_KEY="5a814bcdce..."
export VAULT_PASSWORD=password
export RHS_MODE=OnChain
export RHS_URL="..."

Install the helm chart

First ensure your kubectl context is pointing to the right project, then run:

chmod +x ./scripts/install.sh
chmod +x ./scripts/uninstall.sh
chmod +x ./scripts/upgrade.sh

# install
./scripts/install.sh

# uninstall
./scripts/uninstall.sh

# upgrade
./scripts/upgrade.sh

About

This repository explains how to install the issuer node on gcloud

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published