Posts

Showing posts from October, 2015

Setting up OpenStack python SDK on Oracle Enterprise Linux 6

To setup openstacksdk on Oracle VM Server 3.3.3 or Oracle Enterprise Linux 6:

Oracle Enterprise Linux 6 comes with python 2.6.6 by default.

OpenStackSDK requires at least python 2.7 or 3.3.

Following are the steps to upgrade local python to 2.7.10 and 3.5.0 (the latest as of this writing) and install openstacksdk for development.

It is assumed that OpenStack is hosted on the same host where the test program is being executed.

$ sudo su - # cd /etc/yum.repos.d # rm -f * # wget http://public-yum.oracle.com/public-yum-ol6.repo # yum clean all # yum makecache # yum install gcc
The above step may take quite some time and is only required to install gcc. If one already has gcc installed then skip to the following step.

# yum groupinstall "Development tools" # yum install zlib-devel bzip2-devel openssl-devel ncurses-devel sqlite-devel readline-devel tk-devel gdbm-devel db4-devel libpcap-devel xz-devel # cd /usr/src # wget https://www.python.org/ftp/python/2.7.10/Python-2.7.10.tgz # wget https:…

Integrating Morphia and Dropwizard

Recently i had the pleasure of using mongodb's document object mapper framework morphia and the REST webservice framework dropwizard (well it is more than simply for REST but that is the primary purpose of it).

Dropwizard comes with the following essential thirdparty libraries:

Jackson - for JSON parsingJetty - as embedded light weight Java EE web containerJersey - JAX-RS 2.0 implementationand some more...  Morphia has annotations for POJO model classes that can be persisted in mongodb and is a nice framework that simplifies the development of a mongodb client application. At the same time we can use the same POJO model classes for REST endpoint implementations as well. So there is no need to have separate DTO and entity classes. The same POJO model classes are annotated as entities (using morphia's annotations) and as DTO (using Jackson's annotations).
A simple example for such a model class is given below:

@Entity(value = "students" , noClassnameStored = true, c…

Using VNC with Ubuntu on VirtualBox

Create an Ubuntu 64 bit VM on VirtualBox with following specs:CPU - 1Memory - 1GBHDD - 20GB (VDI, Dynamic allocation)Network - NAT with Port forwarding - TCP, 5900 (on local host) forwarded to 5900 (on VM)Download Ubuntu desktop 15.04 and install it on the VM.Once installation completes, search for Desktop Sharing applet. Enable sharing, provide password.Now launch a VNC viewer and specify the IP of the parent host on which VirtualBox is installed with port 5900.If connecting from same host where virtual box is installed then you may use localhost:5900. It will prompt for password then connect.