RPC Node Deployment Pipeline from PrimeLab!
Quickly scale up RPC Node deployments via Terraform
Contributors:
PrimeLab Core Tools
PrimeLab Blockchain Team
GitHub: RPC-Deployer
PrimeLab is excited to release the first iteration of our automated RPC Node Utility for NEAR Protocol! This utility enables developers and NEAR project stakeholders to quickly deploy and manage their own RPC node on the NEAR Mainnet!
Why (is this needed)
- Many projects in the NEAR Ecosystem require their own RPC nodes. The options currently available are not automated and require repetitive & laborious tasks to deploy and maintain.
Who (would this benefit)
- DAPP Developers
- Network Metric Aggregators
- SAAS Providers
- Any project in the NEAR Ecosystem.
How (does this achieve a solution):
- The RPC Deployment Utility allows engineers to worry less about bottlenecks and focus more on the applications theyβre building.
Tech:
- The RPC Node utility uses Terraform, Packer, and Ansible to orchestrate the configuration and deployment of the RPC Node.
Getting Started
GitHub: NEAR-RPC-Deployer
Prerequisites
- AWS Knowledge
- AWS CLI
- Terraform CLI
File Tree
βββ autoscaling.tf
βββ data.tf
βββ Dockerfile
βββ ecr.tf
βββ ecs_service.tf
βββ ecs_task_definition..tf
βββ ecs.tf
βββ elb.tf
βββ endpoints.tf
βββ iam.tf
βββ key_pair.tf
βββ launch_templates.tf
βββ main.tf
βββ outputs.tf
βββ params
β βββ us-east-1
β βββ dev
β βββ backend.config
β βββ variables.tfvars
βββ provider.tf
βββ r53.tf
βββ README.md
βββ secrets_manager.tf
βββ security_groups.tf
βββ task-definitions
β βββ rpc_node.json
βββ tls_private_key.tf
βββ userdata
β βββ ecs_user_data.sh // Includes the `ECS_CLUSTER` variable definition in `/etc/ecs/ecs.config`
βββ variables.tf // Defines the shared variables used in the service
βββ vpc.tf // Defines the network settings
Setup
-
Fork the repo located here.
-
Clone the repo by using the following command
git clone git@github.com:(your_github_username)/rpc-near.git
-
Modify the following files:
a.params/us-east-1/dev/variables.tfvars
b.params/us-east-1/dev/backend.config
-
Run the following commands in your shell to deploy the Terraform service
terraform init -var-file="./params/us-east-1/dev/variables.tfvars" -backend-config="./params/us-east-1/dev/backend.config && \ terraform plan -var-file="./params/us-east-1/dev/variables.tfvars" && \ terraform apply -var-file="./params/us-east-1/dev/variables.tfvars"