Skip to content

Commit

Permalink
Updated titles in modules
Browse files Browse the repository at this point in the history
  • Loading branch information
ipopescu committed Sep 5, 2023
1 parent 0fb2fdf commit 49b0de1
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions source/docs/casper/operators/aws-nodes/3-modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ title: AWS Modules

# AWS Modules

This section describes AWS modules helpful for monitoring the node's status and health. AWS provides various services to help operators monitor the node and Casper service status by creating alarms and having a visual representation in a dashboard, thus presenting the node's resources and capacity in real time.
This section describes AWS modules helpful for running and monitoring the node.

## Monitoring Modules

This section describes all the modules related to monitoring the node. AWS provides various services to help operators monitor the node and Casper service status by creating alarms and having a visual representation in a dashboard, thus presenting the node's resources and capacity in real time.

| AWS Services Used | Description |
| ---- | ---- |
Expand All @@ -13,11 +17,7 @@ This section describes AWS modules helpful for monitoring the node's status and
| CloudWatch Synthetics | Canaries as scripts to monitor endpoints and APIs. |
| CloudWatch Agent | Collects metrics, logs, and traces from Amazon EC2 instances. |
| CloudWatch Logs | Centralized logs from all systems, applications, and AWS services. |
<!-- TODO this list doesn't seem complete given the rest of the content. -->

## Monitoring Modules

This section describes all the modules related to monitoring the node.
<!-- TODO the logs are not described below. -->

### CloudWatch Dashboard

Expand Down Expand Up @@ -88,25 +88,25 @@ A CloudWatch Agent obtains the following metrics every 30 seconds:

<!-- TODO figure out how to introduce non-monitoring modules -->

### S3 Bucket Modules
## S3 Bucket Modules

The following modules create S3 bucket resources on AWS.

#### S3 Canary
### S3 Canary

An S3 canary module creates an S3 bucket to store all the logs generated by the [synthetic canary service](#CloudWatch-Synthetics). The `alerting/iam_canary_s3` module calls this module.

#### S3 Config
### S3 Config

The S3 config module creates an S3 bucket for storing additional configuration files such as `zip`,`.json`, or `.sh`.

### Auto-Scaling Module
## Auto-Scaling Module

An Auto-Scaling Group (ASG) is used for an automatic deployment if the node shuts down. The ASG contains a launch template with all the configurations needed to automatically set up the `casper-launcher` when the EC2 instance starts running. Also, the ASG is available in 3 public subnets for better support.

<!-- TODO move this to a new file? -->

### EC2 Instance Requirements
## EC2 Instance Requirements

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

Expand All @@ -119,7 +119,7 @@ The following requirements describe the optimal EC2 Instance for running a Caspe
| AMI | ubuntu/images/hvm-ssd/ubuntu-focal-20.04-amd64-server-20211129 |
| AMI_Type| t3.2xlarge |

#### Available Ports
### Available Ports

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

Expand All @@ -132,21 +132,21 @@ The following ports are open to run the Casper service successfully:
| 9999 | SSE endpoint for the event stream |
| 35000 | Required to be part of the network |

#### Configuration Files
### Configuration Files

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
### 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/ASGWorkflow.png"} alt="EC2 Workflow" width="600"/>
<img src={"/image/operators/ASGWorkflow.png"} alt="EC2 Workflow"/>
</p>

#### Configuration Bucket Module
## Configuration Bucket Module

Terragrunt creates an S3 bucket and uploads all the configuration files needed to set up all the required services inside the node, including the Casper service and other services used for monitoring, backing up, and restoring the node. Below is a detailed description of each configuration file.

Expand All @@ -158,11 +158,11 @@ Terragrunt creates an S3 bucket and uploads all the configuration files needed t
| files/dashboard.json | Dashboard template to generate and watch node metrics. |
| files/deleteSm.sh | NOT IN USE. Deletes the Casper secret keys from the AWS Secrets Manager. |

### Key Pairs Module
## Key Pairs Module

The Key Pairs module generates a `.pem` file for creating and connecting to the `OpenVPN` and `casper-node` instances.

### Security Group Rules Module
## Security Group Rules Module

The Security Group Rules module detects whether the node operator wants the `OpenVPN` instance and creates a customized SSH `Ingress-Rule` for the `casper-node` instance.

Expand All @@ -171,11 +171,11 @@ The Security Group Rules module detects whether the node operator wants the `Ope
| Created | SSH will only be available when connected to the VPN Server. |
| Discarded | SSH will be available to the IPs the operator listed. |

### OpenVPN Server Module
## 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).

#### Ports
### Ports

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

Expand All @@ -184,25 +184,25 @@ The following ports are open to run the Casper service successfully:
| 22 | For SSH connections to the node |
| 80 | For retrieving dashboard metrics |

### Data Modules
## Data Modules

#### Dashboard Template Module
### Dashboard Template Module

The template module `alerting/cloudwatch` creates and configures the CloudWatch dashboard.

#### CloudWatch Canary Code Template Module
### CloudWatch Canary Code Template Module

The CloudWatch canary code template module, `Template_CW_CF`, uses the `cw_agent_config.json` template file to add and configure the `cw_namespace` and `aws_region` variables provided in the root file `terragrunt.hcl`.

#### ZIP Creation Module
### ZIP Creation Module

The ZIP template module creates the ZIP file necessary for the [synthetic canary service](#CloudWatch-Synthetics) to monitor the `casper-node-launcher` on port `8888`.

### Elastic IP Module
## Elastic IP Module

The Elastic IP (EIP) module creates the public IP for the Casper node.

### VPC Module
## VPC Module

The VPC module creates the networking layer where the Casper read-only node will run. This module configures the following services:

Expand Down

0 comments on commit 49b0de1

Please sign in to comment.