Open robksawyer opened 9 years ago
I have it writing a script similar to the following. So, I'm hoping this will work.
#!/bin/bash
cd "/root"
/usr/local/bin/brenda-node --daemon <<EOF
AWS_ACCESS_KEY=HIDDEN
AWS_SECRET_KEY=HIDDEN
BLENDER_PROJECT=s3://HIDDEN/Chinchillax_YellowParticleMesh.gz
WORK_QUEUE=sqs://HIDDEN
RENDER_OUTPUT=s3://HIDDEN
S3_REGION=us-west-2
SQS_REGION=us-west-2
DONE=shutdown
EOF
Bummer, it seems like this didn't work. ![Uploading Screen Shot 2015-06-19 at 2.13.37 AM.png…]()
The following articles were good leads to what hopefully solves the problem. The UserData apparently needs to be in base64 format.
http://stackoverflow.com/questions/6182315/how-to-do-base64-encoding-in-node-js http://serverfault.com/questions/592423/how-do-i-launch-an-amazon-ec2-spot-instance-with-userdata
Well it worked. Now I need to ensure it actually pulls from the SQS queue.
This script handles sending the SQS queue messages to the EC2 instances. This is located in
api/services/amazon.js
->startupScript
.It looks something like this: