You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/setup-cloud9.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,14 @@
1
+
# AWS CloudShell
2
+
3
+
To begin, ensure you login to your AWS account with permissions to create and modify resources in IAM, EC2, EBS, VPC, S3, KMS, and Secrets Manager.
4
+
5
+
From the AWS Management Console, open the [AWS CloudShell](https://docs.aws.amazon.com/cloudshell/latest/userguide/welcome.html), a web-based shell environment. If unfamiliar, review the [2-minute YouTube video](https://youtu.be/fz4rbjRaiQM) for an overview and check out [CloudShell with VPC environment](https://docs.aws.amazon.com/cloudshell/latest/userguide/creating-vpc-environment.html) that we'll use to test nodes API from internal IP address space.
6
+
7
+
Once ready, you can execute the commands to deploy and test blueprints in the CloudShell.
8
+
9
+
***
10
+
# AWS Cloud 9 IS NO LONGER USED (the instructions below will be removed soon, use AWS CloudShell instead)
11
+
***
1
12
# AWS Cloud9 Setup
2
13
3
14
Most steps in this repository will need to be performed from a Linux command prompt. An especially convenient way of doing this is to use AWS Cloud9, a cloud-based Integrated Development Environment (IDE). Cloud9 allows you to edit source files and execute commands from an easy-to-use web interface. It comes pre-configured with many of the tools needed for software development, and because it runs in the AWS Cloud, it can be an especially easy way to access other cloud services. One other handy feature is that your Cloud9 instances automatically stop running after a configurable period of inactivity, which helps reduce costs.
@@ -74,16 +74,20 @@ This is the Well-Architected checklist for Ethereum nodes implementation of the
74
74
75
75
## Setup Instructions
76
76
77
-
### Setup Cloud9
77
+
### Open AWS CloudShell
78
78
79
-
We will use AWS Cloud9 to execute the subsequent commands. Follow the instructions in [Cloud9 Setup](../../docs/setup-cloud9.md)
79
+
To begin, ensure you login to your AWS account with permissions to create and modify resources in IAM, EC2, EBS, VPC, S3, KMS, and Secrets Manager.
80
+
81
+
From the AWS Management Console, open the [AWS CloudShell](https://docs.aws.amazon.com/cloudshell/latest/userguide/welcome.html), a web-based shell environment. If unfamiliar, review the [2-minute YouTube video](https://youtu.be/fz4rbjRaiQM) for an overview and check out [CloudShell with VPC environment](https://docs.aws.amazon.com/cloudshell/latest/userguide/creating-vpc-environment.html) that we'll use to test nodes API from internal IP address space.
82
+
83
+
Once ready, you can run the commands to deploy and test blueprints in the CloudShell.
80
84
81
85
### Clone this repository and install dependencies
@@ -92,69 +96,66 @@ We will use AWS Cloud9 to execute the subsequent commands. Follow the instructio
92
96
93
97
2. If you have deleted or don't have the default VPC, create default VPC
94
98
95
-
```bash
96
-
aws ec2 create-default-vpc
97
-
```
99
+
```bash
100
+
aws ec2 create-default-vpc
101
+
```
98
102
99
-
> NOTE:
100
-
> You may see the following error if the default VPC already exists: `An error occurred (DefaultVpcAlreadyExists) when calling the CreateDefaultVpc operation: A Default VPC already exists forthis accountin this region.`. That means you can just continue with the following steps.
103
+
> **NOTE:***You may see the following error if the default VPC already exists: `An error occurred (DefaultVpcAlreadyExists) when calling the CreateDefaultVpc operation: A Default VPC already exists for this account in this region.`. That means you can just continue with the following steps.*
101
104
102
105
3. Configure your setup
103
106
104
107
Create your own copy of `.env` file and edit it to update with your AWS Account ID and Region:
105
-
```bash
106
-
# Make sure you are in aws-blockchain-node-runners/lib/scroll
107
-
cd lib/scroll
108
-
npm install
109
-
pwd
110
-
cp ./sample-configs/.env-sample-full .env
111
-
nano .env
112
-
```
113
-
> NOTE:
114
-
> Example configuration parameters are setin the local`.env-sample` file. You can find more examples inside `sample-configs` directory.
108
+
```bash
109
+
# Make sure you are in aws-blockchain-node-runners/lib/scroll
110
+
cd lib/scroll
111
+
npm install
112
+
pwd
113
+
cp ./sample-configs/.env-sample-full .env
114
+
nano .env
115
+
```
116
+
> **NOTE:***Example configuration parameters are set in the local `.env-sample` file. You can find more examples inside `sample-configs` directory.*
115
117
116
118
4. Deploy common components such as IAM role
117
119
118
-
```bash
119
-
pwd
120
-
# Make sure you are in aws-blockchain-node-runners/lib/scroll
121
-
npx cdk deploy scroll-common
122
-
```
120
+
```bash
121
+
pwd
122
+
# Make sure you are in aws-blockchain-node-runners/lib/scroll
123
+
npx cdk deploy scroll-common
124
+
```
123
125
124
-
> IMPORTANT:
125
-
> All AWS CDK v2 deployments use dedicated AWS resources to hold data during deployment. Therefore, your AWS account and Region must be [bootstrapped](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html) to create these resources before you can deploy. If you haven't already bootstrapped, issue the following command:
126
-
> ```bash
127
-
> cdk bootstrap aws://ACCOUNT-NUMBER/REGION
128
-
> ```
126
+
> **IMPORTANT:***All AWS CDK v2 deployments use dedicated AWS resources to hold data during deployment. Therefore, your AWS account and Region must be [bootstrapped](https://docs.aws.amazon.com/cdk/v2/guide/bootstrapping.html) to create these resources before you can deploy. If you haven't already bootstrapped, issue the following command:*
127
+
> ```bash
128
+
> cdk bootstrap aws://ACCOUNT-NUMBER/REGION
129
+
>```
129
130
130
131
5. Deploy Amazon Managed Blockchain (AMB) Access Ethereum node and wait about 35-70 minutes for the node to sync
131
132
132
-
```bash
133
-
pwd
134
-
# Make sure you are in aws-blockchain-node-runners/lib/scroll
To watch the progress, open the [AMB Web UI](https://console.aws.amazon.com/managedblockchain/home), click the name of your target network from the list (Mainnet, Goerly, etc.) and watch the status of the node to change from `Creating` to `Available`.
138
139
139
140
6. Deploy Scroll Full Node and wait for another 10-20 minutes for it to sync
140
141
141
-
```bash
142
-
pwd
143
-
# Make sure you are in aws-blockchain-node-runners/lib/scroll
After starting the node you will need to wait for the initial synchronization process to finish.To see the progress, you may use SSM to connect into EC2 first and watch the log like this:
curl -s -X POST -H "Content-Type: application/json" --data '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}' http://localhost:8545
180
+
```
179
181
180
182
### Monitoring
181
183
A script on the Scroll node publishes current block and blocks behind metrics to CloudWatch metrics every 5 minutes. When the node is fully synced the blocks behind metric should get to 0, which might take about 1.5 days. To see the metrics:
@@ -185,83 +187,81 @@ A script on the Scroll node publishes current block and blocks behind metrics to
185
187
186
188
## Clear up and undeploy everything
187
189
188
-
1. Undeploy all Nodes and Common stacks
190
+
Destroy all Nodes and Common stacks
189
191
190
-
```bash
191
-
# Setting the AWS account id and region in case local .env file is lost
# Make sure you are in aws-blockchain-node-runners/lib/scroll
200
199
201
-
# Undeploy AMB Etheruem node
202
-
npx cdk destroy scroll-ethereum-l1-node
200
+
# Destroy Single Node
201
+
npx cdk destroy scroll-single-node
203
202
204
-
# Delete all common components like IAM role and Security Group
205
-
npx cdk destroy scroll-common
206
-
```
203
+
# Destroy AMB Etheruem node
204
+
npx cdk destroy scroll-ethereum-l1-node
207
205
208
-
2. Follow steps to delete the Cloud9 instance in [Cloud9 Setup](../../doc/setup-cloud9.md)
206
+
# Delete all common components like IAM role and Security Group
207
+
npx cdk destroy scroll-common
208
+
```
209
209
210
210
## FAQ
211
211
212
212
1. How to check the logs of the clients running on my Scroll node?
213
213
214
-
**Note:** In this tutorial we chose not to use SSH and use Session Manager instead. That allows you to log all sessions in AWS CloudTrail to see who logged into the server and when. If you receive an error similar to `SessionManagerPlugin is not found`, [install Session Manager plugin for AWS CLI](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)
215
-
216
-
```bash
217
-
pwd
218
-
# Make sure you are in aws-blockchain-node-runners/lib/scroll
214
+
> **NOTE:***In this tutorial we chose not to use SSH and use Session Manager instead. That allows you to log all sessions in AWS CloudTrail to see who logged into the server and when. If you receive an error similar to `SessionManagerPlugin is not found`, [install Session Manager plugin for AWS CLI](https://docs.aws.amazon.com/systems-manager/latest/userguide/session-manager-working-with-install-plugin.html)*
0 commit comments