Skip to content

Commit

Permalink
Move EC2 instances to a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
ipopescu committed Sep 18, 2023
1 parent da793e6 commit af481c9
Show file tree
Hide file tree
Showing 8 changed files with 51 additions and 6 deletions.
1 change: 1 addition & 0 deletions config/sidebar.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,7 @@ module.exports = {
items: [
"operators/aws-nodes/deploying",
"operators/aws-nodes/validating",
"operators/aws-nodes/instances",
"operators/aws-nodes/modules",
"operators/aws-nodes/backup",
"operators/aws-nodes/open-vpn",
Expand Down
2 changes: 1 addition & 1 deletion source/docs/casper/operators/aws-nodes/2-validating.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ aws --profile $aws_profile ec2 describe-instances --region $aws_region --filters

## VPN Configuration

If operators desire a VPN, it is essential to establish one that guarantees the confidentiality and integrity of the information in transit. For this purpose, [this guide](./5-open-vpn.md) recommends the creation of an OpenVPN server within the IaC.
If operators desire a VPN, it is essential to establish one that guarantees the confidentiality and integrity of the information in transit. For this purpose, [this guide](./6-open-vpn.md) recommends the creation of an OpenVPN server within the IaC.

## Connecting to the Node Instance

Expand Down
43 changes: 43 additions & 0 deletions source/docs/casper/operators/aws-nodes/3-instances.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
title: EC2 Instance
---

# EC2 Instance Requirements

The following requirements describe the optimal EC2 Instance for running a Casper node.

| Requirements | Description |
| ------------ | ---------------------|
| O.S. | Ubuntu 20.04 LTS |
| RAM | 32 GB |
| Disk Space | 2 TB |
| CPU Cores | 8 |
| AMI | ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20211129 |
| AMI_Type | t3.2xlarge |

## EC2 Instance Ports

The following ports are open to run the Casper service successfully:

| PORT | Description |
| ----- | ----------------------------------------------------------------------------------------------------------- |
| 22 | SSH connectivity |
| 3000 | Grafana dashboard |
| 7777 | RPC endpoint for interaction with the node's JSON-RPC API |
| 8888 | REST endpoint for status and metrics. Having this accessible allows the node to be part of the network status|
| 9999 | SSE endpoint for the event stream |
| 35000 | Required to be part of the network |

## EC2 Instance Configuration

The `casper-node-install-configure.sh.tftpl` is a template that converts to a bash file when Terragrunt runs. It contains all the installation and configuration commands the `casper-service` and monitoring services (e.g., CloudWatch Agent and Grafana) need. This bash file calls other bash files to finish the configuration for backup and CloudWatch.

To see more configuration files, go to the config module. You will see a detailed explanation of the other configuration files referenced inside the code of the `casper-node-install-configure.sh.tftpl` file. This file needs to be separated because there is a character limit for script templates in AWS.

## EC2 Instance Creation

This is the workflow of creating the EC2 instance for a Casper node in AWS:

<p align="center">
<img src={"/image/operators/instance-creation.png"} alt="EC2 Creation Workflow"/>
</p>
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ The Security Group Rules module detects whether the node operator wants the `Ope

## OpenVPN Server Module

The OpenVPN Service provides the administrators a private and secure connection to the node. This simple VPN is available for five administrators. To configure the VPN server, read the [OpenVPN guide](./5-open-vpn.md).
The OpenVPN Service provides the administrators a private and secure connection to the node. This simple VPN is available for five administrators. To configure the VPN server, read the [OpenVPN guide](./6-open-vpn.md).

### Ports

Expand Down
9 changes: 5 additions & 4 deletions source/docs/casper/operators/aws-nodes/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ The purpose of this architecture is to maintain the integrity and security of th
| --------------------------------------------------------- | --------------------------------------------------- |
| [Deploy the Infrastructure](./1-deploying.md) | How to deploy the infrastructure in AWS. |
| [Validate and Monitor the Node](./2-validating.md) | Validate the AWS setup and monitor the Casper node. |
| [Implemented Modules](./3-modules.md) | Details about the modules implemented in this IaC. |
| [Restore and Backup](./4-backup.md) | Restoring and Backing up Blockchain Data. |
| [Setup OpenVPN](./5-open-vpn.md) | Configure the Open VPN Server. |
| [Troubleshooting](./6-troubleshooting.md) | Troubleshooting Tips for Operators. |
| [EC2 Instances](./3-instances.md) | Optimal EC2 Instance for running a Casper node. |
| [Implemented Modules](./4-modules.md) | Details about the modules implemented in this IaC. |
| [Restore and Backup](./5-backup.md) | Restoring and Backing up Blockchain Data. |
| [Setup OpenVPN](./6-open-vpn.md) | Configure the Open VPN Server. |
| [Troubleshooting](./7-troubleshooting.md) | Troubleshooting Tips for Operators. |

0 comments on commit af481c9

Please sign in to comment.