Friday, May 16, 2014

Devstack installation

1) Why I need Devstack :

   Being new to openstack and wanting to contribute to one of our company openstack/opensource project Jumpgate ..lead me to conclude that to even make sense of the issues posted on Jumpgate is first need to see how openstack works .not sure if i mentioned earlier but i am a visual-kind of person ..i prefer tools with GUIs and learn by seeing and i love designing/creating/improving UIs  for the same reason.

anyways so after reading all about openstack and its  major components I thought it might be time to  see it in action ..

If you have not yet gone through the basics ..i would reccommend you do that

there are many resources .. search online by "new to openstack" "learn openstack" e.t.c
sad thing is there are too many :)
here are some i can provide
http://en.wikipedia.org/wiki/OpenStack
http://ilearnstack.com/2013/04/23/introduction-to-openstack-2/
https://wiki.openstack.org/wiki/Main_Page



after these links i guess you might be ready to see how exactly it works ..

I started out by installing nova and jumpgate ( since this is the project i was interested in contributing to )  using these instructions :-
http://bodenr.blogspot.com/2014/03/managing-openstack-softlayer-resources.html


but Jumpgate is still in progress .. many things are not ready .. to make sense of the issues/errors thrown e.t.c i first needed to see a working model .. hence the devstack installation made sense .. since using that i will be able to see how its supposed to work !!!

for devstack installation i went with these instructions :

sudo apt-get update
sudo apt-get install git
git clone https://github.com/openstack-dev/devstack.git
cd devstack
cp samples/local.conf  local.conf
./stack.sh
 
now watch out for password prompting ( I left them all blank :)) 

I ran into several issues in these simple steps ..
1) don't run it as root ..it will create problems 
2) if you run into permissions issue :- 
 log in as the stack user and run ./stack.sh 
  To do so, I had to call
  sudo visudo
  and add
  stack ALL=(ALL) NOPASSWD: ALL
  to the file. Then rerun stack.sh as stack and its working.
3) if you get any curl problems like this Curl SSL Certification error then 
   upgrade curl 
   there are some version of curl and devstack which are not compatible with each other
    mine was curl 7.22
 
4)  then i ran into "keystone did not start"
    what solved the problem was reboot the machine and run it again
    cd devstack/ 
    ./unstack.sh
    ./clean.sh
    ./stack.sh 
 
 
 



some links i followed are:- 
http://devstack.org/
https://ask.openstack.org/en/questions/
http://sayalilunkad.github.io/posts/Devstack/
 
For using devstack from here on (after installation succeeds ..) ...look out for next post
.
 


 
 

Wednesday, May 7, 2014

when NXclient refuses to connect (love from windows to ubuntu)

So while i was busy installing devstack and vncserver .. the NXMachine felt left out..

for some reason the connection was reset and now whenever i would try to connect to my ubunut dekstop ..it would refuse in various forms like ( connection time out . connection was reset by peer.  or jsut blank screen hand up )


root@njain2:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 12.04.4 LTS
Release:        12.04
Codename:       precise

--for connection reset by pee
    removing caches from /usr..nx worked

-- for  connection with server was slot
 Error 134: Protocol error
