Skip to content

Instantly share code, notes, and snippets.

@RichardBronosky
Last active October 24, 2019 17:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RichardBronosky/97b1e346602205a994ba586123ab2395 to your computer and use it in GitHub Desktop.
Save RichardBronosky/97b1e346602205a994ba586123ab2395 to your computer and use it in GitHub Desktop.
DevOps/Cloud Engineer Challenge

DevOps/Cloud Engineer Challenge

  • Read this answer to my question. https://serverfault.com/a/977813/4131
  • Create a Packer Template that defines a builder of type amazon-ebs
    • Based it on a source_ami_filter that selects the most_recent image of CentOS Linux 7*
    • Add a provisioner that updates all the installed packages so that you have a Centos AMI that has the latest everything at startup
    • Add any other commands to the provisioner that is needed to fix the issue "sudo commands in cloud-init are SLOW"
  • Create a Terraform Config that defines 2 resources of type aws_instance
    • One should use your new AMI. One instance should use the original CentOS 7 AMI by owner aws-marketplace
    • Include (the same in each) user_data that performs several sudo -Hu centos <cmd> and times them in a way you can retrieve for comparison
    • Use terrafrom apply to prove that the issue is present in the original AMI and fixed in yours
  • Create a gist with the Packer Template, Terraform Config, and a README.md that includes:
    • Instructions on how to use it
    • A transcript (Abridged) that exhibits the proof

Notice

  • Use the AWS US-East-1 region (N. Virginia)
    • This is a good general rule for sharing any kind of POC because not all features are available in all regions, AMIs are region specific, etc.
  • The latest AMI at the time was [¿is?] CreationDate: 2019-01-30T23:40:58.000Z
    • It is possible [¿expected?] that later AMIs will have a fix incorporated into them.
    • If you can't recreate the issue, this may be the reason.
  • If you can't recreate the issue, you may not be using "cloud-init" (AWS calls it "user data")
    • In otherwords, this issue will not happen for an SSH'ed in user.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment