01 OpenStack多节点环境部署之Controller配置详解

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
查看用户:
安装其他服务:apt-get install -y vlan bridge-utils
安装Keystone组件:apt-get install -y keystone
修改配置文件:vi /etc/keystone/keystone.conf
connection = sqlite:////var/lib/keystone/keystone.db把这句改为下面这句(注意IP地址为本机)
配置环境VMware8.0英文版:
Controller的网卡物理配置:
查看IP地址:
查看网关:
配置IP地址及网关等:vi /etc/network/interface
IP地址配置情况如下:
更改主机名:vi /etc/hostname
更改如下:
重启主机,是网络更改生效:
更新系统:apt-get update、apt-get install -y ubuntu-cloud-keyring
安装NTP服务(时间同步服务):apt-get install -y ntp
安装RabbitMQ:apt-get install -y rabbitmq-server
初始化MySQL数据库:(创建一个脚本:create_db.sh,内容如下:)
mysql -u root -p
#Keystone
CREATE DATABASE keystone;
修改配置文件:vi /etc/nova/api-paste.ini
修改vi /etc/nova/nova.conf文件,清空以前的配置,更改为下面的配置:
[DEFAULT]
logdir=/var/log/nova
state_path=/var/lib/nova
lock_path=/run/lock/nova
connection = mysql://keystoneUser:keystonePass@172.16.77.128/keystone
重启服务:service keystone restart
查看下数据库:
把结构同步到数据库中:keystone-manage db_sync
再次查看数据库:
下载脚本:
更改卷:fdisk /dev/loop2
重启服务:
安装Horizon组件:
重启服务:
测试web登录:
登录后:
wgethttps://raw.github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/OVS_MultiNode/KeystoneScripts/keystone_basic.sh
修改脚本:
下载脚本:
wgethttps://raw.github.com/mseknibilel/OpenStack-Grizzly-Install-Guide/OVS_MultiNode/KeystoneScripts/keystone_endpoints_basic.sh
# Compute #
compute_driver=libvirt.LibvirtDriver
# Cinder #
volume_api_class=nova.volume.cinder.API
osapi_volume_listen_port=5900
把Nova同步到数据库:
添加本机解析记录:
重启所有服务:
#Cinder
CREATE DATABASE cinder;
GRANT ALL ON cinder.* TO 'cinderUser'@'%' IDENTIFIED BY 'cinderPass';
quit;
执行脚本:bash create_db.sh
查看数据库创建:
创建不成功,只能手工添加了:
查看创建是否成功:
verbose=True
api_paste_config=/etc/nova/api-paste.ini
compute_scheduler_driver=nova.scheduler.simple.SimpleScheduler
rabbit_host=172.16.77.128
nova_url=http://172.16.77.128:8774/v1.1/
# Imaging service
glance_api_servers=172.16.77.128:9292
image_service=nova.image.glance.GlanceImageService
# Vnc configuration
novnc_enabled=true
novncproxy_base_url=http://172.16.77.128:6080/vnc_auto.html
重启服务:service glance-api restart; service glance-registry restart
查看进程:ps -ef | grep glance
同步结构到库表:
查看同步是否成功:
上传cirros-0.3.0-x86_64-disk.img:
创建镜像:
查看镜像:
安装Quantum组件:apt-get install -y quantum-server
GRANT ALL ON keystone.* TO 'keystoneUser'@'%' IDENTIFIED BY 'keystonePass';
#Glance
CREATE DATABASE glance;
GRANT ALL ON glance.* TO 'glanceUser'@'%' IDENTIFIED BY 'glancePass';
#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 -1-.
novncproxy_port=6080
vncserver_proxyclient_address=172.16.77.128
vncserver_listen=0.0.0.0
# Network settings
network_api_class=nova.network.quantumv2.api.API
sql_connection=mysql://novaUser:novaPass@172.16.77.128/nova
root_helper=sudo nova-rootwrap /etc/nova/rootwrap.conf
# Auth
use_deprecated_auth=false
auth_strategy=keystone
查看服务状态:wenku.baidu.com
安装Cinder组件:
apt-get install -y cinder-api cinder-scheduler cinder-volume iscsitarget open-iscsi iscsitarget-dkms
参数配置,并重启服务:
编辑vi /etc/cinder/api-paste.ini文件:
编辑vi /etc/cinder/cinder.conf文件:
查看数据库:
把结构同步到数据库表:cinder-manage db sync
同步后,查看:
创建卷:dd if=/dev/zero of=cinder-volumes bs=1 count=0 seek=2G
挂载卷:losetup /dev/loop2 cinder-volumes
quantum_admin_auth_url=http://172.16.77.128:35357/v2.0
libvirt_vif_driver=nova.virt.libvirt.vif.LibvirtHybridOVSBridgeDriver
linuxnet_interface_driver=nova.network.linux_net.LinuxOVSInterfaceDriver
把官网源写入到源文件中: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
#Quantum
CREATE DATABASE quantum;
GRANT ALL ON quantum.* TO 'quantumUser'@'%' IDENTIFIED BY 'quantumPass';
#Nova
CREATE DATABASE nova;
GRANT ALL ON nova.* TO 'novaUser'@'%' IDENTIFIED BY 'novaPass';
quantum_url=http://172.16.77.128:9696
quantum_auth_strategy=keystone
quantum_admin_tenant_name=service
quantum_admin_username=quantum
quantum_admin_password=service_pass
安装Mysql数据库:apt-get install -y mysql-server python-mysqldb
输入数据库密码:
确认密码:
配置使所有节点都可以访问MySQL数据库:sed -i 's/127.0.0.1/0.0.0.0/g' /etc/mysql/my.cnf
重启Mysql服务:service mysql restart
修改脚本:
运行脚本:bash keystone_basic.sh、bash keystone_endpoints_basic.sh
创建web登录账户:
编译:
查看用户列表:
安装Glance组件:apt-get install -y glance
修改配置:vi /etc/glance/glance-api-paste.ini
修改配置文件:vi /etc/quantum/plugins/openvswitch/ovs_quantum_plugin.ini
重启服务:
安装Nova组件:
apt-get install -y nova-api nova-cert novnc nova-consoleauth nova-scheduler nova-novncproxy nova-doc nova-conductor
#-1-firewall_driver=nova.virt.libvirt.firewall.IptablesFirewallDriver
#Metadata
service_quantum_metadata_proxy = True
quantum_metadata_proxy_shared_secret = helloOpenStack
相关文档
最新文档