参考原版地址:https://github.com/mseknibilel/OpenStack-Grizzly-Install-Guide

图转自原版地址

部署拓扑:

部署环境:vmware station架设三台虚拟机 (ubuntu12.04操作系统)

我的配置:eth0 vmnet8 NAT 192.168.40.0/24

     eth1 vmnet3 host-only 192.168.10.0/24

       eth2 vmnet4 host-only 192.168.157.0/24

一、首先配置离线源:

(1)添加网络源、更新源、更新所有安装包

apt-get install -y ubuntu-cloud-keyring
echo deb http://ubuntu-cloud.archive.canonical.com/ubuntu precise-updates/grizzly main >> /etc/apt/sources.list.d/grizzly.list apt-get update -y
apt-get upgrade -y
apt-get dist-upgrade -y

(2)安装需要的服务和组件

mysql-server python-mysqld rabbitmq-server ntp vlan bridge-utils keystone glance quantum-server
nova-api nova-cert novnc nova-consoleauth nova-scheduler nova-novncproxy nova-doc nova-conductor
cinder-api cinder-scheduler cinder-volume iscsitarget open-iscsi iscsitarget-dkms
openstack-dashboard memcached
openvswitch-switch openvswitch-datapath-dkms
quantum-plugin-openvswitch-agent quantum-dhcp-agent quantum-l3-agent quantum-metadata-agent
cpu-checker kvm libvirt-bin pm-utils   nova-compute-kvm

(3)制作源 ---方法http://blog.sina.com.cn/s/blog_6ab596b90100u4xh.html

二、控制节点的安装

(1)在network/interface中配置静态IP

# The loopback network interface
auto lo
iface lo inet loopback # The primary network interface
auto eth0
iface eth0 inet static
address 192.168.40.128
netmask 255.255.255.0
gateway 192.168.40.2 #控制节点暂不设eth1

并重启 service networking restart

(2)安装mysql数据库和消息队列rabbitmq

apt-get install -y mysql-server python-mysqldb
sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
service mysql restart apt-get install -y rabbitmq-server

(3)安装ntp时间服务器 这个非常重要 用于组件之间的实时同步

apt-get install -y ntp

(4)更改数据库密码

修改MySQL密码为passwd:
[root@stonex ~]#  mysql -u root
Welcome to the MySQL monitor.  Commands end with ; or \g.
...... 省略了一些行
mysql> select user,host,password from mysql.user;
查询用户的密码,都为空,用下面的命令设置root的密码为password
mysql> set password for root@localhost=password('password'); mysql> exit

(5)在mysql中添加各个组件的数据库并授权

mysql -u root -p

#Keystone
CREATE DATABASE keystone;
GRANT ALL PRIVILEGES ON keystone.* TO 'keystoneUser'@'%' IDENTIFIED BY 'keystonePass'; #Glance
CREATE DATABASE glance;
GRANT ALL PRIVILEGES ON glance.* TO 'glanceUser'@'%' IDENTIFIED BY 'glancePass'; #Quantum
CREATE DATABASE quantum;
GRANT ALL PRIVILEGES ON quantum.* TO 'quantumUser'@'%' IDENTIFIED BY 'quantumPass'; #Nova
CREATE DATABASE nova;
GRANT ALL PRIVILEGES ON nova.* TO 'novaUser'@'%' IDENTIFIED BY 'novaPass'; #Cinder
CREATE DATABASE cinder;
GRANT ALL PRIVILEGES ON cinder.* TO 'cinderUser'@'%' IDENTIFIED BY 'cinderPass'; quit;

(6)安装vlan和管理网桥的工具

apt-get install -y vlan bridge-utils
sed -i 's/#net.ipv4.ip_forward=1/net.ipv4.ip_forward=1/' /etc/sysctl.conf

# To save you from rebooting, perform the following 开启路由转发功能
sysctl net.ipv4.ip_forward=1

(7)安装keystone (前六步可以说是准备工作)

apt-get install -y keystone

将keystone.conf中

connection = mysql://keystoneUser:keystonePass@192.168.40.128/keystone

重启并同步数据库

service keystone restart
keystone-manage db_sync

下面要开始创建keystone的user、tenant、service和role,这里直接借用源地址作者提供的两个脚本。

#Modify the **HOST_IP** and **EXT_HOST_IP** variables before executing the scripts

