Thursday, June 18, 2015

Lessons on setup DevStack on a single server instance running AWS EC2

These are some lessons which I learned when I was trying out the openstack on the AWS EC2 server instance.

Before one starts, it is a good idea to make sure that one does not run an operational mysql in the server instance. Openstack's controller node requires mariadb, which kinds of replace the default mysql. I encountered several errors on a testing instance in which mysql was installed prior and operating. Installing openstack in this case failed with errors such as "unit mariadb.service failed to load: no such file or directory" when running "sudo service mariadb start" during the "./.stack.sh" execution.

Another important lesson is that one must make sure the server instance is allocated enough memory, openstack requires large amount of memory, AWS EC2 instance such as t1.micro instance usually is not sufficient to run the DevStack (at least in my case)

If you do not have git instance, run the following commands to install git:

> sudo apt-get update
> sudo apt-get install git

After that, can follow the guidelines from the link here to set up:

Link: http://docs.openstack.org/developer/devstack/

If you want to install devstack in docker container of a sort, can try the dockenstack (https://github.com/ewindisch/dockenstack), my experience with it is that it did not work well for me though.









Wednesday, June 17, 2015

docker on centos 7: are you trying to connect to a tls-enabled daemon without tls

After install docker on centos 7 and try to run a simple docker command such as "sudo docker images", it failes with this error message:

"Get http:///var/run/docker.sock/v1.18/images/json: dial unix /var/run/docker.sock: permission denied. Are you trying to connect to a TLS-enabled daemon without TLS?"

After some trial and error, it appears that centos actually does not launch docker service (not sure something to do with firewall in centos 7), anyway, running the "sudo service docker start" fix the problem.

Install and start docker on centos 7

Nice post on how to install and start docker on centos 7:

Link: http://www.liquidweb.com/kb/how-to-install-docker-on-centos-7/

Deploy spring mvc application in cloud

After login to the cloud computing instance, run either the "uname -a" or "cat /etc/redhat-release" to discuss the linux os version of the instance.

Follows the following link to install and run tomcat server:
http://tecadmin.net/install-tomcat-8-on-centos-rhel-and-ubuntu


If your spring mvc uses MySQL for database backend, follows the following link to install and run mysql:

http://www.rackspace.com/knowledge_center/article/installing-mysql-server-on-centos
(for centos 7): https://devops.profitbricks.com/tutorials/install-mysql-on-centos-7/

Once you have the environment setup, follow the link below to deploy your Spring MVC framework into the cloud computing instance:

link: http://www.mkyong.com/maven/how-to-deploy-maven-based-war-file-to-tomcat/


Check Linux OS version of a cloud computing instance

To list the linux kernel version, etc, run:

> uname -a

If the os is redhat family, run:

> cat /etc/redhat-release