Testing Openstack with Ansible and all-in-one install on Hyper-V

I installed Openstack recently in order to get my head around some aspects. I used my desktop (16GB RAM, decent chunk of SSD & i7-2600 @ 3.4GHz).

After looking at the 50 ways to install Openstack, I went with the developer ansible automation. Installation proceeded as follows.

Install Deployment Host

This contains the ansible configuration and drives the process.

  1. Install Ubuntu as per requirements
    1. Installed 14.04 (yes, it’s old. They may fix that soon.)
    2. apt-get install aptitude build-essential git ntp ntpdate \
        openssh-server python-dev sudo
    3. git clone -b stable/mitaka \
        https://github.com/openstack/openstack-ansible.git \
        /opt/openstack-ansible
      
      scripts/bootstrap-ansible.sh

Networking assignments

Network IP Range VLAN
Host management 10.2.0.0/24
Container Management Network 172.29.236.0/22 10
Tunnel (VXLAN) Network 172.29.240.0/22 20
Storage Network 172.29.244.0/22 11

 

My numbering was

Host Host mgmt Container mgmt Tunnel Storage
deploy 10.2.0.40 172.29.236.1    
Node1 10.2.0.50 172.29.236.101 172.29.240.101 172.29.244.101

 

Making Hyper-V connect up VLAN trunks that are run as bonded Ethernets

Hyper-v manager can’t set trunk mode on adapters so doing this with powershell run as administrator

Get-VM Deployment | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList 1-100 -NativeVlanId 0
Get-VM Node1 | Set-VMNetworkAdapterVlan -Trunk -AllowedVlanIdList 1-100 -NativeVlanId 0

Note – the NativeVlanId 0 is required to bridge this into the untagged management domain for the external network.

Also need to configure (Network Adapter | Advanced Features | MAC Address) to enable mac address spoofing (which the active/backup bonding will do)

 

Install Target Host

As per the docs and above. Could be improved by using MAAS but I won’t go there yet.

 

Configure networking

http://docs.openstack.org/developer/openstack-ansible/mitaka/install-guide/targethosts-networkrefarch.html

Did this by hand, but probably able to be skipped now that the ansible stuff generates this?

 

Deployment configuration questions – while configuring the yml and friends

 

Aged APT repo & keys… and figuring out that

Initially AOI failed in deployment due to untrusted packages; like a fool I tried hand-deploying the broken ones

apt-get install libasan0 libatomic1 libgomp1 libitm1 libc-dev-bin \
  linux-libc-dev libc6-dev libexpat1-dev libpython2.7-dev \
  libquadmath0 libtsan0 python3-libapparmor python3-pkg-resources \
  python3-apparmor apparmor-utils binutils cpp-4.8 libgcc-4.8-dev \
  gcc-4.8 libstdc++-4.8-dev g++-4.8 libdpkg-perl dpkg-dev \
  python2.7-dev python-software-properties

Running openstack-ansible setup-hosts.yml didn’t get me much further – failed again with security hardening – postfix install – so added added a no-authenticate in the yml files; not the right place though.

Stopped, thought, learnt and instead tried

apt-key update
apt-get update

Which (after agreeing to a key update from recollection) resolved the issues

Continuing on to manually run playbooks

openstack-ansible setup-hosts.yml
openstack-ansible setup-infrastructure.yml

Note the formating of the output of Ansible running the playbooks – should be no errors.

Confirmed with

ansible galera_container -m shell -a \
   "mysql -h localhost -e 'show status like \"%wsrep_cluster_%\";'"

Then finally installing openstack

openstack-ansible setup-openstack.yml

 

Wait something like an hour

It’s up!

Login at https://10.2.0.50/ with admin / 5f915721a645bf38735ff099

Everything appeared to be running – but for Cinder volume block storage is down, probably because I my just have skipped some necessary LVM prep steps.

Posted in IT

Testing glusterfs on centos

Following along the CentOS howto using Centos 7.2

Just a couple of things have changed since it was written:

  1. As per the CentOS storage special interest group, you can now get the glusterfs packages without using wget to retrieve additional repos:
    yum install centos-release-gluster
    
    yum install glusterfs-server samba
  2. Evidently xfs filesystems should be formatted to inode size 512 bytes, not 256.
  3. If you want to delete a volume immediately after creating, you’ll need some incantations to re-use the bricks without re-formating them.

Along the way I asked myself the following questions

  1. Should each of the physical disks be surfaced as a separate volume group and allocated within a single logical volume using 100% of the VG? Allocating 100% prevents using LVM snapshots, but why would you ever want to do that (or is that a building block for GlusterFS snapshots?)  Is there something that could be done to use HSM and LVM to balance blocks on each node?
  2. What is the best filesystem for the bricks? XFS is the default. As above, it should be formatted with 512 byte inodes.
  3. What should the network segmentation and firewall zone configuration be?
  4. What brick layout, replica setting and stripe setting makes sense? The number of bricks are required to be the product of the number of replicas and stripes.
  5. How to best utilise SSD
    1. Through glusterfs file level tiering in the March gluster / Redhat storage tech preview? This version also allows access to erasure coding, lowering the cost of storage replication.
      1. immediately available in the Centos 7.2 build. BUT… works at the file level, so not so helpful with VMs. However if sharding is turned on, perhaps it works at the shard level?
    2. Through block level management with dm-cache or similar, preferably integrated to LVM?
    3. Through hardware RAID controller?
Posted in IT

Cropping multiple images with Gimp and script-fu