wget https://raw.github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/OVS_MultiNode/KeystoneScripts/keystone_basic.sh
wget https://raw.github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/OVS_MultiNode/KeystoneScripts/keystone_endpoints_basic.sh
如果是离线安装,脚本事先要下好
chmod +x keystone_basic.sh
chmod +x keystone_endpoints_basic.sh ./keystone_basic.sh
./keystone_endpoints_basic.sh

创建一个credential 执行一些环境变量,这样才能使用openstack的命令

nano creds

#Paste the following:
#此处name和pass都要与上面两个脚本中的一一对应
export OS_TENANT_NAME=admin
export OS_USERNAME=admin
export OS_PASSWORD=admin_pass
export OS_AUTH_URL="http://192.168.40.128:5000/v2.0/" # Load it: 使用方法 source这个credential即可
source creds

测试keystone

keystone user-list
keystone service-list等

(8)安装glance

apt-get install -y glance

修改配置文件

修改 /etc/glance/glance-api-paste.ini with:

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
delay_auth_decision = true
auth_host = 192.168.40.128
auth_port =
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = service_pass 修改the /etc/glance/glance-registry-paste.ini with: [filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_host = 192.168.40.128
auth_port =
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = service_pass 修改/etc/glance/glance-api.conf with: sql_connection = mysql://glanceUser:glancePass@192.168.40.128/glance
And:
[paste_deploy]
flavor = keystone
Update the /etc/glance/glance-registry.conf with: sql_connection = mysql://glanceUser:glancePass@192.168.40.128/glance
And:
[paste_deploy]
flavor = keystone

重启并同步数据库

service glance-* restart
glance-manage db_sync

测试

glance image-create --name myFirstImage --is-public true --container-format bare --disk-format qcow2 --location http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-disk.img 此处的image是一个在线的镜像 镜像也可以自己做 教程以后再写

glance image-list

(9)安装quantum

apt-get install -y quantum-server

修改配置文件

编辑/etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini with:

#Under the database section
[DATABASE]
sql_connection = mysql://quantumUser:quantumPass@192.168.40.128/quantum #Under the OVS section
[OVS]
tenant_network_type = gre
tunnel_id_ranges = :
enable_tunneling = True #Firewall driver for realizing quantum security group function
[SECURITYGROUP]
firewall_driver = quantum.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver 编辑/etc/quantum/api-paste.ini [filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_host = 192.168.40.128
auth_port =
auth_protocol = http
admin_tenant_name = service
admin_user = quantum
admin_password = service_pass 编辑the /etc/quantum/quantum.conf: [keystone_authtoken]
auth_host = 192.168.40.128
auth_port =
auth_protocol = http
admin_tenant_name = service
admin_user = quantum
admin_password = service_pass
signing_dir = /var/lib/quantum/keystone-signing

重启quantum

service quantum-server restart

(10)安装nova

apt-get install -y nova-api nova-cert novnc nova-consoleauth nova-scheduler nova-novncproxy nova-doc nova-conductor

修改配置

编辑 /etc/nova/api-paste.ini file to this:

[filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
auth_host = 192.168.40.128
auth_port =
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = service_pass
signing_dirname = /tmp/keystone-signing-nova
# Workaround for https://bugs.launchpad.net/nova/+bug/1154809
auth_version = v2.
编辑 /etc/nova/nova.conf like this: [DEFAULT]
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/run/lock/nova
verbose=True
api_paste_config=/etc/nova/api-paste.ini
compute_scheduler_driver=nova.scheduler.simple.SimpleScheduler
rabbit_host=192.168.40.128
nova_url=http://192.168.40.128:8774/v1.1/
sql_connection=mysql://novaUser:novaPass@192.168.40.128/nova
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf # Auth
use_deprecated_auth=false
auth_strategy=keystone # Imaging service
glance_api_servers=192.168.40.128:
image_service=nova.image.glance.GlanceImageService # Vnc configuration
novnc_enabled=true
novncproxy_base_url=http://192.168.40.128:6080/vnc_auto.html
novncproxy_port=
vncserver_proxyclient_address=192.168.40.128
vncserver_listen=0.0.0.0 # Network settings
network_api_class=nova.network.quantumv2.api.API
quantum_url=http://192.168.40.128:9696
quantum_auth_strategy=keystone
quantum_admin_tenant_name=service
quantum_admin_username=quantum
quantum_admin_password=service_pass
quantum_admin_auth_url=http://192.168.40.128:35357/v2.0
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver
#If you want Quantum + Nova Security groups
firewall_driver=nova.virt.firewall.NoopFirewallDriver
security_group_api=quantum
#If you want Nova Security groups only, comment the two lines above and uncomment line --.
#--firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver #Metadata
service_quantum_metadata_proxy = True
quantum_metadata_proxy_shared_secret = helloOpenStack # Compute #
compute_driver=libvirt.LibvirtDriver # Cinder #
volume_api_class=nova.volume.cinder.API
osapi_volume_listen_port=

重启并同步

cd /etc/init.d/; for i in $( ls nova-* ); do sudo service $i restart; done
nova-manage db sync

(11)安装cinder

apt-get install -y cinder-api cinder-scheduler cinder-volume iscsitarget open-iscsi iscsitarget-dkms

修改配置

配置 iscsi services:

sed -i 's/false/true/g' /etc/default/iscsitarget
Restart the services: service iscsitarget start
service open-iscsi start 编辑/etc/cinder/api-paste.ini like the following: [filter:authtoken]
paste.filter_factory = keystoneclient.middleware.auth_token:filter_factory
service_protocol = http
service_host = 192.168.40.128
service_port =
auth_host = 192.168.40.128
auth_port =
auth_protocol = http
admin_tenant_name = service
admin_user = cinder
admin_password = service_pass
signing_dir = /var/lib/cinder 编辑the /etc/cinder/cinder.conf to: [DEFAULT]
rootwrap_config=/etc/cinder/rootwrap.conf
sql_connection = mysql://cinderUser:cinderPass@192.168.40.128/cinder
api_paste_config = /etc/cinder/api-paste.ini
iscsi_helper=ietadm
volume_name_template = volume-%s
volume_group = cinder-volumes
verbose = True
auth_strategy = keystone
iscsi_ip_address=192.168.40.128

同步

cinder-manage db sync

最后 创建volume-group

dd if=/dev/zero of=cinder-volumes bs= count= seek=2G
losetup /dev/loop2 cinder-volumes
fdisk /dev/loop2
#Type in the followings:
n
p ENTER
ENTER
t
8e
w Proceed to create the physical volume then the volume group:
pvcreate /dev/loop2
vgcreate cinder-volumes /dev/loop2

这种方法在重启后会失效  解决方法

https://github.com/mseknibilel/OpenStack-Folsom-Install-guide/blob/master/Tricks%26Ideas/load_volume_group_after_system_reboot.rst

重启

cd /etc/init.d/; for i in $( ls cinder-* ); do sudo service $i restart; done

(12)安装horizon

apt-get install -y openstack-dashboard memcached

如何卸载openstack-ubuntu的主题

dpkg --purge openstack-dashboard-ubuntu-theme

重启

service apache2 restart; service memcached restart

通过

Check OpenStack Dashboard at http://192.168.40.128/horizon. We can login with the admin / admin_pass访问

OpenStack Grizzly版本部署(离线)的更多相关文章

  1. OpenStack Newton版本Ceph集成部署记录

    2017年2月,OpenStack Ocata版本正式release,就此记录上一版本 Newton 结合Ceph Jewel版的部署实践.宿主机操作系统为CentOS 7.2 . 初级版: 192. ...

  2. 使用openshit在ubuntu14.04下一键部署openstack(juno版本)

    一.基本介绍 本实验是在vmware workstation上虚拟机ubuntu14.04(64bit,desktop)上部署openstack(Juno版本).采用的工具是openshit.open ...

  3. OpenStack Q版本新功能以及各核心组件功能对比

    OpenStack Q版本已经发布了一段时间了.今天, 小编来总结一下OpenStack Q版本核心组件的各项主要新功能, 再来汇总一下最近2年来OpenStack N.O.P.Q各版本核心组件的主要 ...

  4. OpenStack Queens版本Horizon定制化开发

    工具环境 1.VMware workstation 12+: 2.Ubuntu系统+Linux Pycharm: 3.OpenStack Queens版本Horizon代码: 问题及解决 1.项目代码 ...

  5. [译] OpenStack Kilo 版本中 Neutron 的新变化

    OpenStack Kilo 版本,OpenStack 这个开源项目的第11个版本,已经于2015年4月正式发布了.现在是个合适的时间来看看这个版本中Neutron到底发生了哪些变化了,以及引入了哪些 ...

  6. 理解 OpenStack + Ceph (1):Ceph + OpenStack 集群部署和配置

    本系列文章会深入研究 Ceph 以及 Ceph 和 OpenStack 的集成: (1)安装和部署 (2)Ceph RBD 接口和工具 (3)Ceph 物理和逻辑结构 (4)Ceph 的基础数据结构 ...

  7. OpenStack使用Bosh部署CloudFoundry(一)—准备OpenStack环境

    版本说明: CloudFoundry:V2版本 OpenStack:Folsom或者Grizzly版本 本篇文章采用OpenStack Folsom+nova-network的OpenStack环境, ...

  8. OpenStack最新版本Folsom架构解析

    OpenStack最新版本Folsom架构解析摘要:OpenStack的第6版,版本代号为Folsom的最新版于今年九月底正式发布,Folsom将支持下一代软件定义网络(SDN)作为其核心组成部分.F ...

  9. [译] OpenStack Pike 版本中的 53 个新功能盘点

      原文:https://www.mirantis.com/blog/53-things-to-look-for-in-openstack-pike/ 作者:Mirantis Nick Chase 发 ...

随机推荐

  1. Qt 学习(3)

    Qt 修改 Windows 注册表项 在使用 FT232R 驱动(usb转串口设备)连接电脑时,下位机发送的数据会被转换器缓存起来,由串口转换器驱动设定的延时定时发送到 PC,这样就造成了一个问题:上 ...

  2. 现有分布式技术(socket、.net remoting、asp.net webservice、WSE、ES)和wcf的比较及优势

    1:socket VS remoting 使用socket无疑是效率最高的.但是,在复杂的接口环境下,socket的开发效率也是最低的.故在兼顾开发效率的情况下,可以使用remoting来代替sock ...

  3. vue学习笔记 vue安装

    一.安装步骤:(用cmd命令用管理身份安装比较顺利) 1.安装node,安装后可以输入npm -v 查看版本,升级npm可用 cnpm install npm -g 2.安装vue 输入cnpm in ...

  4. Value cannot be null. Parameter name: source

    下图主要想说.net抛错后的优先级, 错误1是根本原因,排第一位: 错误2里的方法包含了错误1,排第二位: 错误3就是整个Action了. 类似这样的错误,按照这样的顺序来解决bug,相信很受用.

  5. 关于web.xml的welcome-file-list 配置与tomcat的关系:

    关于web.xml的welcome-file-list 配置与tomcat的关系: 2018年04月18日 10:17:13 守望dfdfdf 阅读数:377 标签: welcome-file-lis ...

  6. mysql存储过程中最后有commit和没有commit 是有所不同的。(为测试但是碰到过这个问题)

    如果存储过程中没有执行commit,那么spring容器一旦发生了事务回滚,存储过程执行的操作也会回滚.如果存储过程执行了commit,那么数据库自身的事务此时已提交,这时即使在spring容器中托管 ...

  7. 转:解决Arcsde用户锁定的问题

    采用arcgis平台做GIS应用的人,可能偶尔碰到sde用户锁定(Arccatalog 或应用程序异常退出的时比较多)的问题,往往咱们解决的办法是重启sde服务.如果一个服务器上有多个连接时,重启服务 ...

  8. css3骰子(transform初识)

    利用css3制作可旋转的骰子,效果图如下,也可以查看 demo: 首先是骰子的html结构,.page 是骰子的六个页面的 class,#one-#six分别表示六个面,.point 是骰子表面的点数 ...

  9. OpenCart-2.3 (Ubuntu 16.04)

      平台: Ubuntu 类型: 虚拟机镜像 软件包: opencart-2.3 commercial ecommerce opencart open-source 服务优惠价: 按服务商许可协议 云 ...

  10. TCP与虚连接

    http://bbs.csdn.net/topics/390262738 在TCP通信时,会建立一个从源端到目的端的虚拟连接.感觉这种连接类似电路交换,只是这种连接是虚拟存在的.发送的报文都应该是沿着 ...