Closed rlefevre closed 5 years ago
I didn't get past step 1, what is it looking for? A file/script with then name GITHUB_TOKEN or the actual token? Either way it fails. I don't understand what this is trying to do.
@beno I created a file named GITHUB_TOKEN
with the actual token in it.
Thanks, did that too, but that seems so weird after setting it to an ENV var. Anyway, onward.
On 10 Dec 2018, at 16:03, rlefevre notifications@github.com wrote:
@beno https://github.com/beno I created a file named GITHUB_TOKEN with the actual token in it.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/bitwalker/distillery-aws-example/issues/5#issuecomment-445846421, or mute the thread https://github.com/notifications/unsubscribe-auth/AAC0oz4VvwG479e-RjNMCCGAiYJxvWovks5u3nezgaJpZM4YgrXk.
You can also change the cfn
script to be this:
GITHUB_TOKEN="$(echo "$GITHUB_TOKEN")"
Yeah i wanted to follow this guide but this is super annoying nothing works. I get this when running cfn:
Waiter StackCreateComplete failed: Waiter encountered a terminal failure state
Hey @9mm, the guide works well. There are things that can go wrong though. If you get a message like Waiter StackCreateComplete failed...
You can always go into CloudFormation via the AWS console and get more info. You may find the error is a name conflict, you'll get an error like that if there is already a CF stack or AWS bucket with the same name as the resource you're trying to create. In particular, if your first attempt fails part way through it may have already created some of the stack resources. In that case be sure to delete the stack before trying again.
The problem was is that the name is global across all accounts if I remember right (it's been awhile). Considering I can't delete that, then it means the command in the guide will always fail.
Yeah, I know what you mean, it was probably the S3 Bucket name, they need to be globally unique. I needed to change the bucket name as described by @rlefevre.
Hi,
Thank you very much for the Deploying to AWS guide and this repo, they have been extremely useful to me.
Here are a few issues I encountered following the guide:
1. GITHUB_TOKEN file
The
bin/cfn
script doesGITHUB_TOKEN="$(cat "${SCRIPT_DIR}/../GITHUB_TOKEN" || "")"
, therefore without aGITHUB_TOKEN
file, I got the following error:Adding the token in this file fixed the issue
2. S3 Buckets global identifiers
As S3 Buckets are global, it is not possible to create one if any other AWS account has already created it. When running
bin/cfn create
, I got the following error most likely because someone already deployed thedistillery-aws-example-builds
bucket and did not delete it:The S3 bucket name uses
BucketName: !Sub "${ApplicationName}-builds"
, so changing the application name fixed the issue. Maybe the S3 bucket name or the application name could include a random part?3. DeployApp failed on
ValidateService
Application cannot start correctly because of the following error:
Adding
{:plug_cowboy, "~> 1.0"}
inmix.exs
fixed the issue.4. Minor documentation issue
Being new to distillery, I struggled to be able to run some release tasks to debug the failed application start. To be able to run
./bin/distillery_aws_example foreground
, I had to connect asec2-user
by SSH to one ec2 instance, runsudo su
to be root, go to/opt/app
and run:Is there an easier way to run release tasks?
5. Minor issue with the TODO App
Once I successfully deployed the app, I noticed that it's not possible to complete a TODO in the TODO app (they can be checked but stay active). This is most likely not related to the AWS deployment at all so this is very minor. I didn't investigate the issue.
Thank you.