设置网络
dns配置设置使用在网卡配置里
root@control:~# vim /etc/network/interfaces
auto lo
iface lo inet loopback
auto br100
iface br100 inet static
address 10.1.200.174
netmask 255.255.255.0
gateway 10.1.200.254
dns-nameservers 10.1.1.2
bridge_ports eth0
bridge_hello 2
bridge_maxage 12
bridge_fd 0
bridge_stp off
安装网桥软件
Openstack的网络是通过linux的bridge和iptables来实现的。
root@control:~#apt-get -y install bridge-utils
重启网卡生效
配置NTP服务器
对于单节点来说,NTP服务器,并不是必须的。如果是多台机器的环境。就需要设置所有的节点,ntp服务指向相同的一个ntp服务器上。
root@control:~#apt-get -y install ntp
编辑 /etc/ntp.conf ,在 server ntp.ubuntu.com 下添加两行
server 127.127.1.0
fudge 127.127.1.0 stratum 10
重启NTP服务
root@control:~#/etc/init.d/ntp restart
设置ISCSI
这是为Nova-volume服务使用的。不过目前nova-volume并不稳定。Folsom版本,将会cinder组件来替代Nova-volume。
root@control#apt-get -y install tgt
nova-compute节点,需要安装ISCSI客户端
root@control#apt-get install -y open-iscsi open-iscsi-utils
安装lvm
root@control#apt-get install lvm2
创建LVM卷,名称为nova-volumes
root@control#pvcreate /dev/sda5
root@control#vgcreate nova-volumes /dev/sda5
安装RabbitMQ和Memcache等
RabbitMQ是用来做调度使用,Memcache是给Dashboard使用。
root@control#apt-get install -y rabbitmq-server memcached python-memcache kvm libvirt-bin curl
安装配置mysql
在Openstack组件里,Nova,Keystone,Glance, 都需要用到数据库,所以我们需要创建相关的数据库和用户。
root@control#apt-get install -y mysql-server python-mysqldb
编辑/etc/mysql/my.cnf, 允许网络访问mysql
bind-address = 0.0.0.0
重启mysql服务
root@control#service mysql restart
创建openstack需要的相关库:nova,glance,keystone三个库。
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'nova'@'%' IDENTIFIED BY 'my_password';
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glance'@'%' IDENTIFIED BY 'my_password';
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystone'@'%'IDENTIFIED BY 'my_password';
FLUSH PRIVILEGES;
安装配置keystone
Keystone是Openstack的核心,所有的组件,都需要通过keystone进行认证和授权。
安装keystone
root@control#apt-get install -y keystone python-keystone python-keystoneclient
修改/etc/keystone/keystone.conf配置文件如下
keystone的默认token是ADMIN,这里修改成my_cloud.
默认是采用sqlite连接,需要改成mysql
[DEFAULT]
bind_host = 0.0.0.0
public_port = 5000
admin_port = 35357
admin_token = my_cloud
[sql]
connection = mysql://keystone:my_password@10.1.200.174/keystone
重启keystone服务
root@control#service keystone restart
同步初始化keystone数据库
root@control#keystone-manage db_sync
为了安装keystone方便,提前设置好环境变量,推荐加入/root/.bashrc .
root@control:~# vim env.sh
#!/bin/bash
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=password
export SERVICE_PASSWORD=password
export FIXED_RANGE=10.1.200.0/24
export OS_AUTH_URL="http://10.1.200.174:5000/v2.0/"
export SERVICE_ENDPOINT="http://10.1.200.174:35357/v2.0"
export SERVICE_TOKEN=my_cloud
export MASTER="10.1.200.174"
export OS_NO_CACHE=1
keystone的数据库,需要导入数据和endpoint就是服务的访问地址.
设置users and tenants and services,用脚本设置keystone.sh导入用户信息
#!/bin/bash
#
# Initial data for Keystone using python-keystoneclient
#
# Tenant User Roles
# ------------------------------------------------------------------
# admin admin admin
# service glance admin
# service nova admin, [ResellerAdmin (swift only)]
# service quantum admin # if enabled
# service swift admin # if enabled
# demo admin admin
# demo demo Member, anotherrole
# invisible_to_admin demo Member
#
# Variables set before calling this script:
# SERVICE_TOKEN - aka admin_token in keystone.conf
# SERVICE_ENDPOINT - local Keystone admin endpoint
# SERVICE_TENANT_NAME - name of tenant containing service accounts
# ENABLED_SERVICES - stack.sh's list of services to start
# DEVSTACK_DIR - Top-level DevStack directory
ADMIN_PASSWORD=${ADMIN_PASSWORD:-$OS_PASSWORD}
SERVICE_TENANT_NAME=${SERVICE_TENANT_NAME:-service}
ENABLED_SERVICES="swift"
function get_id () {
echo `$@ | awk '/ id / { print $4 }'`
}
# Tenants
ADMIN_TENANT=$(get_id keystone tenant-create --name=admin)
SERVICE_TENANT=$(get_id keystone tenant-create --name=$SERVICE_TENANT_NAME)
# Users
ADMIN_USER=$(get_id keystone user-create --name=admin \
--pass="$ADMIN_PASSWORD" \
--email=admin@my.com)
# Roles
ADMIN_ROLE=$(get_id keystone role-create --name=admin)
MEMBER_ROLE=$(get_id keystone role-create --name=Member)
KEYSTONEADMIN_ROLE=$(get_id keystone role-create --name=KeystoneAdmin)
KEYSTONESERVICE_ROLE=$(get_id keystone role-create --name=KeystoneServiceAdmin)
# Add Roles to Users in Tenants
keystone user-role-add --user-id $ADMIN_USER --role-id $ADMIN_ROLE --tenant_id $ADMIN_TENANT
# Configure service users/roles
NOVA_USER=$(get_id keystone user-create --name=nova \
--pass="$SERVICE_PASSWORD" \
--tenant_id $SERVICE_TENANT \
--email=nova@my.com)
keystone user-role-add --tenant_id $SERVICE_TENANT \
--user-id $NOVA_USER \
--role-id $ADMIN_ROLE
GLANCE_USER=$(get_id keystone user-create --name=glance \
--pass="$SERVICE_PASSWORD" \
--tenant_id $SERVICE_TENANT \
--email=glance@my.com)
keystone user-role-add --tenant_id $SERVICE_TENANT \
--user-id $GLANCE_USER \
--role-id $ADMIN_ROLE
if [[ "$ENABLED_SERVICES" =~ "swift" ]]; then
SWIFT_USER=$(get_id keystone user-create --name=swift \
--pass="$SERVICE_PASSWORD" \
--tenant_id $SERVICE_TENANT \
--email=swift@my.com)
keystone user-role-add --tenant_id $SERVICE_TENANT \
--user-id $SWIFT_USER \
--role-id $ADMIN_ROLE
RESELLER_ROLE=$(get_id keystone role-create --name=ResellerAdmin)
keystone user-role-add --tenant_id $SERVICE_TENANT \
--user-id $NOVA_USER \
--role-id $RESELLER_ROLE
fi
if [[ "$ENABLED_SERVICES" =~ "quantum" ]]; then
QUANTUM_USER=$(get_id keystone user-create --name=quantum \
--pass="$SERVICE_PASSWORD" \
--tenant_id $SERVICE_TENANT \
--email=quantum@my.com)
keystone user-role-add --tenant_id $SERVICE_TENANT \
--user-id $QUANTUM_USER \
--role-id $ADMIN_ROLE
fi
执行脚本,没有任何输出,则表示正确
设置endpoint服务,使用endpoint.sh脚本
#!/bin/sh
# Author: Martin Gerhard Loschwitz
# (c) 2012 hastexo Professional Services GmbH
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# On Debian-based systems the full text of the Apache version 2.0
# license can be found in `/usr/share/common-licenses/Apache-2.0'.
# MySQL definitions
MYSQL_USER=keystone
MYSQL_DATABASE=keystone
MYSQL_PASSWORD=my_password
MYSQL_HOST=10.1.200.174
MASTER=10.1.200.174
# Keystone definitions
KEYSTONE_REGION=RegionOne
SERVICE_ENDPOINT="http://10.1.200.174:35357/v2.0"
# other definitions
while getopts "u:D:p:m:K:R:E:S:T:vh" opt; do
case $opt in
u)
MYSQL_USER=$OPTARG
;;
D)
MYSQL_DATABASE=$OPTARG
;;
p)
MYSQL_PASSWORD=$OPTARG
;;
m)
MYSQL_HOST=$OPTARG
;;
K)
MASTER=$OPTARG
;;
R)
KEYSTONE_REGION=$OPTARG
;;
E)
export SERVICE_ENDPOINT=$OPTARG
;;
S)
SWIFT_MASTER=$OPTARG
;;
T)
export SERVICE_TOKEN=$OPTARG
;;
v)
set -x
;;
h)
cat <<EOF
Usage: $0 [-m mysql_hostname] [-u mysql_username] [-D mysql_database] [-p mysql_password]
[-K keystone_master ] [ -R keystone_region ] [ -E keystone_endpoint_url ]
[ -S swift_master ] [ -T keystone_token ]
Add -v for verbose mode, -h to display this message.
EOF
exit 0
;;
\?)
echo "Unknown option -$OPTARG" >&2
exit 1
;;
:)
echo "Option -$OPTARG requires an argument" >&2
exit 1
;;
esac
done
if [ -z "$KEYSTONE_REGION" ]; then
echo "Keystone region not set. Please set with -R option or set KEYSTONE_REGION variable." >&2
missing_args="true"
fi
if [ -z "$SERVICE_TOKEN" ]; then
echo "Keystone service token not set. Please set with -T option or set SERVICE_TOKEN variable." >&2
missing_args="true"
fi
if [ -z "$SERVICE_ENDPOINT" ]; then
echo "Keystone service endpoint not set. Please set with -E option or set SERVICE_ENDPOINT variable." >&2
missing_args="true"
fi
if [ -z "$MYSQL_PASSWORD" ]; then
echo "MySQL password not set. Please set with -p option or set MYSQL_PASSWORD variable." >&2
missing_args="true"
fi
if [ -n "$missing_args" ]; then
exit 1
fi
keystone service-create --name nova --type compute --description 'OpenStack Compute Service'
keystone service-create --name volume --type volume --description 'OpenStack Volume Service'
keystone service-create --name glance --type image --description 'OpenStack Image Service'
keystone service-create --name swift --type object-store --description 'OpenStack Storage Service'
keystone service-create --name keystone --type identity --description 'OpenStack Identity'
keystone service-create --name ec2 --type ec2 --description 'OpenStack EC2 service'
create_endpoint () {
case $1 in
compute)
keystone endpoint-create --region $KEYSTONE_REGION --service_id $2 --publicurl 'http://'"$MASTER"':8774/v2/%(tenant_id)s' --adminurl 'http://'"$MASTER"':8774/v2/%(tenant_id)s' --internalurl 'http://'"$MASTER"':8774/v2/%(tenant_id)s'
;;
volume)
keystone endpoint-create --region $KEYSTONE_REGION --service_id $2 --publicurl 'http://'"$MASTER"':8776/v1/%(tenant_id)s' --adminurl 'http://'"$MASTER"':8776/v1/%(tenant_id)s' --internalurl 'http://'"$MASTER"':8776/v1/%(tenant_id)s'
;;
image)
keystone endpoint-create --region $KEYSTONE_REGION --service_id $2 --publicurl 'http://'"$MASTER"':9292/v1' --adminurl 'http://'"$MASTER"':9292/v1' --internalurl 'http://'"$MASTER"':9292/v1'
;;
object-store)
if [ $SWIFT_MASTER ]; then
keystone endpoint-create --region $KEYSTONE_REGION --service_id $2 --publicurl 'http://'"$SWIFT_MASTER"':8080/v1/AUTH_%(tenant_id)s' --adminurl 'http://'"$SWIFT_MASTER"':8080/v1' --internalurl 'http://'"$SWIFT_MASTER"':8080/v1/AUTH_%(tenant_id)s'
else
keystone endpoint-create --region $KEYSTONE_REGION --service_id $2 --publicurl 'http://'"$MASTER"':8080/v1/AUTH_%(tenant_id)s' --adminurl 'http://'"$MASTER"':8080/v1' --internalurl 'http://'"$MASTER"':8080/v1/AUTH_%(tenant_id)s'
fi
;;
identity)
keystone endpoint-create --region $KEYSTONE_REGION --service_id $2 --publicurl 'http://'"$MASTER"':5000/v2.0' --adminurl 'http://'"$MASTER"':35357/v2.0' --internalurl 'http://'"$MASTER"':5000/v2.0'
;;
ec2)
keystone endpoint-create --region $KEYSTONE_REGION --service_id $2 --publicurl 'http://'"$MASTER"':8773/services/Cloud' --adminurl 'http://'"$MASTER"':8773/services/Admin' --internalurl 'http://'"$MASTER"':8773/services/Cloud'
;;
esac
}
for i in compute volume image object-store identity ec2; do
id=`mysql -h "$MYSQL_HOST" -u "$MYSQL_USER" -p"$MYSQL_PASSWORD" "$MYSQL_DATABASE" -ss -e "SELECT id FROM service WHERE type='"$i"';"` || exit 1
create_endpoint $i $id
done
需要注意的是,这个脚本是假设你的glance服务和swift都是安装相同的服务器,如果你的glance在不同的服务器,你需要调整一下endpoint,可以在数据库里调整。
通过下面命令,可以检查keystone的设置是否正确。
root@control:~# keystone tenant-list
+----------------------------------+---------+---------+
| id | name | enabled |
+----------------------------------+---------+---------+
| 7252633197354835ab3cb033d76fd4d3 | service | True |
| 8d41b9145e2c46b28787341d1fa234b5 | admin | True |
+----------------------------------+---------+---------+
root@control:~# keystone user-list
+----------------------------------+--------+---------+---------------+
| id | name | enabled | email |
+----------------------------------+--------+---------+---------------+
| 8a1f80af899a43888ff5746e9a648a46 | swift | True | swift@my.com |
| 90e0a1f0f5e5478d8ee2bc94359633cd | nova | True | nova@my.com |
| abccb62411dc4cc7a97eb78002f84322 | glance | True | glance@my.com |
| acffa1d596664773b5744bdb89c344af | admin | True | admin@my.com |
+----------------------------------+--------+---------+---------------+
root@control:~# keystone role-list
+----------------------------------+----------------------+
| id | name |
+----------------------------------+----------------------+
| 479b5710e6e94629b775c83ad61b105e | KeystoneServiceAdmin |
| 56d711cd0462472b8e9311349b807e06 | KeystoneAdmin |
| 601ed84752704acf84fdd88c7e1164c0 | admin |
| 9818d52ea68048d596a8ddeadc2a5598 | ResellerAdmin |
| 99cae54881ba4d9988b035432a769f0a | Member |
+----------------------------------+----------------------+
root@control:~# keystone endpoint-list
+----------------------------------+-----------+------------------------------------------------+------------------------------------------------+-------------------------------------------+
| id | region | publicurl | internalurl | adminurl |
+----------------------------------+-----------+------------------------------------------------+------------------------------------------------+-------------------------------------------+
| 0119c542a8f248a49b0443fa9710deec | RegionOne | http://10.1.200.174:8776/v1/%(tenant_id)s | http://10.1.200.174:8776/v1/%(tenant_id)s | http://10.1.200.174:8776/v1/%(tenant_id)s |
| 0aea4a3961e041e1a024be91a438fd21 | RegionOne | http://10.1.200.174:8080/v1/AUTH_%(tenant_id)s | http://10.1.200.174:8080/v1/AUTH_%(tenant_id)s | http://10.1.200.174:8080/v1 |
| 3650d0af518d466f8dee440a86b665c9 | RegionOne | http://10.1.200.174:8774/v2/%(tenant_id)s | http://10.1.200.174:8774/v2/%(tenant_id)s | http://10.1.200.174:8774/v2/%(tenant_id)s |
| 52b7823c71834ca78e15864c86335854 | RegionOne | http://10.1.200.174:9292/v1 | http://10.1.200.174:9292/v1 | http://10.1.200.174:9292/v1 |
| 635498c04c6746c98473e55c64dd6a25 | RegionOne | http://10.1.200.174:9292/v1 | http://10.1.200.174:9292/v1 | http://10.1.200.174:9292/v1 |
| 8138c9c67149464c99a2e3859da9bcc2 | RegionOne | http://10.1.200.174:5000/v2.0 | http://10.1.200.174:5000/v2.0 | http://10.1.200.174:35357/v2.0 |
| 95bebfb9f27447b8a2d301e6711716a0 | RegionOne | http://10.1.200.174:8080/v1/AUTH_%(tenant_id)s | http://10.1.200.174:8080/v1/AUTH_%(tenant_id)s | http://10.1.200.174:8080/v1 |
| a106e9840ad44d5c9a84bf5ab7c4c457 | RegionOne | http://10.1.200.174:8774/v2/%(tenant_id)s | http://10.1.200.174:8774/v2/%(tenant_id)s | http://10.1.200.174:8774/v2/%(tenant_id)s |
| b7afe726a87f435fbcea2fc6de1b2233 | RegionOne | http://10.1.200.174:8773/services/Cloud | http://10.1.200.174:8773/services/Cloud | http://10.1.200.174:8773/services/Admin |
| d3f8e4059fde43ddbcce94789655f27a | RegionOne | http://10.1.200.174:8773/services/Cloud | http://10.1.200.174:8773/services/Cloud | http://10.1.200.174:8773/services/Admin |
| d9f43897783e4c019aea0d44270d1879 | RegionOne | http://10.1.200.174:5000/v2.0 | http://10.1.200.174:5000/v2.0 | http://10.1.200.174:35357/v2.0 |
+----------------------------------+-----------+------------------------------------------------+------------------------------------------------+-------------------------------------------+
安装配置glance
glance是提供镜像管理服务,可以理解成一个中间件,后面的存储可以是本地存储,也可以使用swift存储。
安装glanceroot@control#apt-get install -y glance glance-api glance-client glance-common glance-registry python-glance
修改配置文件/etc/glance/ glance-api.conf 和/etc/glance/ glance-registry.conf
#admin_tenant_name = %SERVICE_TENANT_NAME%
#admin_user = %SERVICE_USER%
#admin_password = %SERVICE_PASSWORD%
admin_tenant_name = service
admin_user = glance
admin_password = password
编辑/etc/glance/glance-registry.conf,改成使用mysql验证
sql_connection = mysql://glance:my_password@10.1.200.174/glance
编辑/etc/glance/glance-registry.conf 和 /etc/glance/glance-api.conf,都在文件末尾添加两行
[paste_deploy]
flavor = keystone
重启glance相关服务
service glance-api restart && service glance-registry restart
初始化同步glance数据库
root@control#glance-manage version_control 0
root@control#glance-manage db_sync
/usr/lib/python2.7/dist-packages/glance/registry/db/migrate_repo/versions/003_add_disk_format.py:47: SADeprecationWarning: useexisting is deprecated. Use extend_existing.
useexisting=True) 正常输出
再次重启glance服务
service glance-api restart && service glance-registry restart
测试glance,无输出即正常
root@control#glance index
上传自制的debian6镜像,参考
http://my.oschina.net/davehe/blog/92250 openstack 镜像制作
root@control:~/img# glance add name="debian6 initrd" disk_format=qcow2 container_format=ovf is_public=true < initrd.img-2.6.32-5-amd64
Added new image with ID: 52a2560e-ca3b-40f5-aa78-b33b9fc1aa4a
root@control:~/img# glance add name="debian6 vmlinuz" disk_format=qcow2 container_format=ovf is_public=true < vmlinuz-2.6.32-5-amd64
Added new image with ID: 1d3fb927-7dba-4e10-9b5b-396e218cf192
root@control:~/img# glance add name="debian6 OS" disk_format=qcow2 container_format=ovf is_public=ture ramdisk_id="52a2560e-ca3b-40f5-al_id="1d3fb927-7dba-4e10-9b5b-396e218cf192" < debian6.img
Added new image with ID: 2281d6ba-c2f2-4c81-bff1-cf0a584f5ced
root@control:~# glance index
ID Name Disk Format Container Format Size
------------------------------------ ------------------------------ -------------------- -------------------- --------------
2281d6ba-c2f2-4c81-bff1-cf0a584f5ced debian6 OS qcow2 ovf 5367660544
安装配置nova(控制节点也可以安装计算节点)
root@control#apt-get install -y nova-api nova-cert nova-common nova-objectstore nova-scheduler nova-volume nova-consoleauth novnc python-nova python-novaclient nova-compute nova-compute-kvm nova-network
修改/etc/nova/api-paste.ini文件
#admin_tenant_name = %SERVICE_TENANT_NAME%
#admin_user = %SERVICE_USER%
#admin_password = %SERVICE_PASSWORD%
admin_tenant_name = service
admin_user = nova
admin_password = password
修改/etc/nova/nova.conf配置文件
[DEFAULT]
###### LOGS/STATE
#verbose=True
verbose=False
###### AUTHENTICATION
auth_strategy=keystone
###### SCHEDULER
compute_scheduler_driver=nova.scheduler.filter_scheduler.FilterScheduler
scheduler_driver=nova.scheduler.simple.SimpleScheduler
###### VOLUMES
volume_group=nova-volumes
volume_name_template=volume-%08x
iscsi_helper=tgtadm
###### DATABASE
sql_connection=mysql://nova:my_password@10.1.200.174/nova
###### COMPUTE
libvirt_type=kvm
#libvirt_type=qemu
connection_type=libvirt
instance_name_template=instance-%08x
api_paste_config=/etc/nova/api-paste.ini
allow_resize_to_same_host=True
libvirt_use_virtio_for_bridges=true
start_guests_on_host_boot=true
resume_guests_state_on_host_boot=true
###### APIS
osapi_compute_extension=nova.api.openstack.compute.contrib.standard_extensions
allow_admin_api=true
s3_host=10.1.200.174
cc_host=10.1.200.174
###### RABBITMQ
rabbit_host=10.1.200.174
###### GLANCE
image_service=nova.image.glance.GlanceImageService
glance_api_servers=10.1.200.174:9292
###### NETWORK
network_manager=nova.network.manager.FlatManager
firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
public_interface=eth0
flat_interface=eth0
flat_network_bridge=br100
fixed_range=10.1.200.0/24
multi_host=true
###### NOVNC CONSOLE
novnc_enabled=true
novncproxy_base_url= http://10.1.200.174:6080/vnc_auto.html
vncserver_proxyclient_address=10.1.200.174
vncserver_listen=10.1.200.174
########Nova
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/var/lock/nova
#####MISC
use_deprecated_auth=false
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
重启所有服务
service rabbitmq-server restart
service libvirt-bin restart
service nova-scheduler restart
service nova-network restart
service nova-cert restart
service nova-compute restart
service nova-api restart
service nova-objectstore restart
service nova-volume restart
初始化同步数据库
root@control#nova-manage db sync
创建fix ip
就是分配给虚拟机的实际IP地址。这些数据都会写入数据库。$fixed_range在novarc里设置。
nova-manage network create private --fixed_range_v4=10.1.200.0/24 --num_networks=1 --bridge=br100 --bridge_interface=eth0 --network_size=256 --multi_host=T
floating IP是亚马逊EC2的定义。简单说,就是公网的IP。他其实是通过类似防火墙类似,做一个映射。实际上是通过iptables来实现映射.
再次重启nova服务service rabbitmq-server restart
service libvirt-bin restart
service nova-scheduler restart
service nova-network restart
service nova-cert restart
service nova-compute restart
service nova-api restart
service nova-objectstore restart
service nova-volume restart
检查nova的状况是否正常
root@control:~# nova-manage service list
Binary Host Zone Status State Updated_At
nova-scheduler control nova enabled :-) 2012-11-29 07:15:32
nova-network control nova enabled :-) 2012-11-28 10:19:29
nova-cert control nova enabled :-) 2012-11-29 07:15:32
nova-compute control nova enabled :-) 2012-11-28 10:18:42
nova-volume control nova enabled :-) 2012-11-29 07:15:37
nova-consoleauth control nova enabled :-) 2012-11-29 07:15:37
安装Dashobard
root@control:~#apt-get install -y apache2 libapache2-mod-wsgi openstack-dashboard
登录dashboard
http://10.1.200.174/horizon
添加安全组
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
查看有哪些镜像使用
root@control:~# nova image-list
+--------------------------------------+-----------------------------+--------+--------------------------------------+
| ID | Name | Status | Server |
+--------------------------------------+-----------------------------+--------+--------------------------------------+
|
| 2281d6ba-c2f2-4c81-bff1-cf0a584f5ced | debian6 OS | ACTIVE | |
查看那些网络可以用
root@control:~# nova-manage network list
id IPv4 IPv6 start address DNS1 DNS2 VlanID project uuid
1 10.1.200.0/24 None 10.1.200.2 8.8.4.4 None None None efbcebec-ba74-45c5-b1d1-c37c82b185b6
命令启动虚拟机
root@control:~#nova boot --flavor 1 --image 2281d6ba-c2f2-4c81-bff1-cf0a584f5ced --nic net-id=efbcebec-ba74-45c5-b1d1-c37c82b185b6,v4-fixed-ip=10.1.200.3 vm1
安装vnc
root@control~#apt-get install nova-novncproxy nova-xvpvncproxy novnc python-novnc
经测试可以在Dashobard创建虚拟机。volume在ubuntu12.04可以使用,但在ubuntu12.10中未能使用。
本文已在控制节点已安装计算节点,之后会介绍多节点安装的计算节点。