Giter VIP home page Giter VIP logo

fiware-orion-on-aws's Introduction

FIWARE: Orion and Cygnus on AWS

This guide will help you to deploy Fiware's Orion and Cygnus (optional) components into a serverless architecture.

What does this repository include?

  1. 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)

What doesn't this repository include?

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

Architecture

Architecture

How to use it?

1. Requirements

Instal node v18.16.1 or greater.

2. Infrastructure

1.1 Create an AWS profile is recommended if you do not have it.

3. Configuring settings

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:

4. Deployer script

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.

5. Demo

Follow the demo from the published blog: How to build smart cities with FIWARE Orion Context Broker and Cygnus on AWS

6. Load Testing

Loadtest for FIWARE Components provides load test for FIWARE Orion-LD

7. Clean up

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>

8. Known Issues

8.1 DocumentDB vs MongoDB

8.2 Docker ECS integration deprecation

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.

  1. Edit the settings.ts file to configure your ECS services and WAF settings.
  2. Delete the cygnus and orion stacks from the AWS Console Cloudformation, be sure to select the region used to deploy.
  3. Execute the deployer in your terminal: ./deployer.sh <YOUR_AWS_PROFILE>
  4. You will get a new endpoint for Orion, FiwareStack.orionservice...: http://....elb.amazonaws.com/
  5. If you deployed with Cygnus, you can subscribe to it in the new URL: <http://cygnus.fiware:5055/notify>

License

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.

fiware-orion-on-aws's People

Contributors

amazon-auto avatar hide14 avatar jl4nz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

fiware-orion-on-aws's Issues

[Architect-fiware-orion-on-aws]

Hi, thank you for the fiware orion project on aws.

In your diagram, I want to ask why don't you just stop the IOT Agent to manage the device?
Will your devices be sent directly to the Orion Context Broker or will it require programming embedded into the device?

node error occur

I ran "./deployer.sh <AWS_PROFILE>" and after deploying DocumentdbStack I got the following error message:

Provisioning AWS OK
node:internal/errors:465
	ErrorCaptureStackTrace(err);
	^

TypeError [ERR_IMPORT_ASSERTION_TYPE_MISSING]: Module "file:///home/xxx/fiware-orion-on-aws/cdk-outputs.json" needs an import assertion of type "json"
	at new NodeError (node:internal/errors:372:5)
	at validateAssertions (node:internal/modules/esm/assert:82:15)
	at defaultLoad (node:internal/modules/esm/load:24:3)
	at ESMLoader.load (node:internal/modules/esm/loader:407:26)
	at ESMLoader.moduleProvider (node:internal/modules/esm/loader:326:22)
	at new ModuleJob (node:internal/modules/esm/module_job:66:26)
	at ESMLoader.#createModuleJob (node:internal/modules/esm/loader:345:17)
	at ESMLoader.getModuleJob (node:internal/modules/esm/loader:304:34)
	at async ModuleWrap.<anonymous> (node:internal/modules/esm/module_job:82:21)
	at async Promise.all (index 2) {
  code: 'ERR_IMPORT_ASSERTION_TYPE_MISSING'
}

Please tell me how to solve it.
The version of node I'm using is 16.16.0.
Node.js v18.6.0 didn't work either.

Please let me know if you have any other information you need

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.