This repository have files to launch Redash and Redash slack bot on AWS ready for production.
Cloudformation templates which referred this repository
These cfn templates set up VPC, security groups, ALB and ECS cluster.
redash-app.yml defines necessary resources specific to Redash application, such as RDS(Postgres), ElastiCache(Redis), ECS service and ALB listener etc.
There are docker-compose.yml
and ecs-params.yml
each for Redash app and redash bot.
As described below, until you explicitly set a value true to launch a redash bot, no related resource will be created.
You should be charged according to the size of instances and duration you run the stack
You are supposed to have domain managed by Route53 and ACM for it. And http request to the domain will be redirected to https by ALB.
In order to debug deeply in case any issues happens and to operate adhoc commands directly (e.g. migration of database), EC2 instances of Redash app are supposed to be launched in public subnet.
Make sure you have a key file like example.pem to connect to the EC2 instances.
Please note you have to modify the security group's rule attached to the EC2 instances to allow ssh connection, which is disabled by default for security.
ssh -i /path/to/example.pem ec2-user@xxxx.xxxx.xxx.xxx
The steps assumes you are launching Redash for staging
environment. You can replace staging
into production
or whatever you like.
ecs-params-redash-app.yml
and ecs-params-redash-bot.yml
with the nameRedashDbPassword
Name in AWS Systems Manager -> Parameter Store.
.env.staging
$ cp .env.example .env.staging
and edit it.AWS_REGION
.AWS_LOG_GROUP
with the name of the log group.REDASH_MAIL_USERNAME
and REDASH_MAIL_PASSWORD
..env
.TemplateBaseURL
parameter of the stack.RedashAppTaskDefinitionArn
parameter of the stack.arn:aws:ecs:ap-northeast-1:0000000000:task-definition/redash-app-staging:1
ShouldRedashBotLaunched
false
still.env
ShouldRedashBotLaunched
is now true
.RedashBotTaskDefinitionArn
with the ARN of the newly created task definition for Redash slack bot in Step #8.https://docs.aws.amazon.com/ja_jp/AmazonECS/developerguide/cmd-ecs-cli-compose-parameters.html https://docs.aws.amazon.com/ja_jp/AmazonECS/developerguide/cmd-ecs-cli-compose-ecsparams.html https://discuss.redash.io/t/redash-on-aws-ecs/1124/3 https://github.com/yamitzky/redashbot https://redash.io/help/open-source/admin-guide/env-vars-settings/