Thursday, October 23, 2014

How to properly setup your DNS with using Elastic Beanstalk

If you ever want to be able to swap environments easily (for zero downtime deployments) you need to get your DNS right.

Suppose you have the website and

Route 53 you need to have the following setup: (A Record) w/ special Amazon Alias to is an A record with Alias to your load balancer -->

Sunday, October 5, 2014

How to get Dell PERC H310 Monitoring on Ubuntu

HWRaid is probably the best set of packages for Ubuntu:


sudo add-apt-repository "deb lucid main"
wget -O - | sudo apt-key add -

apt-get update
apt-get install megactl


Enabling WMI on Windows Azure

To enable WMI on Windows Azure machines:
  • Open the firewall port 135
  • Set WMI to use a static port
Step one:  Set the DCOM config to use a static port....
Basically, run "dcomcnfg" from command prompt. Navigate the tree to My Computer > DCOM Config > Windows Management and Instrumentation, select properties of that folder.
Go to the Endpoints tab
Select Properties button for Connection-oriented TCP/IP
Use static endpoint, set the port.
Step 2:  Configure WMI to use a fixed port
  1. At the command prompt, type winmgmt -standalonehost
  2. Stop the WMI service by typing the command net stop "Windows Management Instrumentation"
  3. Restart the WMI service again in a new service host by typing net start "Windows Management Instrumentation"
  4. Establish a new port number for the WMI service by typing netsh firewall add portopening TCP 24158 WMIFixedPort
Still testing this myself, so not 100% certain it works.

49154 - TCP Port for DCOM when using wmic.

winexe -U Administrator%password // "C:\\AutoHotKeyScripts\\debug.exe"

To get winexe working make sure to open port 445 on Azure.

When I got the error
[winexe/winexe.c:120:on_ctrl_pipe_error()] ERROR: Failed to install service winexesvc - NT code 0x00000424
I did the following:

sc create winexesvc binPath= C:\WINDOWS\WINEXESVC.EXE start= auto DisplayName= winexesvc 
sc description winexesvc "Remote command provider for Zenoss monitoring"

Creating virtual machines with KVM

I was pretty confused when I first started creating virtual machines. Between Xen, VirtualBox, VMWare, LXC, Docker there are a ton of technologies for virtualization.

I decided to go with KVM. A library called libvirt helps a lot in creating virtual machines (aka domains). Libvirt has a tool called virsh which is what we will be using.

virsh uses xml files for the configuration of the domains. To create one easily you can use the virt-install command. The files are stored are in /etc/libvirt/qemu/

virt-install \
  --name moloko \
  --vcpus=1 \
  --disk /var/kvm/moloko,size=32 \
  --ram 1024 \
  --graphics vnc,password=password,listen=,port=5910 \
  --accelerate \
  --cdrom /var/kvm/ubuntu-14.04.1-server-amd64.iso \
  --os-type=linux \
  --noautoconsole \
  --boot cdrom,fd,hd,network,menu=on

To delete the domain:

virsh destroy moloko
virsh undefine moloko