ikazoy / redash-on-ecs

This repository has setting files to host redash and redash bot on AWS. You could launch Redash ready for production within 5 minutes.
39 stars 12 forks source link

cloudformation template #1

Open malinc854 opened 4 years ago

malinc854 commented 4 years ago

Hello,

First of all, thank you for this useful utility.

I am done till step 4 and for step 5, I am not able to understand which file to give as cloudformation template? I tried giving the s3 bucket path as you mentioned, but it is not correct as I am getting error.

i am looking help on below point

Create a Cloudformation from AWS Web console with the name you have decided Upload files under a S3 bucket. And put the URL of S3 bucket in TemplateBaseURL parameter of the stack.

ikazoy commented 4 years ago

Hi @malinc854, I will get you back within 1 or 2 days. Thanks!

malinc854 commented 4 years ago

thank you!! just to add that I tried creating cloudformation stack using "cfn-templates/service/redash-app.yaml" but got many errors.

I highly appreciate your help.

ikazoy commented 4 years ago

@malinc854 Let's say you have S3 bucket called example-redash-bucket in ap-northeast-1 region.

  1. Just upload the whole cfn-templates directory to the s3 bucket.
    • Now example-redash-bucket/cfn-templates looks like this. image
  2. Then, you can create a cloudformation stack from the template. CloudFormation - Stack 2020-04-18 21-31-47
  3. When you go to the next step to create the stack, don't forget to specify TemplateBaseURL as https://example-redash-bucket.s3-ap-northeast-1.amazonaws.com/cfn-templates/.

Probably I would update README to elaborate the related steps. Hope it will help you.

malinc854 commented 4 years ago

Thank you!! I will test and let you know. Much appreciated

saianger commented 2 years ago

hi, thank you for providing this solution. May I ask what environment value is mandatory? For example what value I should put for REDASH_SECRET_KEY, REDASH_COOKIE_SECRET and REDASH_API_KEY? Thanks!

ikazoy commented 2 years ago

@saianger You can refer the official doc to see what environment variable is needed for what purpose. As far as I checked, REDASH_SECRET_KEY is removed on redash v8 and REDASH_COOKIE_SECRET has default value.

As described in README of this repo, REDASH_API_KEY is needed for slack bot to access redash.

If you don't need a Redash slack bot running, you have done! The below steps is only for those who want to run the bot.
When the redash app get ready, set these variables in .env
REDASH_API_KEY
Access https://{YOUR_REDASH_HOST}/users/me and retrive a API key.
SLACK_BOT_TOKEN
Token for the slack bot. e.g. xoxb-xxxxxxxxxxxxxxxxxxxxxxxxxxxx
saianger commented 2 years ago

hi @ikazoy , thanks a lot for your quick response. I'm in the process of deploying in Cloudformation now, however I found one error when deploying the redash-RedashAppService, the error is: service redash-RedashAppService-1LPHSJQPRLP6I-Service-xxSZY7GFwcn7 failed to launch a task with (error ECS was unable to assume the role 'arn:aws:iam::334232611573:role/ecsTaskExecutionRoleWithSsmRead-Redash' that was provided for this task. Please verify that the role being passed has the proper trust relationship and permissions and that your IAM user has permissions to pass this role.).

I tried to add both ecs-tasks.amazonaws.com and ecs.amazonaws.com as trust entities for that role but still no luck, could you advise on this?

saianger commented 2 years ago

hi @ikazoy , this issue has been resolved. Thank you so much for wrap up everything into this, I will start testing on the scalability of it.