Serverless Installation
Overview
AWS Fargate is a serverless compute engine for containers. Using it in conjunction with Amazon Elastic Container Service (ECS), you can run Kill Bill in containers without the need to deploy and manage any server.
While we recommend using our Cloudformation template to deploy a production ready environment, running Kill Bill on ECS with Fargate is a great way to quickly deploy test environments.
Docker Images on AWS Marketplace
The Docker images required for running Kill Bill on ECS are available on AWS Marketplace. To access these images, follow these steps:
-
Subscribe to the product on AWS Marketplace by visiting the following link: https://aws.amazon.com/marketplace/pp/prodview-55w3bwkeabhba
-
Once subscribed, you can download the necessary Docker images directly from the AWS Marketplace.
Instructions
Create the Cluster
-
Subscribe to the product in the AWS Marketplace.
-
Create an AWS ECS Cluster:
-
Select the Networking only template:
-
Enter a cluster name:
If these above steps are successful, AWS displays a success screen:
Create a Fargate Task Definition
-
Create a Fargate Task Definition:
-
At the bottom of the screen, select Configure via JSON:
image::../assets/aws/ecs-task-definition-via-json.png
-
Create an IAM role that allows the
aws-marketplace:RegisterUsage
action and theecsTaskExecutionRole
role. -
Enter the content of the following JSON file and replace
ECS_TASK_EXECUTION_ROLE_ARN
andECS_TASK_ROLE_ARN
with the ARN of the role created in the previous step. Also, replaceACCOUNT_ID
with your AWS account ID: -
Once the UI has been populated from this JSON:
-
Update the
awslogs-region
for each container in case you are deploying in another region thanus-east-1
. -
Modify the environment variable
KILLBILL_ADMIN_PASSWORD
(which is the password for the Kill Bill user) to change the default value.
-
-
Run the task from your cluster:
-
Choose FARGATE as the launch type and select an existing VPC and subnet:
-
The Security group needs to have port 8080 open for Kill Bill and 9090 for Kaui:
It takes a few minutes for the task to start. Once all the containers are healthy, you can access Kaui at http://PUBLIC_IP:9090/users/sign_in and Kill Bill at http://PUBLIC_IP:8080/api.html.
About Logs
Logs are by default forwarded to CloudWatch in the Log Group /ecs/killbill
. You must create it if it doesn’t exist.
Alternatively, you can update the logConfiguration
definitions in the task.json
depending on your environment (see the associated AWS documentation).