Openstack:ice-house安装过程
#apt-get install ntp
dpkg-reconfigure tzdata --> Asia -->Shuanghai
#apt-get install python-mysqldb mysql-server
Edit the /etc/mysql/my.cnf file:
[mysqld]
...
bind-address = 10.0.0.11
[mysqld]
...
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = 'SET NAMES utf8'
character-set-server = utf8
#service mysql restart
#mysql_install_db
#mysql_secure_installation
--------------------------------------
# apt-get install python-software-properties
# add-apt-repository cloud-archive:icehouse
# apt-get update
# apt-get dist-upgrade
# apt-get install linux-image-generic-lts-saucy linux-headers-generic-lts-saucy
# reboot
--------------------------------------
# apt-get install rabbitmq-server
# rabbitmqctl change_password guest openstack
--------------------------------------
create database keystone default character set utf8;
grant all on keystone.* to 'keystone'@'%' identified by 'openstack';
#Install Identity
apt-get install keystone
rm /var/lib/keystone/keystone.db
vi /etc/keystone/keystone.conf
connection = mysql://keystone:openstack@keystone/keystone
su -s /bin/sh -c "keystone-manage db_sync" keystone
vi /etc/keystone/keystone.conf
[DEFAULT]
# A "shared secret" between keystone and other openstack services
admin_token = ADMIN_TOKEN
log_dir = /var/log/keystone
(crontab -l -u keystone 2>&1 | grep -q token_flush) || \
echo '@hourly /usr/bin/keystone-manage token_flush >/var/log/keystone/keystone-tokenflush.log 2>&1' >> /var/spool/cron/crontabs/keystone
--------------------------------------
vi keystone-super
$ export OS_SERVICE_TOKEN=ADMIN_TOKEN
$ export OS_SERVICE_ENDPOINT=http://controller:35357/v2.0
keystone user-create --name=admin --pass=openstack
keystone role-create --name=admin
keystone tenant-create --name=admin --description="Admin Tenant"
keystone user-role-add --user=admin --tenant=admin --role=admin
keystone user-role-add --user=admin --role=_member_ --tenant=admin
-----------------
keystone tenant-create --name=service --description="Service Tenant"
-----------------
keystone user-create --name=demo --pass=openstack
keystone tenant-create --name=demo --description="Demo Tenant"
keystone user-role-add --user=demo --role=_member_ --tenant=demo
---------------------------------------
keystone service-create --name=keystone --type=identity --description="OpenStack Identity"
keystone endpoint-create \
--service-id=$(keystone service-list | awk '/ identity / {print $2}') \
--publicurl=http://keystone:5000/v2.0 \
--internalurl=http://keystone:5000/v2.0 \
--adminurl=http://keystone:35357/v2.0
-------------------------------------
apt-get install python-pip
-------------------------------------
#Instacll Image Service
apt-get install glance python-glanceclient
rm /var/lib/glance/glance.sqlite
vi /etc/glance/glance-api.conf
[database]
connection = mysql://glance:openstack@glance/glance
[keystone_authtoken]
auth_uri = http://keystone:5000
auth_host = keystone
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = openstack
[paste_deploy]
...
flavor = keystone
vi /etc/glance/glance-registry.conf
[database]
connection = mysql://glance:openstack@glance/glance
[keystone_authtoken]
auth_uri = http://keystone:5000
auth_host = keystone
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = openstack
[paste_deploy]
...
flavor = keystone
su -s /bin/sh -c "glance-manage db_sync" glance
keystone user-create --name=glance --pass=openstack
keystone user-role-add --user=glance --tenant=service --role=admin
keystone service-create --name=glance --type=image \
--description="OpenStack Image Service"
keystone endpoint-create \
--service-id=$(keystone service-list | awk '/ image / {print $2}') \
--publicurl=http://glance:9292 \
--internalurl=http://glance:9292 \
--adminurl=http://glance:9292
service glance-registry restart
service glance-api restart
-----------------------------------
mkdir /tmp/images
cd /tmp/images/
wget http://cdn.download.cirros-cloud.net/0.3.2/cirros-0.3.2-x86_64-disk.img
glance image-create --name='cirros-0.3.2-x86_64' --disk-format=qcow2 \
--container-format=bare --is-public=True --progress < cirros-0.3.2-x86_64-disk.img
-----------------------------------
#Install Compute
1. 创建DB
create database nova;
grant all on nova.* to 'nova'@'%' identified by 'openstack';
2. 创建keystone帐号
keystone user-create --name=nova --pass=openstack
keystone user-role-add --user=nova --tenant=service --role=admin
3. 安装
apt-get install nova-api nova-cert nova-conductor nova-consoleauth \
nova-novncproxy nova-scheduler python-novaclient
apt-get install nova-compute-qemu python-guestfs
rm /var/lib/nova/nova.sqlite
4. 配置
vi /etc/nova/nova.conf
[DEFAULT]
...
auth_strategy = keystone
rpc_backend = rabbit
rabbit_host = controller
rabbit_password = openstack
my_ip = 10.0.0.3
vnc_enabled = True
vncserver_listen = 0.0.0.0
vncserver_proxyclient_address = 10.0.0.3
novncproxy_base_url = http://nova:6080/vnc_auto.html
#glance
glance_host = glance
image_service = nova.image.glance.GlanceImageService
glance_api_servers = glance:9292
#livirt
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
#neutron
network_api_class = nova.network.neutronv2.api.API
neutron_url = http://neutron:9696
neutron_auth_strategy = keystone
neutron_admin_tenant_name = service
neutron_admin_username = neutron
neutron_admin_password = openstack
neutron_admin_auth_url = http://keystone:35357/v2.0
linuxnet_interface_driver = nova.network.linux_net.LinuxOVSInterfaceDriver
firewall_driver = nova.virt.firewall.NoopFirewallDriver
security_group_api = neutron
#meta-secret
service_neutron_metadata_proxy = true
neutron_metadata_proxy_shared_secret = openstack
#异常关系
vif_plugging_timeout = 10
vif_plugging_is_fatal = False
[database]
connection = mysql://nova:openstack@controller/nova
[keystone_authtoken]
...
auth_uri = http://nova:5000
auth_host = controller
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = nova
admin_password = openstack
--------------
vi /etc/nova/nova-compute.conf
[libvirt]
...
virt_type = qemu
5. 注册keystone服务
keystone service-create --name=nova --type=compute --description="OpenStack Compute"
keystone endpoint-create \
--service-id=$(keystone service-list | awk '/ compute / {print $2}') \
--publicurl=http://nova:8774/v2/%\(tenant_id\)s \
--internalurl=http://nova:8774/v2/%\(tenant_id\)s \
--adminurl=http://nova:8774/v2/%\(tenant_id\)s
6. 同步数据库
su -s /bin/sh -c "nova-manage db sync" nova
7. 重启服务&验证
service nova-api restart
service nova-cert restart
service nova-consoleauth restart
service nova-scheduler restart
service nova-conductor restart
service nova-novncproxy restart
service nova-compute restart
nova image-list
-----------------------------------
#Install Neutron
1. 创建DB
create database neutron;
grant all on neutron.* to 'neutron'@'%' identified by 'openstack';
2. 创建帐号
keystone user-create --name neutron --pass openstack
keystone user-role-add --user neutron --tenant service --role admin
3. 安装neutron
apt-get install neutron-server neutron-plugin-ml2
rm /var/lib/neutron/neutron.sqlite
4. 配置
vi /etc/neutron/neutron.conf
[DEFAULT]
core_plugin = ml2
service_plugins = router
allow_overlapping_ips = True
auth_strategy=keystone
control_exchange = neutron
rpc_backend = neutron.openstack.common.rpc.impl_kombu
rabbit_host = controller
rabbit_password = openstack
[database]
connection = mysql://neutron:openstack@controller/neutron
[keystone_authtoken]
auth_uri = http://keystone:35357
auth_host = keystone
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = neutron
admin_password = openstack
-----------------------
vi /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2]
type_drivers = gre
tenant_network_types = gre
mechanism_drivers = openvswitch
[ml2_type_gre]
...
tunnel_id_ranges = 1:1000
[ovs]
...
local_ip = 10.0.0.3 #INSTANCE_TUNNELS_INTERFACE_IP_ADDRESS
tunnel_type = gre
enable_tunneling = True
[securitygroup]
...
firewall_driver = neutron.agent.linux.iptables_firewall.OVSHybridIptablesFirewallDriver
enable_security_group = True
----------------------
配置nova.conf
参见#与neutron关系
5. 同步DB
neutron不需要
6. 注册服务
keystone service-create --name neutron --type network --description "OpenStack Networking"
keystone endpoint-create \
--service-id $(keystone service-list | awk '/ network / {print $2}') \
--publicurl http://neutron:9696 \
--adminurl http://neutron:9696 \
--internalurl http://neutron:9696
7. 重启服务&验证
service neutron-server restart
service nova-api restart
service nova-scheduler restart
service nova-conductor restart
----------------------------------------
#配置网络结点
apt-get install neutron-plugin-ml2 neutron-plugin-openvswitch-agent \
neutron-l3-agent neutron-dhcp-agent
apt-get install neutron-common neutron-plugin-ml2 neutron-plugin-openvswitch-agent
1. 配置内核
vi /etc/sysctl.conf
net.ipv4.ip_forward=1
net.ipv4.conf.all.rp_filter=0
net.ipv4.conf.default.rp_filter=0
sysctl -p
3. 配置L3
vi /etc/neutron/l3_agent.ini
[DEFAULT]
...
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
use_namespaces = True
verbose = True
4. 配置DHCP
vi /etc/neutron/dhcp_agent.ini
[DEFAULT]
...
interface_driver = neutron.agent.linux.interface.OVSInterfaceDriver
dhcp_driver = neutron.agent.linux.dhcp.Dnsmasq
use_namespaces = True
verbose = True
dnsmasq_config_file = /etc/neutron/dnsmasq-neutron.conf
vi /etc/neutron/dnsmasq-neutron.conf
dhcp-option-force=26,1454
killall dnsmasq
5. 配置meta-data
vi /etc/neutron/metadata_agent.ini
[DEFAULT]
...
auth_url = http://controller:5000/v2.0
auth_region = regionOne
admin_tenant_name = service
admin_user = neutron
admin_password = openstack
nova_metadata_ip = nova
metadata_proxy_shared_secret = openstack
vi /etc/nova/nova.conf
[DEFAULT]
...
service_neutron_metadata_proxy = true
neutron_metadata_proxy_shared_secret = openstack
------------------------------------
#配置OVS, 关联之前的启动, 可能导致网络不通
1. 设置网卡: 必须加2张NAT
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
up ifconfig eth0 0.0.0.0 promisc up
down ifconfig eth0 down
auto br-eth0
iface br-eth0 inet static
address 192.168.2.3
netmask 255.255.255.0
gateway 192.168.2.2
dns-nameservers 192.168.2.2
auto eth1
iface eth1 inet manual
up ifconfig eth1 0.0.0.0 promisc up
down ifconfig eth1 down
auto br-eth1
iface br-eth1 inet static
address 10.0.0.3
netmastk 255.255.255.0
2. 关闭gro
ethtool -k eth0
ethtool -K eth0 gro off
ethtool -k eth1
ethtool -K eth1 gro off
3. 设置OVS
service openvswitch-switch restart
ovs-vsctl add-br br-eth0
ovs-vsctl add-port br-eth0 eth0
ovs-vsctl add-br br-eth1
ovs-vsctl add-port br-eth1 eth1
===================================
===================================
#修改自动重启
root@ubuntu:/etc/init# ll keystone*
-rw-r--r-- 1 root root 284 Aug 11 23:04 keystone.conf
root@ubuntu:/etc/init# ll glance-*
-rw-r--r-- 1 root root 278 Aug 11 22:15 glance-api.conf
-rw-r--r-- 1 root root 293 Aug 11 22:15 glance-registry.conf
root@ubuntu:/etc/init# ll nova*
-rw-r--r-- 1 root root 391 Aug 13 21:18 nova-api.conf
-rw-r--r-- 1 root root 386 Aug 13 21:18 nova-cert.conf
-rw-r--r-- 1 root root 679 Aug 13 21:18 nova-compute.conf
-rw-r--r-- 1 root root 395 Aug 13 21:18 nova-conductor.conf
-rw-r--r-- 1 root root 412 Aug 13 21:18 nova-consoleauth.conf
-rw-r--r-- 1 root root 416 Aug 13 21:18 nova-novncproxy.conf
-rw-r--r-- 1 root root 396 Aug 13 21:18 nova-scheduler.conf
root@ubuntu:/etc/init# ll neutron-*
-rw-r--r-- 1 root root 730 Aug 13 03:15 neutron-dhcp-agent.conf
-rw-r--r-- 1 root root 772 Aug 13 03:15 neutron-l3-agent.conf
-rw-r--r-- 1 root root 539 Aug 13 03:15 neutron-metadata-agent.conf
-rw-r--r-- 1 root root 439 Aug 13 03:15 neutron-ovs-cleanup.conf
-rw-r--r-- 1 root root 556 Aug 13 03:15 neutron-plugin-openvswitch-agent.conf
-rw-r--r-- 1 root root 633 Aug 13 03:15 neutron-server.conf
=========================================
service mysql restart
service rabbitmq-server restart
#keystone
service keystone restart
#glance
service glance-registry restart
service glance-api restart
#nova
service nova-scheduler restart
service nova-cert restart
service nova-api restart
service nova-compute restart
service nova-conductor restart
service nova-consoleauth restart
#neutron
service neutron-plugin-openvswitch-agent restart
service neutron-server restart
service neutron-dhcp-agent restart
service neutron-metadata-agent restart
//service neutron-ovs-cleanup restart
{"message": "Virtual Interface creation failed", "code": 500, "details": " File \"/usr/lib/python2.7/dist-packages/nova/compute/manager.py\", line 290, in decorated_function |
----------------------------------------
#安装glance
[DEFAULT]
rabbit_host = controller
rabbit_port = 5672
rabbit_use_ssl = false
rabbit_userid = guest
rabbit_password = openstack
rabbit_virtual_host = /
rabbit_notification_exchange = glance
rabbit_notification_topic = notifications
rabbit_durable_queues = False
[keystone_authtoken]
auth_uri = http://keystone:5000
auth_host = keystone
auth_port = 35357
auth_protocol = http
admin_tenant_name = service
admin_user = glance
admin_password = openstack
[paste_deploy]
...
flavor = keystone
--------------------------------------------------
创建网络:
vi /etc/neutron/plugins/ml2/ml2_conf.ini
[ml2_type_flat]
flat_networks = *
[ovs]
network_vlan_ranges = br-eth0
bridge_mappings = br-eth0:br-eth0
neutron net-create NAME --tenant_id TENANT_ID --provider:network_type flat --provider:physical_network br-eth0
neutron net-create eth0 \
--shared \
--router:external True \
--provider:network_type flat \
--provider:physical_network br-eth0
neutron net-create eth1 \
--shared \
--router:external True \
--provider:network_type flat \
--provider:physical_network br-eth1
neutron subnet-create eth0 --name eth0-subnet0 \
--allocation-pool start=192.168.2.10,end=192.168.2.250 \
--gateway 192.168.2.2 192.168.2.0/24
neutron subnet-create eth1 --name eth1-subnet0 \
--allocation-pool start=10.0.0.10,end=10.0.0.250 \
--gateway 10.0.0.1 10.0.0.0/24
nova secgroup-create admin "admin secgroup"
nova secgroup-add-rule admin icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule admin tcp 22 22 0.0.0.0/0
nova boot \
--flavor 1 \
--image 96a1ab97-b954-4816-a004-2d2c95bd5a3d \
--key-name mykey \
--security-groups game \
--nic net-id=1fac7d39-601c-4b9b-b317-3ced11b19899 \
--nic net-id=871a5cdd-e15c-466d-a1ca-0394244862c1 \
cirros01
nova secgroup-create game "admin secgroup"
nova secgroup-add-rule game icmp -1 -1 0.0.0.0/0
nova secgroup-add-rule game tcp 22 22 0.0.0.0/0
Openstack:ice-house安装过程的更多相关文章
- windows下在virtualbox中的Fuel Openstack 9.0 安装过程
一.材料: 1.软件: virtualbox xshell(或putty,winscp) bootstrap.zip(580MB) mirrors(3.01GB) MirantisOpenStack- ...
- eclipse在Ubuntu 13.04下的安装过程及问题小记
一.eclipse安装过程 首先确保在安装eclipse之前已经安装好Java虚拟机 1. eclipse官网下载压缩包 下载地址:http://www.eclipse.org/downloads/? ...
- Object Storage(Swift)安装过程——Havana
自从看了Havana安装文档有关Swift的安装一节,发现H版的安装过程与以前还是有些差别的.不过大致过程还是那些.下面简单介绍下我们安装的过程吧,具体请参考官方文档http://docs.opens ...
- eclipse在Ubuntu 13.04下的安装过程
eclipse在Ubuntu 13.04下的安装过程及问题小记 一.eclipse安装过程 首先确保在安装eclipse之前已经安装好Java虚拟机 1. eclipse官网下载压缩包 下载地址:ht ...
- VMware vSphere虚拟化-VMware ESXi 5.5组件安装过程记录
几种主要的虚拟化 ESXi是VMware公司研发的虚拟机服务器,ESXi已经实现了与Virtual Appliance Marketplace的直接整合,使用户能够即刻下载并运行虚拟设备.这为 即插即 ...
- 基于packstack的openstack单节点安装
一.安装源处理 1.更新base源为网易的源 cd /etc/yum.repos.d/ wget http://mirrors.163.com/.help/CentOS6-Base-163.repo ...
- [openStack]使用Fuel安装OpenStack juno的fuel_master
安装OpenStack是一件很复杂的事情,特别是在想目中,如果一个组件一个组件,一台一台的coding部署,估计太消耗时间,而且出错的概率很高,所以使用工具推送部署的效率就很高了,而且必须得可靠.mi ...
- webstorm下载&&安装过程&&打开项目
一.webstorm下载 WebStorm 是jetbrains公司旗下一款JavaScript 开发工具.被广大中国JS开发者誉为"Web前端开发神器"."最强大的HT ...
- vagrant 1.8.6 安装过程及总结遇到的坑
下面先总结遇到的问题,这些问题如果你也遇到,可能需要搜索很多次才能找到原因. 如果想看安装过程,可以先直接跳到后面第二部分部分. 1 问题汇总: 1.1 vagrant版本过高问题. vagrant ...
- 安装过程错误[INS-30131]
问题:Oracle Database 安装过程错误[INS-30131] 原因:安装用户没有对临时文件夹的读写权限 解决方案: 1.以管理员身份运行cmd.exe 2.输入命令(需启动Se ...
随机推荐
- My Rules of Information
http://www.infotoday.com/searcher/jan02/block.htm I often suggested to students that information is ...
- 洛谷P1530 分数化小数 Fractions to Decimals
P1530 分数化小数 Fractions to Decimals 103通过 348提交 题目提供者该用户不存在 标签USACO 难度普及/提高- 提交 讨论 题解 最新讨论 暂时没有讨论 题目 ...
- LSP遇到的问题
无法打开网页,LSP必须安装在C:\windows 安装在这里比较好 c:\windows\system32
- pb中读取大文本数据
string ls_FileName,lb_FileDatas,lb_FileData long ll_FileLen,ll_Handle,ll_Loop,ll_Bytes,ll_Loops,ll_ ...
- JavaScript常用代码段
总结一下在各种地方看到的还有自己使用的一些实用代码 1)区分IE和非IE浏览器 if(!+[1,]){ alert("这是IE浏览器"); } else{ alert(" ...
- WWF3事务和异常处理类型活动<第四篇>
一.FaultHandler 添加一个工作流图如下: 首先添加一个Seruence,在里面添加3个Code,外面添加一个Code,打开Seruence错误处理,在容器里添加一个faultHandler ...
- HTML你应该知道的三大基本元素
顶级.块级.内联,html元素的三大分类 如果将这些元素细分, 又可以分别归为顶级(top-level)元素,块级(block-level)元素和内联(inline)元素. 1. Top-level ...
- WP_从独立存储区读取缓存的图片
///<summary> /// 独立存储缓存的图片源 /// 用法:item.img = new StorageCachedImage(newUri(http://www.baidu ...
- new_things
'NapCat' in AppStore for reading codes from github. and the ----minibufexpl | + nerd ...
- 使用OrderBy对List<Person>集合排序
string sortOrder = Request.QueryString["sortOrder"]; string sortField = Request.QueryStr ...