Howto Code an Cloude Product efficiently

You have to build an product which consist out a couple of components and probably more than one system. Even your development environment needs more than one system to work properly. To write efficiently code under such hard circumstances is really hard.

And there are a some other facts which makes your coding-live much more unfunctional like a not working VPN or bad internet connection while traveling in the train.

I’ve found an way which works quite well for me.

I’m using my notebook with eclipse and Parallels Virtualisation. On my Notebook i have all the databases running (MySQL and CouchDB). I’m coding directly in eclipse and all changes are transfered automatically to all running virtual machines on my laptop. For that i’ve configured the rsync daemon on my osx:

/etc/rsyncd.conf

[SomeName]

        comment = public archive

        path = /Users/tspycher/Documents/Projects/xyz 

        read only = yes 

        list = yes

        uid = tspycher

        gid = staff 

        hosts allow = 10.211.0.0/16

the “hosts allow” settings makes sure, that only the local vm’s can access this rsync module. After creating the config file you just have to start the rsync daemon by invoking

rsync —daemon

. To make the whole system more secure you could bind the rsync daemon to the virtualisation network device.

On the remote systems i’ve created an service script which periodically transfers all changes to the local system. Here the script for ubuntu upstart:

/etc/init/devsync.conf

script

    while [ 1 ]; do rsync --exclude '.svn' --delete -avz tspycher@10.211.55.2::SomeName/service /opt/xyz && sleep 5; done   

end script

After starting the little dirty service with

servcie devsync start

the systems are in sync. And finally i just create sym links the needed files and folders from its synced location to the correct location.

This Setup allows me to code very efficiently on more than one system.

Tagged: , , ,

Getting in contact with OpenStack

Till now, i was only able to deploy some vm’s on my MacMini Server with VMware Fusion on it. This worked oukay so far… Due to the mac mini is reaching its second birthday, it does not power vm’s very well. Also to keep the vm powered on, i need always stay logged in with the user and of course the management is only possible trough vnc directly on the server.

That was the reason for me to rent some virtual machines by rackspacecloud.com. Seriously, rackspacecloud is impressive! But keeping two or more vm’s up and running for more than a month is a really expensive playground! Moving to Amazon’s EC2 wasn’t an option too. So i decided to buy a extreme low-end cheap virutalisation capable server. After some research (Hardware should be compatible with ESXi in case of whatever) i’ve build the following server for me:

Case: Asus Vintage V8-P8H67E, Intel H67, Socket 1155, USB 3.0 (about 170$)

CPU: Intel Core i5 2500 BOX, 3.3GHz, LGA 1155, 4C/4T (about 200$)

RAM: Kingston ValueRAM, 3×4 GB, DDR3-1333, CL9 (about 60$)

Raid (optional): Adaptec RAID 2405, 4-Channel SAS/SATA, low profile (about 200$)

Additional Network: Intel PWLA8391GTBLK Pro 1000GT Gigabit Adapter PCI, Bulk (about 30$)

VLAN Gigabit Switch: HP ProCurve Switch V1810G-8 8 Port 10/100/1000 Mbps, SFP (about 110$)

Harddisk: got some at home

The Result is a Box with 100% Virtualisation Support (vPro, VT-x, VT-d, 64bit), 12GB RAM and small in form and silent too.

In the past i’ve landed several times on openstack.org during some research in automating virtualisation infrastructures. Openstack is a framework for building private clouds. Openstack promises an virtualisation ecosystem with all needed components to build a perfect world. The project looks very mature and there are a lot of partners supporting them. Openstack supports also a wide range of Hypervisors though they’r strongly recommending to use KVM for virtualistion. I will give the project a try…

 

Tagged: , , , , , ,