设为首页 收藏本站
查看: 1070|回复: 0

[经验分享] 【N版】openstack——基础环境准备(二)

[复制链接]
累计签到:1 天
连续签到:1 天
发表于 2016-12-30 09:59:03 | 显示全部楼层 |阅读模式
【N版】openstack——基础环境准备
一.版本演化

版本名称
   

版本日期
   

包含组件代码名称

Austin
   

2010-10-21
   

Nova,Swift

Bexar
   

2011-02-03
   

Nova,Swift,Glance

Cactus
   

2011-04-15
   

Nova,Swift,Glance

Diablo
   

2011-09-22
   

Nova,Swift,Glance

Essex
   

2012-04-05
   

Nova,Swift,Glance,Horizon,Keystone

Folsom
   

2012-09-27
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder

Grizzly
   

2013-04-04
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder

Havana
   

2013-10-17
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder,Heat,

Ceilometer

Icehouse
   

2014-04-17
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder,Heat,

Ceilometer,Trove

Juno
   

2014-10-16
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder,

Heat,Ceilometer,Trove,Sahara

Kilo
   

2015-04-30
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder,Heat,

Ceilometer,Trove,Sahara,Ironic

Liberty
   

2015-10-16
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder,Heat,

Ceilometer,Trove,Sahara,Ironic,Zaqar, Manila, Designate, Barbican

Mitaka
   

2016-04-08
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder,Heat,

Ceilometer,Trove,Sahara,Ironic,Zaqar, Manila, Designate, Barbican

Newton
   

2016-10-06
   

Nova,Swift,Glance,Horizon,Keystone,Quantum,Cinder,Heat,

Ceilometer,Trove,Sahara,Ironic,Zaqar, Manila, Designate, Barbican


二.基础环境
2.1环境介绍

    linux-node1:

[iyunv@linux-node1~]# cat /etc/redhat-release

CentOS Linux release7.2.1511 (Core)

[iyunv@linux-node1~]# uname -r

3.10.0-327.36.3.el7.x86_64

[iyunv@linux-node1~]# hostname

linux-node1.example.com

[iyunv@linux-node1~]# ifconfig eth0 |awk -F '[ :]+' 'NR ==2 {print $3}'

192.168.56.11



    linux-node2:

[iyunv@linux-node2~]# cat /etc/redhat-release

CentOS Linux release7.2.1511 (Core)

[iyunv@linux-node2~]# uname -r

3.10.0-327.36.3.el7.x86_64

[iyunv@linux-node2~]# hostname

linux-node2.example.com

[iyunv@linux-node2~]# ifconfig eth0 |awk -F '[ :]+' 'NR ==2 {print $3}'

192.168.56.12
2.2安装包准备
2.2.1两个节点都安装:

[iyunv@linux-node1~]# yum install centos-release-openstack-newton –y

                                                                                                       <- openstack N版 仓库 ->

[iyunv@linux-node1~]# yum install python-openstackclient –y    <- openstack客户端 ->

[iyunv@linux-node1~]# yum install openstack-selinux –y  

<- 如果没有关闭selinux安装这个包会自动设置selinux支持openstack ->


2.2.2在node1上安装:

[iyunv@linux-node1 ~]# yum install mariadbmariadb-server python2-PyMySQL –y

<- 安装数据库->

[iyunv@linux-node1 ~]# vim/etc/my.cnf.d/openstack.cnf  <- 编辑数据库配置文件->

[mysqld]

bind-address = 192.168.56.11              <- 监听地址 ->

default-storage-engine = innodb             <- 默认引擎 ->

innodb_file_per_table

max_connections = 4096                 <- 最大连接数->

collation-server = utf8_general_ci           <- 核对字符集 ->

character-set-server = utf8              <- 字符集 ->

[iyunv@linux-node1 ~]# yum installrabbitmq-server    <- 安装rabbitMQ消息队列->

[iyunv@linux-node1 ~]#  yum install memcached python-memcached <- 安装缓存 ->

[iyunv@linux-node1 ~]# yum installopenstack-keystone httpd mod_wsgi –y

<- 安装keystone及wsgi模块 ,openstack的认证服务->

[iyunv@linux-node1 ~]# yum installopenstack-glance –y

<- 安装glance,openstack的镜像服务 ->

[iyunv@linux-node1 ~]# yum install –y \ <- 安装nova,openstack的计算服务->

openstack-nova-api \                 <- nova的api接口 ->

openstack-nova-conductor \              <- 计算节点访问数据库的中间件 ->

openstack-nova-console \               <- 控制台授权认证 ->

