感谢支持
我们一直在努力

OpenStack之基础环境准备(L版)

CentOS7.1  openstack L版本,环境规划如下
[root@controller ~]# ansible web -a ‘hostname’
172.16.80.131 | SUCCESS | rc=0 >>
computer1
172.16.80.130 | SUCCESS | rc=0 >>
controller
[root@controller ~]# ansible web -a ‘cat /etc/hosts’
172.16.80.131 | SUCCESS | rc=0 >>
127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
::1        localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.80.130 controller
172.16.80.131 computer1
172.16.80.130 | SUCCESS | rc=0 >>
127.0.0.1  localhost localhost.localdomain localhost4 localhost4.localdomain4
::1        localhost localhost.localdomain localhost6 localhost6.localdomain6
172.16.80.130 controller
172.16.80.131 computer1

1、配置时间同步

[root@controller ~]# ansible web -a ‘yum install chrony -y’

在controller上面修改
[root@controller ~]# vim /etc/chrony.conf
allow 172.16.80.0/24

[root@controller ~]# systemctl enable chronyd.service
[root@controller ~]# systemctl start chronyd.service
[root@controller ~]# ansible web -a ‘date’
172.16.80.130 | SUCCESS | rc=0 >>
Sat Oct 29 21:31:36 CST 2016

172.16.80.131 | SUCCESS | rc=0 >>
Sat Oct 29 21:31:36 CST 2016

[root@controller ~]# ansible web -a ‘timedatectl set-timezone Asia/Shanghai’ 设置时区

2、安装openstack源
[root@controller ~]# yum install centos-release-openstack-liberty -y
[root@controller ~]# yum install https://rdoproject.org/repos/openstack-liberty/rdo-release-liberty.rpm -y

3、安装数据库并配置
[root@controller ~]# yum install mariadb mariadb-server MySQL-Python -y
[root@controller ~]# vim /etc/my.cnf
[mysqld]
default-storage-engine = innodb
innodb_file_per_table
collation-server = utf8_general_ci
init-connect = ‘SET NAMES utf8’
character-set-server = utf8

[root@controller ~]# systemctl enable mariadb.service
Created symlink from /etc/systemd/system/multi-user.target.wants/mariadb.service to /usr/lib/systemd/system/mariadb.service.
[root@controller ~]# systemctl start mariadb.service

4、创建数据库及授权

MariaDB [(none)]> CREATE DATABASE keystone;
Query OK, 1 row affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone’@’localhost’ IDENTIFIED BY ‘keystone’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON keystone.* TO ‘keystone’@’%’ IDENTIFIED BY ‘keystone’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> CREATE DATABASE glance;
Query OK, 1 row affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO ‘glance’@’localhost’ IDENTIFIED BY ‘glance’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON glance.* TO ‘glance’@’%’ IDENTIFIED BY ‘glance’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> CREATE DATABASE nova;
Query OK, 1 row affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO ‘nova’@’localhost’ IDENTIFIED BY ‘nova’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON nova.* TO ‘nova’@’%’ IDENTIFIED BY ‘nova’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> CREATE DATABASE neutron;
Query OK, 1 row affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron’@’localhost’ IDENTIFIED BY ‘neutron’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON neutron.* TO ‘neutron’@’%’ IDENTIFIED BY ‘neutron’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> CREATE DATABASE cinder;
Query OK, 1 row affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder’@’localhost’ IDENTIFIED BY ‘cinder’;
Query OK, 0 rows affected (0.00 sec)
 
MariaDB [(none)]> GRANT ALL PRIVILEGES ON cinder.* TO ‘cinder’@’%’ IDENTIFIED BY ‘cinder’;
Query OK, 0 rows affected (0.00 sec)

5、安装消息队列,添加用户授权
[root@controller ~]# yum install rabbitmq-server -y

[root@controller ~]# systemctl enable rabbitmq-server.service
Created symlink from /etc/systemd/system/multi-user.target.wants/rabbitmq-server.service to /usr/lib/systemd/system/rabbitmq-server.service.
[root@controller ~]# systemctl start rabbitmq-server.service
[root@controller ~]# rabbitmqctl add_user openstack openstack
Creating user “openstack” …

