-
posts
-
Creating Smaller Docker Images: Part #2
This is the second post in a series on making smaller Docker images. In my previous blog post I talked about how to create smaller Docker images but there were limits to how small we could make the images. I outlined a way in which you can make the layers you add to your Docker image smaller, but there may be times where it just isn’t possible. Perhaps you need to run some steps in a particular order. For Instance, maybe you need to add a file during an intermediate step? RUN ... ADD some_file / RUN ... What if...
-
Creating Smaller Docker Images
Recently I’ve been working with containers a lot and the most popular technology out there is, of course, Docker. On top of allowing you to easily run containers using the docker run command, Docker provides a method to build container images and a format for the resulting image. By writing a Dockerfile and executing the docker build command you can easily create images that can be run anywhere (within some constraints) Docker is installed. For instance, here is a DockerFile for running a simple file server. FROM debian:jessie RUN apt-get update RUN apt-get install -y python RUN mkdir -p /data...
-
Looking Back At My First Year at Google
I joined Google one year ago today. It’s been a really busy year and I can’t believe it’s over so fast. I still feel like I just joined and there’s so much that I’m still getting used to. Google has been at the same time the easiest and the hardest, the most fun and the least fun company I’ve worked at so far. I’ll try to explain a bit what I mean. But first I want to take a look back at my first year. Travel & Speaking It’s been a whirlwind year traveling and getting used to Google’s scale....
-
HTTP/2 and Go
UPDATE (2015/10/15): HTTP/2 is now enabled by default for http servers in tip and will be released as part of Go 1.6. That means that you will be able to create HTTP/2 servers without even calling ConfigureServer(). HTTP/2 is a new version of HTTP with added functionality, including connection multiplexing and header compression. There is currently no HTTP/2 implementation in the Go standard library, but there are a couple of libraries under development that you can use to create HTTP/2 servers and clients in Go. The canonical library is the golang.org/x/net/http2 library by Brad Fitzpatrick. This library will eventually be...
-
Cross-Region HTTP Services on Container Engine
We recently released a new tutorial on using Google Cloud Platform’s HTTP load balancer with Container Engine. This is really exciting because it opens up lots of possibilities based on the features of the HTTP load balancer. The HTTP load balancer enables you to route traffic to different backends (Container Engine clusters, normal Compute Engine instances, etc.) based on the URL. But, the most interesting feature of the HTTP load balancer is that it provides a global IP address and routes traffic to the closest instances in the backend. This article is very similar to the new HTTP load balancer...
-
Testing Django Views Without Using the Test Client
The normal way to test Django views is via the test client. The test client fakes being a wsgi server and actually makes an HTTP request through all of Django’s request routing machinery. There are a number of reasons why this isn’t an ideal approach. Tests are Slow When you use the Django test server, you are making an HTTP request from the WSGI server level on up. This invokes logic for parsing the WSGI parameters, middleware, view resolution, error handling and more. This will make your tests slower than they need to be because of code that you don’t...
-
Using Kubernetes Namespaces to Manage Environments
One of the advantages that Kubernetes provides is the ability to manage various environments easier and better than you have been doing. For most nontrivial applications, you have test, staging, and production environments. You can spin up a separate cluster of resources, such as VMs, with the same configuration in staging and production, but that can be costly and managing the differences between the environments can be difficult. Kubernetes includes a cool feature called namespaces, which enable you to manage different environments within the same cluster. For example, you can have different test and staging environments in the same cluster...
-
Deploying Go Servers with Kubernetes on Container Engine
Cross posted on medium I was trying to get a Go app running on Container Engine and couldn’t quite find what I was looking for. There are guides out there about how to use Go and Docker, and how to use Kubernetes but but not many about Go apps and Container Engine. I also found it easy to deploy apps but most guides lacked information on best practices for how to maintain apps through regular upgrades so I decided to research it and write a post about it myself. Be sure to check out the Container Engine documentation for details...
-
Why I Joined Google
As some of you may or may not know, I joined Google as a Developer Advocate on the Google Cloud Platform Team in January. I just completed my first 3 months and, like many others, it’s been a whirlwind experience. The sheer amount you need to learn and get used to is overwhelming. Google has been doing a lot since it started almost 20 years ago and it shows. There is a huge amount of built-up experience and know-how at the company. My Path to Being a Googler After college I joined a small/medium sized company of about 600 people...
-
Orchestration with Fabric #1
When figuring out how I wanted to deploy my website I had a few things that I knew I wanted. I wanted to be able to create my server(s), provision them, and deploy the app all from one tool. This will be the first in a series of posts about how I used Fabric to achieve that. Tools like Vagrant can be used to create servers and provision them, but deploying an app using a provisioning tool like chef, puppet, or Ansible is less than ideal. Vagrant also can only get you so far, when you need to set up...