Standup at Standup!

These are one of those comments that sound like a joke but every joke has some truth behind it!

Hopefully your standup is working perfectly. But if it feels like dragging along for longer than 15 mins AND everyone is sitting down. GET UP! In my experience, giving updates while standing has been shown to dramatically shorten the total time to conduct standup

Martin Fowler and collaborators have written the best article I have read with regards in how to conduct standup. Check that out here

Getting Started with Cloud Development

I started working as a Release Engineer roughly 3 years ago and I knew NOTHING about containers, cloud security, docker, kubernetes, patterns, tools, etc… As a release eng, I was responsible for building, packaging, and troubleshooting a few of VMware’s multi-cloud kubernetes offerings (e.g Piovtal Container Service). Before I could be useful with any of that, I needed to understand the building blocks

The following resources were useful at the beginning of my journey

Videos on Containers

Benefits of Containers https://www.youtube.com/watch?v=cCTLjAdI
Qho
Docker Tutorialhttps://www.linkedin.com/learning/learning- docker-2/why-create-containers-using-docker

https://www.linkedin.com/learning/learning-docker-17236240
Docker Networking Optionshttps://www.youtube.com/watch?v=Yr6-2ddhLVo
Containers vs VMshttps://www.youtube.com/watch?v=L1ie8neg
Cjc
Containers 101https://www.youtube.com/watch?v=VqLcWftIa
QI

SSL / TLS / CA Certs

Asymmetric encryption explainedhttps://www.youtube.com/watch?v=AQDCe58
5Lnc
How does HTTPS work? What’s a CA? What’s a self-signed Certificate?https://www.youtube.com/watch?v=T4Df5_coj
As
Certificates with Kuberneteshttps://www.youtube.com/watch?v=gXz4cq3P
Kdg

Kubernetes videos and tutorials

The Illustrated guide to Kuberneteshttps://www.youtube.com/watch?v=4ht22ReBjno
Understanding Kubernetes 1https://www.youtube.com/watch?v=CuWSY_f
wV6M
Understanding Kubernetes 2https://www.youtube.com/watch?v=E3ExWruj
i7g
Understanding Kubernetes 3https://www.youtube.com/watch?v=BrtvGHwy
za0
Commonly asked questions https://www.youtube.com/watch?v=3PLq2vTIj
VE
What happens when…https://github.com/jamiehannaford/what-
happens-when-k8s#kubectl
Kubernetes the hard wayhttps://github.com/kelseyhightower/kubernete
s-the-hard-way

Certified Kubernetes Application Developer Exam Prep

Took and passed the CKAD exam a few weeks ago. Here are some things that helped me

Study Guide

Certified Kubernetes Application Developer Udemy Course: is a must take for CKAD prep. Purchase on the holiday to get a discount. DO the mock exams. DO lightning labs

CKAD Exercises – This helped build muscle memory for the various kubernetes commands. Especially helpful for kubernetes beginners

Killer.sh – Simulates an exam that is pretty close to the real thing. It is difficult on purpose. If these exercise don’t feel difficult, you should be able to pass the exam easily.

Signing up for the exam

This is the link for the exam. Purchase on the holiday as well to get a steep discount

Pro tip: Schedule your exam as soon as possible to secure a spot. You can schedule well into the future!

During the Exam

Show up at least 20 minutes early for the exam. Make sure your exams space is CLEAR of notes and any obstructions. Your virtual exam proctor will have to use your webcam to verify. This process can take a long time!

The Kubernetes documentation will be your friend and available (via one tab) during the exam. Navigate them quickly using the search bar. Grep through docs using Ctrl+F / Command + F for relevant portions

Example: If you’re looking for an example pod yaml for a persistent volume claim setup, go to the relevant page and search for “kind: Pod” to find the yaml setup

Helpful Aliases

alias kd= kubectl describe # example usage: kd pod x

alias kns='kubectl config set-context --current --namespace ' # example usage: kns default

export do="--dry-run=client -o yaml" # example usage: k get pod x $do

VIM

I used my vim as my editor of choice. I use the following techniques to move faster with file manipulation

Duplicate sections of yml using yank and paste

Delete sections of code using dd # example usage to delete next 4 lines: 4dd

Here is my ~/.vimrc which I created at the beginning of the test

set tabstop=2
set expand-tab
set shiftwidth=2

With these presets, you can copy and paste sections from the web and align them within the yaml properly (with extra manual formatting)

Use Github Templates for starter code!

Background

Ever wanted to start a project with a tech stack that you are familiar with? One that you have already customized with preferred dependencies and defaults? Github allows users to create projects as templates. These templates can be used to generate other projects with code from the template.

For an example, when I create react applications I know I want to always start out with typescript, jest, react testing library, and certain directory structures.

