Month: June 2017

One of my friends recently asked me what my thoughts were on “Working from Home” vs Commuting. So, I wrote down a list.

The Pros of Working in an Office

There are definitely a couple pros that I can think about when working from the company office.

The People.

You get to have the random watercooler conversations.

You don’t feel so “alone”

You can easily bounce ideas off of others or weigh in on conversations that you otherwise would not have been involved in.

It’s harder for people to avoid you. (So you can finally get Bill to provision that extra RAM you requested weeks ago)

You have a better sense of the state of the company.

You overhear information about how the company is doing

You can literally see Manager1 and Manager2 rush down the hall to the CEO’s office. Which gives you a clue that something might be up.

You can take part in the office perks (only available to office goers)

Work provided lunch?

On site Gym?

On site Massage?

Work provided chairs and desks

The Cons of Working in an Office

On the other hand there are certainly some flaws too.

The People

They are loud

They don’t know when to leave you alone.

Manager stands behind you pretending not to look directly at you (might as well be parked in a big white van right across the aisle from your desk).

You overhear conversations you don’t want to hear

Gloria complained that it was too cold in the office so now the thermostat is set at a flat 76 degrees during the summer and 82 degrees in the winter.

Ted never washes his hands after using the restroom.

Ted enjoys randomly giving you back massages while telling you some inappropriate joke.

Ted works here.

The restroom is always out of toilet paper.

Ted is your boss.

The restroom is also out of acceptable toilet paper substitutes, like paper towels, because someone decided using a TON OF ENERGY to heat up and blow hot air at your hands was better for the environment.

Amanda plays with the action figures on your desk when she comes over to ask you a question. (BTW you’ve already answered this question three separate times via email, chat, and in a meeting).

MEETINGS -> you are all literally in the same room. Ted is there.

You have a better sense of the state of the company.

Nobody knows what they’re doing. This company is doomed.

You can take part in the office perks (only available to office goers)

Work provided chairs and desks. Why do they even buy them?

There is no work provided lunch, gym, or massage. But they do pay half the monthly fee for your space at the parking structure a couple blocks down the street.

You have to commute to work, which means you might get stuck in traffic.

Your space at the parking structure has a pillar in it.

That couple blocks is a long way to walk.

Your company believes in an “Open Office” environment. That means you work at a long fold out table in an old warehouse. The good news is that there are no cubes so you can see Ted clipping his finger nails. Also, you’re elbows are constantly bumping into Bills elbows who sits immediately to your right. You don’t bump into anyone on the left, because on your left is the wall and you’re just squished against it all day.

I think that sums it up? Feel free to drop your own Pro/Cons in the comments.

Chassis.io uses Vagrant and VirtualBox to setup a Virtual Machine that hosts your WordPress site. This post covers how you can connect to your WordPress database that exists on that Virtual Machine. I’ll be using Windows and HeidiSQL for the purpose of this post. The connection information I use in this post comes from this GitHub issue.

Connecting with HeidiSQL

HeidiSQL is my favorite query browser for MySQL and MariaDB databases. I like the layout and the interface is nice and clean.

When you first open HeidiSQL you will see the interface for creating a new Database connection.
Choose whichever name you want to help you remember what this connection is for. I’ve named mine “Chassis” because it’s my connection to the database Chassis.io setup. You’ll also want to set the following settings:

Network type: MySQL (SSH tunnel)

Hostname / IP: localhost

User: wordpress

Password: vagrantpassword

Port: 3306

That’s it for the basic settings. Now for the SSH Tunnel settings.

HeidiSQL – Plink.exe and Private Key

HeidiSQL uses a utility called “plink.exe” for it’s SSH capabilities. plink.exe is made by the same author who wrote PuTTY (which I’m sure you’ve heard of). If you haven’t got plink.exe downloaded you can find the latest exe on this page. You’ll want to grab both plink.exe and puttygen.exe. I stuck both utilities inside a “PuTTY” folder in my Program Files (x86) directory. You can stick them wherever you want to.

Ok, before we setup the SSH Tunnel settings we are going to want to setup the Private key file that plink.exe will use to communicate with your Virtual Machine. PuTTY utilities use specific private key files called .ppk files. We are going to want to convert the Vagrant provided private key file to a .ppk file for use by plink.exe. Luckily, the puttygen.exe utility you downloaded makes this conversion simple.

Launch puttygen.exe. This will launch the “PuTTY Key Generator”. Load in the Vagrant provided private key file by using File > Load Private Key. Navigate to the location of your Vagrant private key file. Mine was located in C:\projects\chassis\.vagrant\machines\default\virtualbox. Your location may be different depending on where your Chassis project is. Find the “private_key” file and open that. The PuTTY Key Generator will take care of loading the key in for you. You should see a “Successfully imported foreign key …” message. Now click “Save private key”, choose a name for it, and save it. I just saved it exactly where the other private_key was.

Location of the “Save private key” button

Woot! Now we can fill out the HeidiSQL SSH tunnel settings. Remember where you saved that .ppk file because you’ll need it for this next step.

HeidiSQL – SSH Tunnel Settings

Click on the tab for “SSH tunnel” to access the HeidiSQL Session Manager SSH Tunnel settings.

HeidiSQL SSH Tunnel Settings

Alright, let’s plug in the values!

plink.exe location: Insert the path to your plink.exe utility.

SSH host + port: localhost and 2222

Username: vagrant

Password: just leave this blank

plink.exe timeout: default is fine

Private key file: Path to the .ppk file we created above

Local port: 3307 is fine

Now we come to the moment of truth. Push the “Save” button on the HeidiSQL session manager to save your changes. Now push the “Open” button and HeidiSQL should connect to your Vagrant hosted WordPress database. Woot!

I’m trying out http://chassis.io as a way to easily setup a WordPress development environment on Windows. It’s actually quite easy and everything works almost exactly like the Chassis Get Started guide describes.

However, I ran into a timeout issue when attempting to boot up the Virtual Machine using vagrant up. On first run the process installed necessary dependencies and wired most things up. However, it hung for a considerable amount of time when booting up the virtual machine. Eventually it told me that it had timed out. It didn’t start the virtual machine.

VT-x/AMD-V hardware acceleration is not available on your system

Hrmm… I wonder why it’s timing out. Chassis.io uses Vagrant and VirtualBox. So I spun up VirtualBox to see if I could manually start the VM myself. As it turns out, I could not. VirtualBox threw up the following error:

VT-x/AMD-V hardware acceleration is not available on your system. Your 64-bit guest will fail to detect a 64-bit CPU and will not be able to boot.

This will reboot you into your PC’s UEFI settings which looks a lot like a typical BIOS menu.

Enable Virtualization
Your system may be different. My system had a “Virtualization” setting located under the “Security” tab. Once I located the “Virtualization” setting I noticed that “Intel (R) Virtualization Technology” was indeed set to Disabled. I enabled it, saved the setting, and restarted my machine.

Enable Virtualization via BIOS

After enabling “Virtualization” I tried to start the VirtualBox VM one more time. BOOM. It worked. I ran vagrant up via a ConEmu console and… success.

In Conclusion

Chassis.io is a pretty sweet project. If your system is setup correctly then Chassis.io “just works”. In my case my system needed “Virtualization” enabled via a UEFI Firmware Setting.