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 credrc.sh:
export OS_USERNAME=admin
export OS_PASSWORD=password
export OS_TENANT_NAME=demo
export OS_AUTH_URL=http://10.24.51.182:35357/v2.0/
$ source ./credrc.sh
$ cd devstack
$ ./rejoin_stack.sh - 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
where,
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]
create a credrc.sh:
export OS_USERNAME=admin
export OS_PASSWORD=password
export OS_TENANT_NAME=demo
export OS_AUTH_URL=http://10.24.51.182:35357/v2.0/
$ source ./credrc.sh
$ cd devstack
$ ./rejoin_stack.sh - 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
where,
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:
Post a Comment