DevStack in 1 Minute

来源:互联网 发布:tensorflow c api 编辑:程序博客网 时间:2024/06/05 19:20

DevStack in 1 minute! Ready, steady, GO!

Install it:

123456789
root@devstack:~# git clone https://github.com/openstack-dev/devstack.gitroot@devstack:~# cd devstack && ./stack.sh......WAIT WITH COFFEE......root@devstack:~# su - stackstack@devstack:~$ cd devstack/

Almost ready to start, by default DevStack installs 2 mains users:

  • admin
  • demo

This is how you use the credentials of the user demo:

1
stack@devstack:~/devstack$ source openrc

This is how you use the credentials of the user admin:

1
stack@devstack:~/devstack$ source openrc admin admin

To go back to the user demo simply do:

1
stack@devstack:~/devstack$ source openrc demo demo

Here you go!

Now you can start to use devstack:

12345
stack@devstack:~/devstack$ nova list+----+------+--------+------------+-------------+----------+| ID | Name | Status | Task State | Power State | Networks |+----+------+--------+------------+-------------+----------++----+------+--------+------------+-------------+----------+

If you want to interact with the services, just remember that DevStack doesn’t use any script init (upstart or service don’t exist). It simply runs the services in a standalone mode (foreground running daemon). To bring up all the services DevStack uses a big parent screen where it encapsulates child screens. This how to access them:

1
stack@devstack:~/devstack$ ./rejoin-stack.sh

The good old screen -x <screen-name> works just fine too.

How to navigate through the child screens? Tip ctrl + a + " inside the parent one, you’ll get the general overview:

Num Name                                                                                                                                                                                              Flags  0 shell                                                                                                                                                                                                 $  1 key                                                                                                                                                                                                   $  2 horizon                                                                                                                                                                                               $  3 g-reg                                                                                                                                                                                                 $  4 g-api                                                                                                                                                                                                 $  5 n-api                                                                                                                                                                                                 $  6 n-cond                                                                                                                                                                                                $  7 n-cpu                                                                                                                                                                                                 $  8 n-crt                                                                                                                                                                                                 $  9 n-net                                                                                                                                                                                                 $ 10 n-sch                                                                                                                                                                                                 $ 11 n-novnc                                                                                                                                                                                               $ 12 n-xvnc                                                                                                                                                                                                $ 13 n-cauth                                                                                                                                                                                               $ 14 n-obj                                                                                                                                                                                                 $ 15 c-api                                                                                                                                                                                                 $ 16 c-sch                                                                                                                                                                                                 $ 17 c-vol 0$ shell  1$ key  2$ horizon  3$ g-reg  4$ g-api  5$ n-api  6$ n-cond  7$ n-cpu  8$ n-crt  9$ n-net  10$ n-sch  11$ n-novnc  12$ n-xvnc  13$ n-cauth  14$ n-obj  15$ c-api  16-$ c-sch   17$ c-vol*  (devs

Select one and press enter to get into one child screen. If you want to change the behavior of a daemon, let’s say nova-api, just modify your nova.conf then kill the process in the child n-api with ctrl + c, re-run it (last command) and you’re good.

Other commands like ctrl + a + p (previous) child or n (next child work great too!)

Finally this how to detach the screen ctrl + a + d.

Bonus

As requested, here’s a simple localrc file with the support of Neutron (new code name for Quantum) and all the main projects:

# MiscDATABASE_PASSWORD=passwordADMIN_PASSWORD=passwordSERVICE_PASSWORD=passwordSERVICE_TOKEN=passwordRABBIT_PASSWORD=password# Enable LoggingLOGFILE=/opt/stack/logs/stack.sh.logVERBOSE=TrueLOG_COLOR=TrueSCREEN_LOGDIR=/opt/stack/logs# Pre-requisiteENABLED_SERVICES=rabbit,mysql,key# Horizon (always use the trunk)ENABLED_SERVICES+=,horizonHORIZON_REPO=https://github.com/openstack/horizonHORIZON_BRANCH=master# NovaENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-schIMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"# GlanceENABLED_SERVICES+=,g-api,g-reg# NeutronENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron# CinderENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch
转载自:http://www.sebastien-han.fr/blog/2013/08/08/devstack-in-1-minute/
0 0
原创粉丝点击