limnh / journey

Notes and learnings along the way of becoming an engineer
0 stars 1 forks source link

2019-03-15 #21

Open limnh opened 5 years ago

limnh commented 5 years ago

Issues/Questions:

  1. ended yesterday with both CircleCI and the shell script on the newly provisioned server timing out.
  2. have realized that I have to be more mindful of my daily tickets. this week has been very productive, but it feels like I start a ticket and then get so engrossed with work that there aren't many updates on them.
  3. attempting to pass in ENV VARS with ssh -o SendEnv=$AWS_ACCESS_KEY_ID -o SendEnv=$AWS_SECRET_ACCESS_KEY root@$PACKET_IP 'chmod +x /tmp/script-stuff/echo.sh && exit' because the packer build needs those AWS keys, and using a simple echo to see if they're getting passed in correctly.
    • ~chmod +x echo.sh is there because I was getting permission denied when attempting to run the script in the provisioned server.~
      • just chmod locally, which should save it to git that way
  4. got the following error when using the first round of AWS credentials (because it was in our root account, switched to engserv-sandbox
    • Build 'amazon-ebs' errored: error validating regions: UnauthorizedOperation: You are not authorized to perform this operation.

Solutions:

  1. chatted with alvin about CircleCI's 10 minute timeout window, he suggested "printing dots" to refresh output to Circle so it doesn't time out. turns out the server was timing out because the environment variables I coded to pass in aren't going anywhere or doing anything. testing now to see if I can get a simple shell script to echo these two variables.
    • CircleCI is currently down, so that sucks
  2. going to go through this current week's tickets, adding more detail and outlining more closely of what was actually being worked on. plan's to be more proactive about this in the future, so I don't need to go back later.
  3. fucking FINALLY confirmed that the test env var I was trying to pass in successfully made it. took a lot of trial and error to find the exact syntax to get this to work.
    • ssh root@$PACKET_IP "export AWS_ACCESS_KEY_ID=$AWS_ACCESS_KEY_ID AWS_SECRET_ACCESS_KEY=$AWS_SECRET_ACCESS_KEY;/tmp/script-stuff/shell.sh && exit"