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
[Allora](https://www.allora.network/) is a self-improving decentralized Artificial Intelligence (AI) network. The primary goal of the network is to be the marketplace for intelligence. In other words, Allora aims to incentivize data scientists (workers) to provide high-quality inferences as requested by consumers. Inferences include predictions of arbitrary future events or difficult computations requiring specialized knowledge.
8
8
9
-
The Allora Network brings together
9
+
The Allora Network brings together:
10
10
11
11
-[Consumers](https://docs.allora.network/devs) who pay for and acquire inferences or expertise to be revealed
12
12
-[Workers](https://v2.docs.allora.network/datasci) who reveal inferences
@@ -17,65 +17,110 @@ With these ingredients, the Allora Network is able to continuously learn and imp
17
17
18
18
Allora Worker nodes are the interfaces between data scientists' models and the Allora Network. A worker node is a machine-intelligent application registered on the Allora chain that provides inference/prediction on a particular topic it's subscribed to and gets rewarded based on the inference quality.
19
19
20
-
This blueprint is designed to assist in deploying a single Allora [Worker Node](https://v2.docs.allora.network/datasci) on AWS. It is intended for use in development, testing, or Proof of Concept (PoC) purposes.
20
+
This blueprint is designed to assist in deploying a single Allora [Worker Node](https://v2.docs.allora.network/datasci) on AWS. It is intended for use in development, testing, or Proof of Concept (PoC) environments.
1. The Allora worker node is deployed in the Default VPC. An Internet Gateway.
28
-
2. The Woeker is used by dApps or development tools internally from within the Default VPC. JSON RPC API is not exposed to the Internet directly to protect nodes from unauthorized access.
29
-
3. The Allora Worker Node uses all required secrets locally. Optionally, AWS Secrets Manager as secure backup.
30
-
The Stacks node sends various monitoring metrics for both EC2 and Stacks nodes to Amazon CloudWatch.
27
+
The AWS Cloud Development Kit (CDK) is used to deploy a single Allora Worker Node. The CDK application deploys the following infrastructure:
28
+
29
+
- Virtual Private Cloud (VPC)
30
+
- Internet Gateway (IGW) to allow inbound requests for inferences from consumers and outbound responses from the worker node revealing inferences
31
+
- Public subnet that has a direct route to the IGW
32
+
- Security Group (SG) with TCP Port 9010 open inbound allowing requests for inferences to be routed to the Allora Worker Node
33
+
- Single Amazon Elastic Compute Cloud (EC2) instance (the Allora Worker Node) assigned to the public subnet
34
+
- Elastic IP Address (EIP) associated with the EC2 instance to maintain consistent IP addressing across instance restarts
31
35
32
-
This blueprint creates a setup where the Allora worker node is supported by a side node providing inferences. They communicate through an endpoint so the worker will request inferences to the side node (the Inference Server). This makes an ultra-light worker node.
36
+
The Allora Worker Node is accessed by the user internally and is not exposed to the Internet to protect the node from unauthorized access. A user can gain access to the EC2 Instance using AWS Session Manager.
33
37
34
-
## Worke Node System Requirements
38
+
Multiple processes run on the Allora Worker Node (EC2 instance):
39
+
40
+
- Docker container with the worker node logic that handles communnication bet
41
+
- Docker container running the model server that reveal inferences to consumers
42
+
43
+
Allora Public Head Nodes publish the Allora chain requests (requests for inferences from consumers) to Allora worker nodes. When a worker node is initialized, it starts with an environment variable called BOOT_NODES, which helps handle the connection and communications between worker nodes and the head nodes.
44
+
45
+
The worker node (docker container) will call the function that invokes custom logic that handles. The request-response is a bidirectional flow from the Allora chain (inference requests from consumers) to the public head nodes to the worker node and finally to the model server that reveals inferences.
46
+
47
+
48
+
## Worker Node System Requirements
35
49
36
50
- Operating System: Any modern Linux operating system
37
51
- CPU: Minimum of 1/2 core
38
52
- Memory: 2 to 4 GB
39
-
- Storage: SSD or NVMe with at least 5GB of space.
53
+
- Storage: SSD or NVMe with at least 5GB of space
54
+
55
+
## Setup Instructions
56
+
57
+
### Setup Cloud9
58
+
59
+
We will use AWS Cloud9 to execute the subsequent commands. Follow the instructions in [Cloud9 Setup](../../docs/setup-cloud9.md).
60
+
61
+
### Clone this repository and install dependencies
1. Make sure you are in the root directory of the cloned repository
72
+
73
+
2. Configure your setup
74
+
75
+
Create your own copy of `.env` file and edit it to update with your AWS Account ID and Region:
76
+
```bash
77
+
# Make sure you are in aws-blockchain-node-runners/lib/allora
78
+
cd lib/allora
79
+
npm install
80
+
pwd
81
+
cp ./sample-configs/.env-sample-full .env
82
+
nano .env
83
+
```
84
+
> NOTE:
85
+
> Example configuration parameters are setin the local`.env-sample` file. You can find more examples inside `sample-configs` directory.
86
+
87
+
> IMPORTANT:
88
+
> 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:
89
+
> ```bash
90
+
> cdk bootstrap aws://ACCOUNT-NUMBER/REGION
91
+
> ```
92
+
93
+
3. Deploy Allora Worker Node
40
94
41
-
## Additional materials
95
+
```bash
96
+
pwd
97
+
# Make sure you are in aws-blockchain-node-runners/lib/allora
This is the Well-Architected checklist for Allora Worker Nodes implementation of the AWS Blockchain Node Runner app. This checklist takes into account questions from the [AWS Well-Architected Framework](https://aws.amazon.com/architecture/well-architected/) which are relevant to this workload. Please feel free to add more checks from the framework if required for your workload.
110
+
pwd
111
+
# Make sure you are in aws-blockchain-node-runners/lib/allora
| Security | Network protection | Are there unnecessary open ports in security groups? ||
53
-
||| Traffic inspection | AWS WAF could be implemented for traffic inspection. Additional charges will apply. |
54
-
|| Compute protection | Reduce attack surface | This solution uses Canonical, Ubuntu, 24.04 LTS. You may choose to run hardening scripts on it. |
55
-
||| Enable people to perform actions at a distance | This solution uses AWS Systems Manager for terminal session, not ssh ports. |
56
-
|| Data protection at rest | Use encrypted Amazon Elastic Block Store (Amazon EBS) volumes | This solution uses encrypted Amazon EBS volumes. |
57
-
|| Data protection in transit | Use TLS ||
58
-
|| Authorization and access control | Use instance profile with Amazon Elastic Compute Cloud (Amazon EC2) instances | This solution uses AWS Identity and Access Management (AWS IAM) role instead of IAM user. |
59
-
||| Following principle of least privilege access | In the node, root user is not used (using special user "ubuntu" instead). |
60
-
|| Application security | Security focused development practices | cdk-nag is being used with documented suppressions. |
61
-
| Cost optimization | Service selection | Use cost effective resources ||
62
-
|| Cost awareness | Estimate costs ||
63
-
| Reliability | Resiliency implementation | Withstand component failures | This solution currently does not have high availability and is deployed to a single availability zone. |
64
-
|| Data backup | How is data backed up? | The data is not specially backed up. The node will have to re-sync its state from other nodes in the Allora network to recover. |
65
-
|| Resource monitoring | How are workload resources monitored? ||
66
-
| Performance efficiency | Compute selection | How is compute solution selected? ||
67
-
|| Storage selection | How is storage solution selected? ||
68
-
|| Architecture selection | How is the best performance architecture selected? ||
69
-
| Operational excellence | Workload health | How is health of workload determined? ||
70
-
| Sustainability | Hardware & services | Select most efficient hardware for your workload ||
71
-
</details>
72
-
<details>
113
+
# Undeploy Single Node
114
+
npx cdk destroy allora-single-node
115
+
```
73
116
74
-
<summary>Recommended Infrastructure</summary>
117
+
2. Follow these steps to delete the Cloud9 instance in [Cloud9 Setup](../../docs/setup-cloud9.md)
75
118
119
+
Navigate to the AWS Cloud9 service in your Management Console, then select the environment you have created. On the top right, click **Delete** button and follow the instructions.
0 commit comments