this worked:-
1) remove /tmp/*  rm -rf /tmp/*
2) restart and make sure /tmp/ exist
sudo /etc/init.d/nxserver restart
Xvfb :0 -auth ~/Xvfb-0.auth -screen 0 1024x768x24 &
DISPLAY=:0 nohup /etc/X11/Xsession gnome-session &






in general if nothing works try 


 

remove and reinstall and restart
 sudo dpkg -r nomachine
 sudo dpkg --purge  nomachine
 rm -rf /etc/NX/

  wget http://download.nomachine.com/download/4.2/Linux/nomachine_4.2.27_1_amd64.deb
 sudo dpkg -i /root/Downloads/nomachine_4.2.25_1_amd64.deb

sudo /etc/init.d/nxserver status
sudo /etc/init.d/nxserver restart



for headless server:-
sudo apt-get install xvfb
COOKIE=`ps -ef | md5sum | cut -f 1 -d " "`
xauth -f ~/Xvfb-0.auth add :0 MIT-MAGIC-COOKIE-1 $COOKIE
xauth add :0 MIT-MAGIC-COOKIE-1 $COOKIE
Xvfb :0 -auth ~/Xvfb-0.auth -screen 0 1024x768x24 &
DISPLAY=:0 nohup /etc/X11/Xsession gnome-session &





the links used for above history were

https://www.nomachine.com/AR10K00710
http://www.humans-enabled.com/2012/04/how-to-install-freenx-server-on-ubuntu.html
https://www.nomachine.com/DT09K00056
http://ubuntuforums.org/showthread.php?t=1238554

good luck! i know its frustrating to get stuck ..when things break randomly

Tuesday, May 6, 2014

getting started ...

Have been thinking of starting a work blog since-ever.
Here is the first post.


After almost a decade of c,c++ programming my new work gives me the opportunity to learn the new stuff around .. as much as i liked developing in c,c++ (and briefly tcl-tk) ..the change is like welcoming fresh breeze ( more like a strong sand storm actually since i often get lost in it :)

I expect comparisions of the new/old technologies i have experienced first hand too..as we go along.

Today is about the new stuff :-
1) New language :- Python ..interesting, easy to pickup, lots of online resources and awesome IDE(pycharm) and tools e.t.c

2) New version control :- I started work with cvs in my first job  ... often ran into problems with it ..second place got me started into svn .. which was very easy to transition from cvs and i feel i had a better experience working with it ..as opposed to cvs ( dont remember the reasons ..if i had blogged about my issues with version control when i ran into problems with them ....we would have known..anyways there is always a chance to start) new work exposed me to git.
Its supposed to be the hottest version control .. looks cool but is not as easy to transition as was my previous transition ..but as is the case with most version controls .. you only have to do those things 1-2 times and then its like learning to ride a bike ( once you know it .. you remember the basics forever) .. hope that is the case with git also .. hoping once i learn this stuff it will get easier .. i am developing a cheatsheet for svn developers to move into git .. when its ready will post it so that others have a easier time transitioning

3) Domain: -so far the transition looks like :- EDA ( electronic design automation) to Internet security to cloud solutions!

more on the domains .. some other time 

Getting started in cloud

Getting started  in cloud &devstack


my steps :- 
1) order a cloud computing instance from softlayer
2) make sure you have enough memory and latest ubuntu (i ran into problems with 10:04 Devstack did not like it and did not work with it well :( learned it the hardway)
**to check what ubunut version running  
lsb_release -a
 
3) wait ...
4) once you get the IP and credentials
5) putty into it
6) change password 'sudo passwd'
7) Now this is headless and as i mentioned i love visuals in computing ..
8) i followed these steps to get vnsserver running and then view it with tighvncviewer
   https://t3n.zendesk.com/entries/20646106-Steps-to-Install-a-Headless-GNOME-GUI-Desktop-on-Ubuntu-Server-and-Then-Remote-Control-Server-Deskto

if connection breaks and you have to run it again
 rm -rf /tmp/.X*
vncserver

if you see loopback error that means you need to enable loopback on tightvnc configuration 
refer http://pocketcloudsupport.wyse.com/entries/21263056-Error-message-VNC-authentication-failed-loopback-connections-are-not-enabled-
restart tightvncserver 
startt putty session 
start vncserver there 
note the port 
change settings of the putty session and add  ssh tunnel with that port 
connect with vncviewer

9) you could also do nxclient using these steps
1        aptg-get Ubuntu-dekstop is needed for head less
2       Started nxserver on it and then connect by nxclient
3        Follow these directions https://www.nomachine.com/AR10K00710 by sshing into your Ubuntu 



1  10) i feel that vnc --gives better resolution than nx but the connection is not as stable as nx  :( .. so none of them come out as a clear winner 


1  11 )  Devstack installation :- i am still struggling with this part .. i have been fighting with various errors..probably should be a blog by itself ..
http://blog.felipe-alfaro.com/2014/02/03/openstack-with-devstack-in-ubuntu/