Friday, May 23, 2014

OpenStack Devstack: Some Important Commands

Recently attended a training on OpenStack by Mirantis (Trainer: Devin Parrish). Following were some of the useful commands for working on devstack (which installs openstack on Ubuntu 12.04):

create a
export OS_USERNAME=admin
export OS_PASSWORD=password
export OS_TENANT_NAME=demo
export OS_AUTH_URL=

$ source ./
$ cd devstack
$ ./ - This command starts a screen session. You can attach to the screen session with Cntl + A + " and detach from screen session using Cntl + A + D key combination. Within the session use UP/DOWN arrow keys to navigate between the different log files for the different processes in OpenStack like nova scheduler (n-sched), etc.

$ sudo service libvirt-bin status
$ sudo service rabbitmq-server status
$ sudo service rabbitmq-server start
$ sudo rabbitmqctl list_queues
$ nova-manage service list
$ neutron --os-username admin agent-list
$ keystone --os-username admin endpoint-list
$ keystone --os-username admin service-list

$ ps aux | grep nova (similarly, cinder, glance, neutron, keystone, swift, horizon).

$ sudo service /etc/init.d/apache2 reload
$ mysql -uroot -pstack ...

$ neutron subnet-list
$ ip netns list
$ sudo ip netns exec qrouter-xxxxx  
cmd = ping [VM IP] or ssh  [VM IP] or curl http:// [VM IP] or curl http:// [VM IP]

Rest can all be done using horizon UI (as of Havana release).

$ ceilometer alarm-threshold-create --name cpu_high \
--description 'instance running hot' -m cpu_util \
--statistic avg --period 300 --evaluation-periods 3 \
--comparison-operator gt --threshold 80.0 \
--alarm-action 'log://' -q resource_id = [ID of VM]

No comments:

Book notes: Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems, by Martin Kleppmann

My notes from the excellent book on how software has evolved to handle data from hierarchical databases to the NoSQL -  https://www.goodrea...