This message was deleted.
# getting-started
s
This message was deleted.
w
I think it’s because
//
is not a comment in bash. So the bash script being deployed via user-data is failing and causing the instance to essentially fail. Try changing the userdata script to use
#
for the commented out line.
h
Yeah. I am starting with one line in the userData variable. To keep it simple. The // lines are comments in typeScript. The userData has one line in it…
#!/bin/bash
. When and If I get that working I will add the following lines into userData.
b
@handsome-napkin-75099 does the AWS console give you more info about why the stack isn't coming up heathily? I think you might need to install the ecs agent in your AMI somehow
h
What I see is the 0 success in the console. Maybe I need to try to see more what is happening with the instance, but I am not sure how to see that. All I am seeing is the AutoScalingGroup stack definition and the events within it.
@billowy-army-68599 My understanding is that if I do not specify an AMI image that Pulumi chooses a ECS Optimized AMI which includes the ecs agent.
b
you should be able to go into the ECS console and get more info
I'm free 1-2 PST if you wanna jump on a call together?
h
That would be fantastic.
I will initiate a stack again and see what I can see in the ECS Console.
b
@handsome-napkin-75099 grab some time from here: https://calendly.com/lbriggs58/30min
h
Lee I was not able to schedule time for today. I set it up for tomorrow at 3:00 PM Central Time.
b
yeah sorry, my calendar just filled up, is tomorrow any good?
h
I have it on my calendar. I am looking to TF as a work around.
b
😞 we can get you over the line I'm sure!
h
Yeah, I am sure we can. Just I have spent to much time on this and I have not found any examples for ECS on EC2. Looking at https://github.com/anrim/terraform-aws-ecs. Which looks like exactly what I need.
It looks like the instance never gets added to the Cluster. I see the EC2 instance up and running, but nothing in the cluster. I suspect that my userData is clobbering the initialization of the instance to join the cluster.
b
I would recommend base64 encoding your userdata before passing it to your instance - give that a try and see how it goes
👍 1