Skip to content

Commit

Permalink
Minor formatting updates
Browse files Browse the repository at this point in the history
  • Loading branch information
ipopescu committed Sep 6, 2023
1 parent 2ecbe4e commit c3cb373
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 51 deletions.
14 changes: 8 additions & 6 deletions source/docs/casper/operators/aws-nodes/2-connecting.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
---
title: Connect and Monitor
title: Validate and Monitor the Node
---

# Monitoring the Nodes
# Validating and Monitoring the Node

## 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.
This section describes how to validate the AWS setup and monitor the Casper node created using this infrastructure.

## Validating the AWS Instances

Expand Down Expand Up @@ -35,6 +33,10 @@ 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.

## Connecting to the Node Instance

At this point, it is necessary to consider how the infrastructure was applied, with or without a VPN. Once the node is up and running and the VPN connection is configured, if applicable, proceed to connecting to the node via SSH.
Expand Down Expand Up @@ -103,7 +105,7 @@ casper-node-launcher.service - Casper Node Launcher
Jun 03 16:42:44 ip-10-60-13-180 systemd[1]: Started Casper Node Launcher.
```

## Monitoring the System
## Monitoring the Node

To monitor the node and retrieve metrics such as CPU, Memory, Disk, Era, and Block Height, among others, operators have a few options.

Expand Down
90 changes: 45 additions & 45 deletions source/docs/casper/operators/aws-nodes/3-modules.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
---
title: AWS Modules
title: Implemented Modules
---

# AWS Modules
# Implemented Modules

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 |
| ---- | ---- |
| CloudWatch Dashboard | Customized views of metrics and alarms for AWS resources. |
| CloudWatch Alarms | Sends a message or performs an action when the alarm changes state. |
| 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. |
| AWS Services Used | Description |
| -------------------- | ------------------------------------------------------------------- |
| CloudWatch Dashboard | Customized views of metrics and alarms for AWS resources. |
| CloudWatch Alarms | Sends a message or performs an action when the alarm changes state. |
| 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 the logs are not described below. -->

### CloudWatch Dashboard
Expand All @@ -31,10 +31,10 @@ The IaC creates a dashboard to monitor all related resources. The dashboard incl

The following table shows the alarms created by the module and their respective configuration:

| Alarm | Description |
| ----- | ----------- |
| CPU Alarm | CPU Alarm activates when usage is above 70%. |
| RAM Alarm | RAM Alarm activates when usage is above 80%. |
| Alarm | Description |
| ---------- | --------------------------------------------- |
| CPU Alarm | CPU Alarm activates when usage is above 70%. |
| RAM Alarm | RAM Alarm activates when usage is above 80%. |
| DISK Alarm | DISK Alarm activates when usage is above 90%. |

**Sample alarms:**
Expand Down Expand Up @@ -67,24 +67,24 @@ This is an example of the output when the canary detects whether the service is

A Log Group module for the **synthetic canary service** stores all logs derived from the canary tests as follows:

| Name| Description |
| --- | --- |
| casper-node.log | Casper Service logs. |
| casper-node.stderr.log | Casper Service error logs. |
| Name | Description |
| ---------------------- | ------------------------ |
| casper-node.log | Casper Service logs. |
| casper-node.stderr.log | Casper Service error logs.|

### CloudWatch Agent

A CloudWatch Agent obtains the following metrics every 30 seconds:

| Metrics | Description |
| ------- | ----------- |
| casper-node logs | casper service logs |
| Metrics | Description |
| ---------------------- | ------------------------- |
| casper-node logs | casper service logs |
| casper-node error logs | casper service error logs |
| disk_total | disk total capacity |
| disk_used | disk usage in GB |
| disk_percent | disk usage in percentage |
| mem_used | RAM usage in GB |
| mem_used_percent | RAM usage in percentage |
| disk_total | disk total capacity |
| disk_used | disk usage in GB |
| disk_percent | disk usage in percentage |
| mem_used | RAM usage in GB |
| mem_used_percent | RAM usage in percentage |

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

Expand All @@ -110,14 +110,14 @@ An Auto-Scaling Group (ASG) is used for an automatic deployment if the node shut

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 |
| 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 |

### Available Ports

Expand Down Expand Up @@ -150,13 +150,13 @@ This is the workflow of creating the EC2 instance for a Casper node in AWS:

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.

| File | Description |
| ---- | ----------- |
| files/genCustomMetrics.sh | Bash file containing the configuration to get casper-node metrics from the Grafana dashboard and place them in the dashboard.sh file for the CloudWatch Dashboard.|
| files/genSnapshot.sh | Bash file containing the configuration to create a snapshot volume in EBS, with a cronjob performing weekly backups. |
| files/genVolumenID.sh | Bash file to create a volume based on the snapshot of a previous volume, given its ID; if the snapshot does not exist, the script will create a completely new volume. |
| 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. |
| File | Description |
| ------------------------- | ----------- |
| files/genCustomMetrics.sh | Bash file containing the configuration to get casper-node metrics from the Grafana dashboard and place them in the dashboard.sh file for the CloudWatch Dashboard. |
| files/genSnapshot.sh | Bash file containing the configuration to create a snapshot volume in EBS, with a cronjob performing weekly backups. |
| files/genVolumenID.sh | Bash file to create a volume based on the snapshot of a previous volume, given its ID; if the snapshot does not exist, the script will create a completely new volume. |
| 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

Expand All @@ -167,9 +167,9 @@ The Key Pairs module generates a `.pem` file for creating and connecting to the
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.

| OpenVPN Status | Ingress Rule |
| -- | -- |
| Created | SSH will only be available when connected to the VPN Server. |
| Discarded | SSH will be available to the IPs the operator listed. |
| -------------- | ------------ |
| 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

Expand Down Expand Up @@ -206,8 +206,8 @@ The Elastic IP (EIP) module creates the public IP for the Casper node.

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

| Services | Description |
| -------- | ----------- |
| Services | Description |
| -------------- | ----------- |
| Amazon VPC | A virtual private cloud within the AWS Cloud. |
| Public subnets | Range of IP addresses in 3 availability zones. |
| Route tables | Tables controlling where network traffic is directed. |
Expand Down

0 comments on commit c3cb373

Please sign in to comment.