openstack-nova-novncproxy \             <- VNC代理 ->

openstack-nova-scheduler               <- 云主机调度 ->

[iyunv@linux-node1 ~]# yum install -y \       <- 安装neutron,openstack的网络服务 ->

openstack-neutron \

openstack-neutron-ml2 \

openstack-neutron-linuxbridge \

ebtables
2.2.3在node2上安装

[iyunv@linux-node2 ~]# yum installopenstack-nova-compute –y <- 计算节点nova->

[iyunv@linux-node2 ~]# yum installopenstack-neutron-linuxbridge ebtables ipset –y                             <-计算节点neutron ->
2.3时间同步

[iyunv@linux-node1 ~]# ntpdatetime1.aliyun.com     <- 两台机器均要做时间同步 ->

19 Dec 13:15:45 ntpdate[16110]: step timeserver 115.28.122.198 offset -28798.618654 sec


三.数据库环境及消息队列环境配置
2.1数据库配置

[iyunv@linux-node1 ~]# cat/etc/my.cnf.d/openstack.cnf   <- 准备环境时配置的 ->

[mysqld]

bind-address = 192.168.56.11



default-storage-engine = innodb

innodb_file_per_table

max_connections = 4096

collation-server = utf8_general_ci

character-set-server = utf8

[iyunv@linux-node1 ~]# systemctl enablemariadb.service   <- 允许数据库启动 ->

[iyunv@linux-node1 ~]# systemctl startmariadb.service   <- 启动数据库 ->

[iyunv@linux-node1 ~]#mysql_secure_installation      <- 设置密码并配置 ->



NOTE: RUNNING ALL PARTS OF THIS SCRIPT IS RECOMMENDEDFOR ALL MariaDB

     SERVERS IN PRODUCTION USE!  PLEASEREAD EACH STEP CAREFULLY!



In order to log into MariaDB to secure it,we'll need the current

password for the root user.  If you've just installed MariaDB, and

you haven't set the root password yet, thepassword will be blank,

so you should just press enter here.



Enter current password for root (enter fornone):

OK, successfully used password, moving on...



Setting the root password ensures thatnobody can log into the MariaDB

root user without the proper authorisation.



Set root password? [Y/n] y

New password:

Re-enter new password:

Password updated successfully!

Reloading privilege tables..

...Success!





By default, a MariaDB installation has ananonymous user, allowing anyone

to log into MariaDB without having to have auser account created for

them. This is intended only for testing, and to make the installation

go a bit smoother.  You should remove them before moving into a

production environment.



Remove anonymous users? [Y/n] y

...Success!



Normally, root should only be allowed toconnect from 'localhost'.  This

ensures that someone cannot guess at theroot password from the network.



Disallow root login remotely? [Y/n] y

...Success!



By default, MariaDB comes with a databasenamed 'test' that anyone can

access. This is also intended only for testing, and should be removed

before moving into a production environment.



Remove test database and access to it? [Y/n]y

-Dropping test database...

...Success!

-Removing privileges on test database...

...Success!



Reloading the privilege tables will ensurethat all changes made so far

will take effect immediately.



Reload privilege tables now? [Y/n] y

...Success!



Cleaning up...



All done! If you've completed all of the above steps, your MariaDB

installation should now be secure.



Thanks for using MariaDB!


2.2配置rabbitMQ消息队列

[iyunv@linux-node1 ~]# systemctl enablerabbitmq-server.service

[iyunv@linux-node1 ~]# systemctl startrabbitmq-server.service  <- 启动 ->

[iyunv@linux-node1 ~]# rabbitmqctl add_useropenstack openstack  <- 添加用户 ->

Creating user "openstack" ...

[iyunv@linux-node1 ~]# rabbitmqctlset_permissions openstack ".*" ".*" ".*"

Setting permissions for user"openstack" in vhost "/" ...     <- 设置权限->

[iyunv@linux-node1 ~]# rabbitmq-pluginsenable rabbitmq_management <- 重启 ->

The following plugins have been enabled:

mochiweb

webmachine

rabbitmq_web_dispatch

amqp_client

rabbitmq_management_agent

rabbitmq_management



Applying plugin configuration torabbit@linux-node1... started 6 plugins.



页面访问:192.168.56.11:15672打开rabbitmq页面




用户名:guest

密码:guest



openstack为上文创建的用户

运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.yunweiku.com/thread-321455-1-1.html 上篇帖子: 【N版】openstack——走进云计算 下篇帖子: 【N版】openstack——认证服务keystone(三)
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

快速回复 返回顶部 返回列表