Skip to content

Instantly share code, notes, and snippets.

@jasonberanek
jasonberanek / network_connect_errors.go
Created August 14, 2014 10:20
Go code used to investigate message across platforms for connecting to an address that is unavailable
import (
"log"
"net"
"syscall"
"time"
)
func main() {
address := "127.0.0.1:5901"
log.Printf("Trying address: %s...", address)
@jasonberanek
jasonberanek / overview.md
Last active October 18, 2017 03:01
Application Transparency Reference from 3 April 2014 Agile Happy Hour Lean Coffee Session

Application/System Transparency

Jason Beranek - @jasonberanek

“Transparency refers to the qualities that allow operators, developers, and business sponsors to gain understanding of the system’s historical trends, present conditions, instantaneous state, and future projections. Transparent systems communicate, and in communicating, they train their attendant humans.”

Nygard, Michael T. (2012-11-05). Release It!: Design and Deploy Production-Ready Software (Pragmatic Programmers) (Kindle Locations 4239-4242). Pragmatic Bookshelf. Kindle Edition.

Why?

Transparency and its supporting technologies are necessary to make smart decisions:

  • Fuels understanding of system behavior
@jasonberanek
jasonberanek / notes.md
Created October 9, 2013 11:43
Agile Meetup Discussion Notes

I mentioned a slide deck by Stephen Nelsen-Smith making rounds on Twitter talking about "How NOT to do Devops". Worth walking through the slides, as some of the discussions relate to real pitfalls of agile adoption as well: https://speakerdeck.com/atalanta/how-not-to-do-devops.

Also mentioned some virtualization/development stuff worth checking out. First, if you are not using Vagrant (http://vagrantup.com), you should be. Vagrant allows you to setup base VMs and setup scripts to get a developer workstation up and running more quickly, and also allows you to quickly iterate on building configuration management scripts. See these slides from the creator, Mitchell Hashimoto, about this very subject: https://speakerdeck.com/mitchellh/develop-and-test-configuration-management-scripts-with-vagrant.

Lastly, if folks are interested in automating base VM builds, Mitchell Hashimoto recently release Packer (http://packer.io), which helps create automation around their construction for multiple platforms. Packer is a

@jasonberanek
jasonberanek / gist:6575829
Created September 16, 2013 01:37
Log file seen when Vagrant post-processor fails per hashicorp/packer#413
2013/09/15 20:30:38 Packer Version: 0.3.7
2013/09/15 20:30:38 Packer Target OS/Arch: darwin amd64
2013/09/15 20:30:38 Detected home directory from env var: /Users/jberanek
2013/09/15 20:30:38 Attempting to open config file: /Users/jberanek/.packerconfig
2013/09/15 20:30:38 File doesn't exist, but doesn't need to. Ignoring.
2013/09/15 20:30:38 Packer config: &{PluginMinPort:0 PluginMaxPort:0 Builders:map[amazon-ebs:packer-builder-amazon-ebs amazon-chroot:packer-builder-amazon-chroot amazon-instance:packer-builder-amazon-instance digitalocean:packer-builder-digitalocean openstack:packer-builder-openstack virtualbox:packer-builder-virtualbox vmware:packer-builder-vmware] Commands:map[build:packer-command-build fix:packer-command-fix inspect:packer-command-inspect validate:packer-command-validate] PostProcessors:map[vagrant:packer-post-processor-vagrant] Provisioners:map[chef-solo:packer-provisioner-chef-solo file:packer-provisioner-file puppet-masterless:packer-provisioner-puppet-masterless shell:packer-provis
@jasonberanek
jasonberanek / README.md
Last active January 29, 2018 18:59
Enabling VNC support in the VMware ESXi 5.x Firewall

VMware ESXi includes a built in VNC server that can be used to access a VMs console for manipulation via automated tools (e.g., veewee) or by users on platforms where the vSphere Client is not supported. In ESXi 5.x, the built-in firewall does not allow VNC traffic to be received by the VNC server, even when an individual VM is configured to support this configuration. To complete this activity, the firewall has to be modified to allow the appropriate ports.

The below script can be run via the ESXi command line to setup the firewall rules necessary to run VNC. A few items to note:

  • Scripts assumes the firewall rules file is the default provided as by 5.0.0 update 2 build 914586 and/or 5.1.0 build 799733 (may work in other versions)
  • In order to persist settings after a reboot, it is necessary to copy the firewall settings to either a specific datastore mapped to the host, or the local persistent storage linked under the /store directory. Further, the either the /etc/rc.local (ESXi 5.0) or `/etc/rc.local
@jasonberanek
jasonberanek / iso_boot.md
Created October 9, 2012 03:10
ISO Boot in vSphere Veewee Provider

ISO Boot to Remote vSphere Server

Example Veewee definitions utilize ISOs (either full or network install) to initiate the operating system installation. This is straightforward on a local workstation, but requires additional work on remote hypervisors.

Note: The below approach has been tested using CentOS net boot ISOs to execute the installation.

Approach

My approach involved uploading the ISOs to a datastore visible to the target vSphere API endpoint, attaching the ISO as a CD/DVD device to the VM during the create portion of a build, and utilize VNC to issue the boot command.

ISO Upload