Getting Started
There are two options to deploy Fana to get started quickly.
- Docker: Developers interested in using Fana in a self-hosted environment (non-AWS) or are interested in testing out Fana in their local development environment can deploy the entire Fana stack with one command using Docker.
- Cloud deployment: Developers that are already familiar with the AWS environment can quickly deploy the Fana stack using the provided AWS Cloud Development Kit (CDK) template.
Using Docker
This option works well for teams that want to test Fana out in a local developement environment or would like to run Fana on self-hosted infrastructure.
- Navigate to the
Fana-Dockerdirectory.
$ cd Fana-Docker
- Edit the
.envfile to the appropriate environment variable configurations for connecting to the PostgreSQL database. A template.envwith defaults has been provided. - To deploy, run the following command in the same directory as the
docker-compose.yml:
$ docker-compose up -d
- Navigate to
localhost:3000to access the developer dashboard. The Flag Bearer is available for SDK connections atlocalhost:3001.
Using Fana's Javascript CDK
Fana's CDK uses the Elastic Container Services hosted on AWS Fargate, a serverless, pay as you go compute engine.
Prerequisite
To use the CDK App, you need the following:
- AWS CLI installed and configured with your credentials and AWS region.
- Bootstrap (create dedicated Amazon S3 buckets and other containers to be available to AWS CloudFormation during deployment) using:
$ npm install -g aws-cdk
$ cdk boostrap aws://YOUR-ACCOUNT-NUMBER/YOUR-REGION
Deploy Fana App
- Navigate to the
Fana-CDKdirectory.
$ cd Fana-CDK
- Run
cdk listto list the stacks in the app.
$ cdk list
- Deploy the Fana App and related stacks to AWS
$ cdk deploy --all
- Use the load balancer DNS output to access the UI dashboard. Port over the load balancer URI into the SDKs configuration to specify Flag Bearer endpoint.
Resources Deployed
There are two different stacks defined in our CDK:
fana-shared-resourceswhich includes:
- AWS VPC and subnets
- an ECS cluster
- an instance of Relational Database Service (RDS), and
- an Elasticache Redis cluster.
FanaPlatformStackincludes:
- the Fana Manager and Bearer containers defined as tasks for the Fargate service,
- the application load balancer configured with listener rules, and
- the security groups.
The fana-shared-resources are referenced in the FanaPlatformStack.