DevStack in 1 Minute

本文介绍了一种在1分钟内快速部署OpenStack开发环境DevStack的方法。通过简单的步骤即可安装并配置DevStack,同时提供了使用默认用户admin和demo的认证方式,以及如何与DevStack中的各个服务进行交互。

DevStack in 1 minute! Ready, steady, GO!

Install it:

1
2
3
4
5
6
7
8
9
root@devstack:~# git clone https://github.com/openstack-dev/devstack.git
root@devstack:~# cd devstack && ./stack.sh
...
...
WAIT WITH COFFEE
...
...
root@devstack:~# su - stack
stack@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:

1
2
3
4
5
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:

# Misc
DATABASE_PASSWORD=password
ADMIN_PASSWORD=password
SERVICE_PASSWORD=password
SERVICE_TOKEN=password
RABBIT_PASSWORD=password

# Enable Logging

LOGFILE=/opt/stack/logs/stack.sh.log
VERBOSE=True
LOG_COLOR=True
SCREEN_LOGDIR=/opt/stack/logs

# Pre-requisite
ENABLED_SERVICES=rabbit,mysql,key

# Horizon (always use the trunk)
ENABLED_SERVICES+=,horizon
HORIZON_REPO=https://github.com/openstack/horizon
HORIZON_BRANCH=master

# Nova
ENABLED_SERVICES+=,n-api,n-crt,n-obj,n-cpu,n-cond,n-sch
IMAGE_URLS+=",https://launchpad.net/cirros/trunk/0.3.0/+download/cirros-0.3.0-x86_64-disk.img"

# Glance
ENABLED_SERVICES+=,g-api,g-reg

# Neutron
ENABLED_SERVICES+=,q-svc,q-agt,q-dhcp,q-l3,q-meta,neutron

# Cinder
ENABLED_SERVICES+=,cinder,c-api,c-vol,c-sch
转载自:http://www.sebastien-han.fr/blog/2013/08/08/devstack-in-1-minute/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值