https://github.com/tty47/polkadot_node
Polkadot Run a Validator
https://github.com/tty47/polkadot_node
Last synced: about 1 month ago
JSON representation
Polkadot Run a Validator
- Host: GitHub
- URL: https://github.com/tty47/polkadot_node
- Owner: tty47
- Created: 2023-09-03T08:39:02.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-09-03T08:45:58.000Z (over 1 year ago)
- Last Synced: 2025-02-14T10:43:46.186Z (3 months ago)
- Language: HCL
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Polkadot Node

---
## Overview
This Terraform module simplifies the deployment of AWS EC2 instances and the configuration of Ansible, allowing you to automate infrastructure provisioning effortlessly.
---
## Features
- **AWS EC2 Instance Creation**: Easily create AWS EC2 instances to suit your workload requirements.
- **Ansible Configuration**: Configure Ansible on EC2 instances for efficient automation.
- **Customization**: Customize instance counts, types, and security groups to meet your infrastructure needs.
- **Ansible Playbooks**: Specify source and destination paths for Ansible playbooks.---
## Usage
To use this Terraform module, include it in your Terraform configuration and specify the required variables. Here's an example:
```hcl
module "ec2_instances" {
source = "./ec2_instance"
instance_count = 2
instance_type = "m4.2xlarge"
instance_name = "polkadot-node"
security_group_name = "Allow access to instance"
key_name = "private_key"
ami_id = "ami-04e601abe3e1a910f" # Ubuntu
private_key_path = "/tmp/private_key.pem"
ansible_src_path = "ansible"
ansible_dst_path = "/home/ubuntu/ansible"
}
```## How to run?
The easiest way is to use the Makefile commands:
```Makefile
# Create the resources
make apply_auto# Destroy the resources
make destroy_auto
```---
## Outputs
- **private_key_content**: The content of the private key.
- **public_ip_addresses**: The public IP addresses of the EC2 instances.---
## References
- [Reference HW](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#reference-hardware)
- [Installing The Binary](https://wiki.polkadot.network/docs/maintain-guides-how-to-validate-polkadot#installing-the-polkadot-binary)---
## TODOs
- [ ] Automatic Updates
- Generate the dynamic inventory with Terraform to allow Ansible access to the instances
- Keep the private keys, and use them from Ansible
- Update the `ansible/vars.yaml` the `polkadot.version` variable to the latest version.
- Run the Ansible command to update the binary to all the instances defined in the inventory.
- [ ] Update the user who runs the binary (non-root)
- [ ] Split the file system in different EBS (volumes), to have inmutable infrastructure.---
Jose Ramon Mañes