-
Fully Remote Development with VS Code & Cloud9
I work from about 7 different machines, including 3 laptops, ipad, chromebook and a PC desktop. Usually this means keeping credentials, config, build dependencies and IDEs in sync across all 3–and the iPad & Chromebook just can’t run my dev environment
I considered a few options to enable seamless work across devices
option pros cons Keep a “dev” docker image that contains everything. fully-local dev only works on Desktop OSs. Inconsistency if you forget to push the image Sync script fully-local dev Inconsistency across devices. Script mayhem Code remotely via a VM Secure, consistent Traditionally, text-only Solution
- Launch Cloud9 Environment on AWS
- Install VS Code + SSH Remote Extension
- Install tmux
With this setup, you get the highest-fidelity experience when you can (with VS code), plus an adequate experience on iPad & Chromebook (cloud9 web ide). With tmux you get seamless handoff across all devices.
-
Publish Free Static Websites With Firebase, Hugo and Google Cloud Builder -- Part 2
In Part 1, we completed our development environment, including setting up Hugo and our repo.
Here we’ll publish our site to Firebase Hosting, and create the CI tools on Google Cloud Build to build and publish upon push.
Open Your Cloud Shell
In Part 1, we enhanced our cloud shell with hugo and set up our repo. In Part two, we’ll use it to create the builder and configure hosting.
See the Quickstart for complete instructions
-
GCP: Managing IAM Access Control Across Projects -- The Simpler Version
GCP resources are organized into projects – all resource IDs and IAM principles are grouped under a project ID. This means that by default roles assigned to a principle (e.g. a user or service account) are scoped only to project resources. This can be tricky if say your images are in one project’s storage bucket and your app is running in another
If you want to provide a service principle in one project access to resources in another , the approach is not obvious, nor is it well documented.
-
Publish Free Static Websites With Firebase, Hugo and Google Cloud Builder -- Part 1
Static site frameworks like Hugo allow you to manage content with Markdown and publish content via scalable hosting platforms like Firebase hosting. Uptime, performance and operations cost per user can’t be beat – you can easily hit millions of pageviews for less than $10/ month
In this tutorial we’ll make a production-ready personal website site, that supports multiple collaborators, built using Hugo. Moreover, we’ll publish with the free-to-start Firebase Hosting CDN, and build automatically using Google Cloud Builder.
-
Writing Custom Metrics to Stackdriver in Golang
Instrumentation is a critical part of any application. Along with system counters like cpu, heap, free disk, etc– it’s important to create application-level metrics to make sure health is measured closer to your customer’s experience.
Example metrics could be user-registration, password-change, profile-change, etc. If you see a major spike or dip in these metrics, a wider problem could be indicated.
For this example a custom metric was needed, and no infrastructure was in place for harvesting it (e.g. collectd). Golang is handy for creating an easy-to-install daemon which performs the measurement and periodically harvests the data into stackdriver.