[root@controller ~]# rabbitmqctl set_permissions openstack “.*” “.*” “.*”
Setting permissions for user “openstack” in vhost “/” …

[root@controller ~]# rabbitmq-plugins list
 Configured: E = explicitly enabled; e = implicitly enabled
 | Status:  [failed to contact rabbit@controller – status not shown]
 |/
[  ] amqp_client                      3.6.5
[  ] cowboy                            1.0.3
[  ] cowlib                            1.0.1
[  ] mochiweb                          2.13.1
[  ] rabbitmq_amqp1_0                  3.6.5
[  ] rabbitmq_auth_backend_ldap        3.6.5
[  ] rabbitmq_auth_mechanism_ssl      3.6.5
[  ] rabbitmq_consistent_hash_exchange 3.6.5
[  ] rabbitmq_event_exchange          3.6.5
[  ] rabbitmq_federation              3.6.5
[  ] rabbitmq_federation_management    3.6.5
[  ] rabbitmq_jms_topic_exchange      3.6.5
[  ] rabbitmq_management              3.6.5
[  ] rabbitmq_management_agent        3.6.5
[  ] rabbitmq_management_visualiser    3.6.5
[  ] rabbitmq_mqtt                    3.6.5
[  ] rabbitmq_recent_history_exchange  1.2.1
[  ] rabbitmq_sharding                0.1.0
[  ] rabbitmq_shovel                  3.6.5
[  ] rabbitmq_shovel_management        3.6.5
[  ] rabbitmq_stomp                    3.6.5
[  ] rabbitmq_top                      3.6.5
[  ] rabbitmq_tracing                  3.6.5
[  ] rabbitmq_trust_store              3.6.5
[  ] rabbitmq_web_dispatch            3.6.5
[  ] rabbitmq_web_stomp                3.6.5
[  ] rabbitmq_web_stomp_examples      3.6.5
[  ] sockjs                            0.3.4
[  ] webmachine                        1.10.3

[root@controller ~]# rabbitmq-plugins enable rabbitmq_management
The following plugins have been enabled:
  mochiweb
  webmachine
  rabbitmq_web_dispatch
  amqp_client
  rabbitmq_management_agent
  rabbitmq_management

Applying plugin configuration to rabbit@controller… started 6 plugins.

[root@controller ~]# systemctl restart rabbitmq-server.service
[root@controller ~]# netstat -lntup |grep 5672

访问测试http://172.16.80.130:15672/  默认用户名密码  guest/guest

role设置为administrator,并设置openstack的密码

————————————–分割线 ————————————–

下面是小编为你精选的Openstack相关知识,看看是否有你喜欢的

Ubuntu 16.04 下 OpenStack 安装部署 http://www.linuxidc.com/Linux/2016-06/132188.htm

在Ubuntu 12.10 上安装部署Openstack http://www.linuxidc.com/Linux/2013-08/88184.htm

Ubuntu 12.04 OpenStack Swift单节点部署手册 http://www.linuxidc.com/Linux/2013-08/88182.htm

OpenStack云计算快速入门教程 http://www.linuxidc.com/Linux/2013-08/88186.htm

企业部署OpenStack:该做与不该做的事 http://www.linuxidc.com/Linux/2013-09/90428.htm

CentOS 6.5 x64bit 快速安装OpenStack http://www.linuxidc.com/Linux/2014-06/103775.htm

基于Ubuntu Server 12.04 的OpenStack F版搭建步骤  http://www.linuxidc.com/Linux/2016-05/131498.htm
 
OpenStack Mitaka for Ubuntu 16.04 LTS 部署指南  http://www.linuxidc.com/Linux/2016-09/135488.htm
 
————————————–分割线 ————————————–

本文永久更新链接地址:http://www.linuxidc.com/Linux/2016-11/136924.htm

赞(0) 打赏
转载请注明出处:服务器评测 » OpenStack之基础环境准备(L版)
分享到: 更多 (0)

听说打赏我的人,都进福布斯排行榜啦!

支付宝扫一扫打赏

微信扫一扫打赏