Deploying a Node
The preferred method for deploying a node is using the Pulumi deployment scripts, which will generate the necessary scalable GCP infrastructure to run a Representative Node. The configuration options can be used to control the components that Pulumi deploys.
Install Prerequisites
Login is not required, and the deployment process can leverage multiple backends (eg, Google Cloud Bucket or Pulumi Hosted). If you choose to store the stack in a cloud environment, then log in to the preferred provider.
Google Cloud CLI https://cloud.google.com/sdk/docs/install
Node JS Version 20.18.0
If using macOS then the following are require prerequisites to compile from source and can be installed with brew
jq, coreutils, python
Clone the Node Repository
git clone [email protected]:KeetaNetwork/node.git keeta-node
cd keeta-node/deployment
Initialize Pulumi Stack
The deployment is designed to work with a KMS to manage encrypting secrets, such as the SEED used by the Representative for voting and other sensitive data. Here we initialize the Pulumi stack with a KMS. <name>
should match the name of the configuration file created in the previous step, and the GCPKMS URL should match a KMS created in your GCP Project.
pulumi stack init <name> --secrets-provider="gcpkms://projects/<p>/locations/<l>/keyRings/<r>/cryptoKeys/<k>"
Add Encrypted Representative SEED
Encrypted variables can be added to the Pulumi configuration as secrets, encrypted with the KMS provided earlier. In this case, KEETANET_LAMBDA_SEED
is the environment variable the node uses along with the index of the Representative from Regions
in the configuration to compute the private key used for Voting by the Representative. The SEED should be a 32-character hex string. For example, using openssl, a seed could be generated with openssl rand -hex 32
pulumi config --stack <name> set --secret keetanet-cloud-deploy:KEETANET_LAMBDA_SEED
Last updated