• Sunday

    • Changed the oil on the ducati. 2 years. Checked and topped off coolant.
    • Made peanut butter (3lbs) and the first batch of homemade bars in NY. 4 ingredients. Homemade peanut butter, coconut oil, protein, oats.
    • Swiffered.
    • CIDR = classless inter-domain routing.
    • Mealprepped powder jars.
    • Ssh port 22.
    • Crew splashdown.
    • Waterfox, privacy browser.
    • Bed/room stuff. Total ~$2850.
    • Always been a command line text editor guy, but installed vscode on my ubuntu laptop today just to play around.
    • Created personal AWS account. VMs in EC2. Beanstalk for webapps. Lightsail to includes DBs and networking. Route 53 for DNS. Lamba. IoT. So much. AWS CodeDeploy, Pipeline.
      • For DevOps, would deploy a bamboo or jenkins server (and N build agents) to EC2.
    • Terraform.
      • Installed and played with it on AWS.
      • Added terraform extension to vscode.
      • Lots of providers: aws, digitalocean, etc.
      • Launched a ubuntu 18.04 ec2 ami, both manually through aws and via terraform.
      • Can auth by generating a key/secret from aws and copying to config file (not the safest, but direct). You may also generate a keyfile and point to its path in the config (better).
      • Terraform init, plan, apply, destroy. Remember, basically just specifying the resource state of your system, all through code configs. You’re not defining steps, you’re defining the final state. Terraform is idempotent for that reason. It’s declarative.
      • VPC = virtual private cloud, isolated network in aws. You can define a resource to add a vpc, just like anything else. You can create a subnet as well. You can reference that other resources in your config by name/id.
      • Overall, pretty similar to docker-compose, but in the cloud.
      • It hoists, so you don’t have to worry about the order of the .tf file. Definition is arbitrary. It will parse the file and decide the order of ops intelligently.
      • Tf will add a backup file locally, as well as a tfstate and lock file.
      • Internet gateway, route table, route table association, network interface, security group, elastic id (eid)
      • Just google “terraform aws <your-resource>” and copy-paste the example into your tf file. They have good documentation.
      • You can pass commands on startup to the aws instances, like user_data = <<-EOF sudo apt update -y && echo hello EOF
      • Created a basic apache service and hosted it on EC2, publicly available!
      • Ssh-ed into my ec2 linux box.
      • Terraform state list, terraform state show. You can observe the state of all your resources.
      • Outputs. You can have it autoprint the public ip when you terraform apply, for example.
      • You can pass –target <> to apply or destroy only a single resource, rather than the whole tf file.
      • You can define variables for use throughout the config, or put them in a separate file called x.tfvars.
      • Kubernetes is an orchestration layer for docker containers. Terraform is a superset of that. You can plug into k8s for service containers, cloudflare for ddos protection, aws for machine learning, gcp for analytics, whatever. It’s cross-provider. It’s a general infrastructure tool to define your entire ecosystem.
    • Beside tf, reminder hashicorp also builds consul, vault, nomad, vagrant, more.