Steps

I created a react-starter project. Then went to Settings > Template Repository to convert that project to a template

Next, I created the my other project using the Use this template button in the react-starter template repository

Now it’s time to configure your new project as normal

New projects created from templates should have a reference to the template under the name of the project

And that’s it! The current repository does not have too many defaults right now but nothing is stopping me from continuing to add more down the line

CS for Kids

Book and game recommendations for younger children to get into programming! Leave your recommendations in the comments!

TypeNameAge Range
BookHello Ruby
BookIf Ball; Then Catch5 – 8
BookRosie Technology Book
BookABC Technology Book
BookHow to Code a Rollercoaster4 – 8
BookWebster’s Email3 – 8
BookCounting on Katherine: How Katherine Johnson Save Apollo 135 – 9
BookGrace Hopper: Queen of Computer Code 5 and UP
BookThe Technology Tail: A Digital Footprint Story7 – 10
BookHow to Code a Sandcastle 4 – 8
BookSecret Coders (Series)8 – 12
BookAda Twist, Scientist (The Questioneers)5 -7
BookComputational Fairy Tales8 – 12
BookAda Lovelace: Poet of Science
GameTuring Tumble8 and UP
GameLightbot6 and UP
GameScratch Jr5 – 7
GameCode.org4 – 13
GameCode Combat
GameRobot TurtlesAges: 4 and UP

Serverless Framework Gotmes

Installing binaries within AWS lambda using layers

My bot uses ffmpeg to produce the audio clips. In a serverless environment, I needed to make sure that my lambda had access to the ffmpeg program on disk to run my lambda function AWS lambda provides a way to use binaries using aws layers. The layer concept allows developers to install programs in the serverless environment to be used by your lambda program. The serverless framework provides an interface to use layers via serverless.yml. More documentation on layers here

Serverless upload size

An error occurred: AppLambdaFunction - Unzipped size must be smaller than 185965792 bytes

AWS has a hard limit for the unzipped size of your lambda function. What helped me trim my deployment:

  • Remove all serverless plugins upon uploading your program. Alternatively, a plugin can help reduce node lambda deployments. See the serverless webpack plugin for more information
  • Make sure to only package required development dependencies
  • Trim down packages installed within your layers. For an example, ffmpeg comes with docs, libs, and binaries that were not necessary.

Debugging deployments

Development logs from within the UI seemed to truncate 90% of the information. Tailing the logs was the best way for me to debug my deployed application.

serverless logs -f <application-name> -t

Audio Clipper and the Serverless Slackbot

Motivations

My friends and I communicate daily over slack. Our channels are full of the usual jokes, inappropriate convos, gifs, that most groupchats are filled with. Instead of pictures, gifs, or videos, I wanted to be able to react to conversations using an audio clip.

I didn’t really see a way to do this. I got close by finding a youtube clip with the audio. Unfortunately, that youtube link came with video and a commercial.

Continue reading

Quick Webserver with Nginx and Docker

Need to serve files on localhost? Do it 10 seconds using nginx, docker, and the following one-liner

docker run --name webserver -d -p 8080:80 -v /some/content/to/serve:/usr/share/nginx/html nginx

See you files on your browser by navigating to localhost:8080. By default, the server will look for an index.html from the mounted volume so add one for a homepage. See here for more information about the nginx docker image

-d – Daemon mode. Runs the docker image in a background process

-v – Mount a volume. Maps files from your local machine to a location on the dockerfile. The above example takes the index.html and places it into the default location for nginx to serve files.

-p – Expose ports. Maps internal port 80 on docker to port 8080 of the host machine.

The result

Want to take it to the next level and serve these files over the web? Follow the steps here!

Using sshuttle

Problem: You need access to a machine on private network. The IP address to the machine is NOT public

Solution: If you have ssh access to a machine on the target network, use sshuttle to create proxy, allowing access to the rest of the network

Block diagram of an ssh connection
  1. Establish the ssh tunnel sshuttle -r <USER>:<PASSWORD>@<Host IP Address> <Allowable-Connections> -D
    1. -r – flag to input the hostname and user/password on the command line
    2. USER – user of the host machine
    3. PASSWORD – password to the host machine
    4. Host IP Address – IP address of the host proxy server
    5. Allowable-Connections – You can establish a range of IP addresses that will route through your ssh tunnel. Define this range using CIDR notation. By default, all connections are allowed (0/0)
    6. -D – flag to run sshuttle in a background process
  2. The tunnel created is an open connection to the private network via an ssh connection to a server on the private network
  3. Access a machine on the private network!

Helpful links:

Sshuttle Docs

Sshuttle Video Tutorial

Sshuttle Manual Page