This guide will help you to deploy Fiware's Orion and Cygnus (optional) components into a serverless architecture.
-
An AWS CDK project in charge of provisioning the basic infrastructure with a VPC Network, Security Groups and two managed Databases, one Amazon Aurora Serverless (PostgreSql) and one Amazon DocumentDB. These are represented in the following stacks:
- Network Stack
- DocumentDB Stack
- Aurora Stack
- Fiware Stack (new stack replacing the deprecated docker ecs-integration)
Besides WAF configuration to allow IP based access, this repository does not include any additional security mechanisms. However, we do recommend to read the security considerations from Fiware and enable SSL communication. For the later, please read create-https-listener and how to enable this in CDK
Instal node v18.16.1 or greater.
1.1 Create an AWS profile is recommended if you do not have it.
Use the settings.ts
file to configure your deployment. You can delete/comment the cygnus
attribute if you only want to deploy Fiware Orion. You can also choose to deploy the 'fiware/orion' image or the 'fiware/orion-ld' from docker hub by configuring the orionLD
attribute.
Additionally in the Orion construct you can add environmental variables, for more information check the following links:
-
Orion-LD: https://hub.docker.com/r/fiware/orion-ld
The infrastructure is deployed by this bash script:
./deployer.sh <YOUR_AWS_PROFILE>
After the deployment is completed, you can see these services running in you AWS account.
AWS Service | Description |
---|---|
AWS Fargate | Containers for Orion and Cygnus |
Application Load Balancer (ALB) | Load Balancer for Orion and Cygnus web api. |
Amazon DocumentDB | Database for Orion |
Amazon Aurora Serverless | Database for Cygnus |
AWS WAF | Web Application Firewall for the ALB. * |
NOTE: WAF rules for the ALBs can be changed, please see this reference.
Follow the demo from the published blog: How to build smart cities with FIWARE Orion Context Broker and Cygnus on AWS
Loadtest for FIWARE Components provides load test for FIWARE Orion-LD
If you need to clean up the resources, please follow steps below.
[WARN] All data will be deleted by this step.
npm run cdk destroy -- --all --profile <YOUR_AWS_PROFILE>
- Issue in FIWARE github repository
- DocumentDB does not port all the functions of MongoDB, like for example geospatial capabilities.
Docker Compose's integration for ECS and ACI is retiring in November 2023.
from https://docs.docker.com/cloud/ecs-integration/
You can upgrade your current existing deployment by following these steps:
IMPORTANT: we recommend you to do a full backup of the database services Aurora RDS and Amazon DocumentDB before continuing.
- Edit the
settings.ts
file to configure your ECS services and WAF settings. - Delete the
cygnus
andorion
stacks from the AWS Console Cloudformation, be sure to select the region used to deploy. - Execute the deployer in your terminal:
./deployer.sh <YOUR_AWS_PROFILE>
- You will get a new endpoint for Orion,
FiwareStack.orionservice...: http://....elb.amazonaws.com/
- If you deployed with Cygnus, you can subscribe to it in the new URL:
<http://cygnus.fiware:5055/notify>
This project is licensed under the GPL v3 License. See the LICENSE file.This library is licensed under the GPL v3 and the MIT-0 License. See the LICENSE.MIT-0 file.