I recently had a series of video screenshots from a Gotomeeting screencapture. The presenter screen had resolution 1366×768; the meeting organiser 1920×1080.

The result was that all the images were surrounded with a black border. In turning the screencapture into a set of stills to represent as narrated video, I used the following in Gimp

  • Start Gimp and enter Filters | Script-fu | Console
  • In the console that comes up, paste the following to define the batch-resize function
(define (batch-resize pattern
                      new-width
                      new-height
                      offx
                      offy)
(let* ((filelist (cadr (file-glob pattern 1))))
 (while (not (null? filelist))
        (let* ((filename (car filelist))
        (image (car (gimp-file-load RUN-NONINTERACTIVE
                                    filename filename)))
        (drawable (car (gimp-image-get-active-layer image))))
        (gimp-layer-resize drawable new-width new-height offx offy)
        (gimp-image-resize-to-layers image)
        (gimp-file-save RUN-NONINTERACTIVE
                        image drawable filename filename)
        (gimp-image-delete image))
        (set! filelist (cdr filelist)))))

  • Then in the same console you can run the following
(batch-resize "/path/to/screenshots/*png" 1366 768 -272 -157)

Note that this was on a windows system – and the format of the filesystem path is still with forward slash. Note also, this will replace existing files with modified versions.

If you want to perform some other form of processing on each file, the key function to replace is (gimp-layer-resize …)

Form more information, see the Script-fu Tutorial or the Gimp scripting manualIT

Posted in IT

The dangers and opportunities of statistical multiplexing gain

image

Evidently Sandringham used to be served by first a house drawn, and then an electric, tram. The horse drawn services were wound up in 1914 as “The cost of keeping horses for these peak [holiday] times led to the demise of the Company’s services”.

Telco profits often stem from statistical multiplexing gains – sell 1000 x 10 Mbps user services, provision only 500 Mbps backhaul. Beware, though, if you have service level obligations in peak periods and have high peak to average demand statistics.

Ref. Rotary Club of Sandringham bus shelter display on Bay Rd.

Home again

 

wpid-20140621_072110.jpg

Somewhat symmetrically… back at southern cross for sunrise. Turns out our fellow passenger from London was also catching the Sandringham line, we meet him again on the platform.

Dolphins! On the bay past Brighton Beach. Good to be home.

Bristol Street Art

Bristol Street Art Tours – although we could have walked the streets of Bristol for free and seen these amazing works, we wouldn’t have had a window into the other world that street artists inhabit.  Our guide opened up the complexity of practicing street art – legality vs illegality, tourism, technical production, attitudes from city authority, impermanence,  the inter-generational conflict, digital archiving and promotion, and international participation in the recent historical context.

I was so good, I didn’t mind it was 12 degrees and raining.

DSC04152 DSC04147 DSC04143 DSC04134 DSC04132 DSC04131 DSC04130 DSC04127 DSC04124 DSC04123 DSC04120 DSC04117

 

Jen-DSC01810

BTW, the guide did cover Banksy, too.

Bristol – Squirrels around Cabot Tower

The squirrels around Cabot tower are obviously hand-fed; they come hunting around to see if you will feed them. In this case, the squirrel wanted to see if the camera was edible. The grey squirrel is an invasive species in the UK; the red squirrel it is displacing was signposted in a number of places in the Lake District (including one notable 20% gradient and squirrel alert sign), but we failed to spot any.

DSC04240

DSC04239

DSC04229

DSC04225

DSC04226

DSC04227

DSC04214

SS Great Britain

The SS Great Britain is one of the first hybrid steam driven screw/sail power iron construction ocean going ships. Built in Bristol in the mid-1800s, it was scuttled in the Falkland Islands in the 1930s. It was then salvaged in the 1970s and returned, with the dry-dock used to construct it retired by receiving the recovered vessel and being converted into a museum conserving the ship.

The most unusual thing I found out from the exhibition, is that the ship was later converted to have a retractable prop to allow pure sail driven locomotion. In the late 1800s they were trying to save money in the cargo freight business by avoiding burning coal!

The displays seem to be dumbed down a little and would be quite accessible to a younger audience, at the cost of drawing you into the engineering details and illustrating Brunel’s mastery.

The olfactory component of the ship kitchen and bakery exhibits was a nice touch.

All in all, a good experience.

DSC04246

DSC04272

DSC04247

DSC04268

DSC04257

Bristol

Transit time from Australia to Bristol via Dubai and Heathrow, courtesy of Metrotrains, Skybus, Qantas and National Express was around 32 hours including all transfers. While Danielle had been around here for a week visiting Ben, I spent only spent two nights in Clifton. Nearby attractions include Cabot Tower, SS Great Britain, and the Brunel Suspension Bridge.

DSC04179

houses in Clifton, Bristol

DSC04202

Bristol panorama from Cabot Tower.

DSC04188

Ducks, in the water labyrinth beneath Cabot Tower

DSC04185

Strawberry clover, beneath Cabot Tower

DSC04180

Meadow inspection, beneath Cabot Tower

Brunel Suspension Bridge.

Brunel Suspension Bridge.

DSC04280

Bristol Railway Station Art Installation – Aluminium on Brick

DSC04282

Bristol Railway Station – Art Installation. We are becoming digitised?

Llangollen

image

Today brought us through wonderful Welsh countryside to Llangollen. The river Dee rushes past the old corn mill, now a pub, and steam trains run on the other side of the river.

The pub celebrates the history of trap shooting.

image