Blog

You can become a superhero of automation and development by learning and practicing. This is our blog from our learnings and practice.

We are consultants and trainers in Cloud Foundry, devops automation and continous delivery. We have the best jobs in the world helping you have the best job in the world.

Building agents in Go that talk with Consul agent

Consul makes it simple for services to register themselves and to discover other services via a DNS or HTTP interface, provides built-in health checks, and more. It also includes a key-value store similar to Etcd or Zookeeper. I’m starting to think of a local Consul agent – either running in client or server mode –

Ashley Gerwitz Profile Image

Posted by:
Ashley Gerwitz

Read More ➝
Demo of a manual failover of redis cluster atop of consul/confd

The animated gif* demo below shows: observe a master node failure (consul health checks) promote a slave to become master configure other slaves to the new master configure the original master to become a slave (if it ever awakens/returns to the cluster) And all without touching my configuration management tool (which is BOSH in this

Ashley Gerwitz Profile Image

Posted by:
Ashley Gerwitz

Read More ➝
Bootstrapping a bootstrap-less consul cluster with BOSH

Update: instructions are even simpler thanks to consul v0.3.1+; and releases v5+ of consul-boshrelease. This post documents the old two deployment-step sequence. As of v5 there is now only one deployment required. See the project README. Whether you’re a BOSH user already or not, you might be interested to use it to boot your stable

Ashley Gerwitz Profile Image

Posted by:
Ashley Gerwitz

Read More ➝
Services upgrading their own DNS

This article is a continuation of investigations into service discovery, which started 3 days earlier with The world’s quickest demonstration of consul. One side of DNS is the ability for clients to find backend services/web apps without knowing implementation details: the IP addresses of host machines. The flipside is equally important: the ability for the

Ashley Gerwitz Profile Image

Posted by:
Ashley Gerwitz

Read More ➝
Dynamic DNS based on consul health checks

Continuing to explore consul for service discovery, I added some health checks to the redis cluster from the previous post (World’s quickest demo of consul). As you can see below if a health check is critical, then the service is removed from the DNS listing. If a health check is a warning, then it continues

Ashley Gerwitz Profile Image

Posted by:
Ashley Gerwitz

Read More ➝
Automating root password on MySQL 5.6

So, I spent an unreasonable amount of time attempting to automate the install of MySQL 5.6 for a client. Apparently one of the newer features in MySQL is the creation of a temporary password file when MySQL is first intalled. I want to use this password file to reset the root password as the root

Chris Weibel Profile Image

Posted by:
Chris Weibel

Read More ➝
World’s quickest demo of consul

"What is service discovery?" and "Should I investigate consul?" are questions for another day. Today is the day for the world’s quickest demonstration* of advertising a master-slave-slave redis cluster across consul. *No effort was made to verify this claim. Step-by-step: It shows a running cluster of consul servers Sadly, there is no redis service available.

Ashley Gerwitz Profile Image

Posted by:
Ashley Gerwitz

Read More ➝
Using a postgres URI with psql

It its popular to reference a PostgreSQL database with credentials via a URI, but neither psq –help nor man psql (v9.3.4) indicate how to do it. @yann_ck showed me you can pass it as the first argument: $ psql postgres://USERNAME:[email protected]:5432/jszlmeae psql (9.3.4, server 9.2.8) SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256) Type "help" for help. jszlmeae=>

Ashley Gerwitz Profile Image

Posted by:
Ashley Gerwitz

Read More ➝
Deploy Ghost blog to Cloud Foundry

Ghost is a lovely blogging application that is open source, requires only Node.js, a SQL database and an optional STMP/email service. Perfect for running on Cloud Foundry. So we migrated the static/jekyll Stark & Wayne website to Ghost and its now running on Pivotal Web Services. Here’s how… Follow these instructions to install Node.js &

Ashley Gerwitz Profile Image

Posted by:
Ashley Gerwitz

Read More ➝