OpenStack Pike Minimal安装:一、环境准备

1.关闭防火墙和selinux

2.配置hosts

[[email protected] ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
20.0.20.21 controller
20.0.20.22 compute

3.配置ntp

yum -y install chrony
[[email protected] ~]# vim /etc/chrony.conf
allow 20.0.20.0/16
server ntp1.aliyun.com iburst
#compute节点只需同步到controller节点
[[email protected] ~]# systemctl enable chronyd.service
[[email protected] ~]# systemctl start chronyd.service

4.在所有节点上安装openstack

[[email protected] ~]# yum install centos-release-openstack-pike -y
[[email protected] ~]# yum upgrade
[[email protected] ~]# yum install python-openstackclient -y

5.在controller节点上安装数据库

[[email protected] ~]# yum install mariadb mariadb-server python2-PyMySQL -y
[[email protected] ~]# cat /etc/my.cnf.d/openstack.cnf
[mysqld]
bind-address = 20.0.20.21
default-storage-engine = innodb
innodb_file_per_table
max_connections = 4096
collation-server = utf8_general_ci
character-set-server = utf8
[[email protected] ~]# systemctl enable mariadb.service
[[email protected] ~]# systemctl start mariadb.service
[[email protected] ~]# mysql_secure_installation

6.数据库配置,创建数据库、用户授权

mysql -u root -p

create database keystone;
grant all privileges on keystone.* to ‘keystone‘@‘localhost‘ identified by ‘keystone‘;
grant all privileges on keystone.* to ‘keystone‘@‘%‘ identified by ‘keystone‘;
grant all privileges on keystone.* to ‘keystone‘@‘controller‘ identified by ‘keystone‘;

create database glance;
grant all privileges on glance.* to ‘glance‘@‘localhost‘ identified by ‘glance‘;
grant all privileges on glance.* to ‘glance‘@‘%‘ identified by ‘glance‘;
grant all privileges on glance.* to ‘glance‘@‘controller‘ identified by ‘glance‘;

create database nova;
grant all privileges on nova.* to ‘nova‘@‘localhost‘ identified by ‘nova‘;
grant all privileges on nova.* to ‘nova‘@‘%‘ identified by ‘nova‘;
grant all privileges on nova.* to ‘nova‘@‘controller‘ identified by ‘nova‘;

create database nova_api;
grant all privileges on nova_api.* to ‘nova‘@‘localhost‘ identified by ‘nova‘;
grant all privileges on nova_api.* to ‘nova‘@‘%‘ identified by ‘nova‘;
grant all privileges on nova_api.* to ‘nova‘@‘controller‘ identified by ‘nova‘;

create database nova_cell0;
grant all privileges on nova_cell0.* to ‘nova‘@‘localhost‘ identified by ‘nova‘;
grant all privileges on nova_cell0.* to ‘nova‘@‘%‘ identified by ‘nova‘;
grant all privileges on nova_cell0.* to ‘nova‘@‘controller‘ identified by ‘nova‘;

create database neutron;
grant all privileges on neutron.* to ‘neutron‘@‘localhost‘ identified by ‘neutron‘;
grant all privileges on neutron.* to ‘neutron‘@‘%‘ identified by ‘neutron‘;
grant all privileges on neutron.* to ‘neutron‘@‘controller‘ identified by ‘neutron‘;

flush privileges;
MariaDB [(none)]> select user,host from mysql.user;
+----------+------------+
| user     | host       |
+----------+------------+
| glance   | %          |
| keystone | %          |
| neutron  | %          |
| nova     | %          |
| root     | 127.0.0.1  |
| root     | ::1        |
| glance   | controller |
| keystone | controller |
| neutron  | controller |
| nova     | controller |
| root     | controller |
| glance   | localhost  |
| keystone | localhost  |
| neutron  | localhost  |
| nova     | localhost  |
| root     | localhost  |
+----------+------------+
16 rows in set (0.00 sec)

MariaDB [(none)]> show databases;
+--------------------+
| Database           |
+--------------------+
| glance             |
| information_schema |
| keystone           |
| mysql              |
| neutron            |
| nova               |
| nova_api           |
| nova_cell0         |
| performance_schema |
+--------------------+
9 rows in set (0.00 sec)

7.在controller节点安装RabbitMQ消息队列

[[email protected] ~]# yum install rabbitmq-server -y
[[email protected] ~]# systemctl enable rabbitmq-server.service
[[email protected] ~]# systemctl start rabbitmq-server.service
[[email protected] ~]# rabbitmqctl add_user openstack openstack
Creating user "openstack" ...
[[email protected] ~]# rabbitmqctl set_permissions openstack ".*" ".*" ".*"
Setting permissions for user "openstack" in vhost "/" ...
[[email protected] ~]# rabbitmq-plugins enable rabbitmq_management
[[email protected] ~]# lsof -i:15672
COMMAND   PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
beam.smp 3162 rabbitmq   54u  IPv4 449707      0t0  TCP *:15672 (LISTEN)

#访问RabbitMQ,访问地址是http://ip:15672
#默认用户名密码都是guest,浏览器添加openstack用户到组并登陆测试

8.在controller节点上安装memcached

[[email protected] ~]# yum install memcached python-memcached -y
[[email protected] ~]# systemctl enable memcached.service
[[email protected] ~]# systemctl start memcached.service

原文地址:http://blog.51cto.com/lullaby/2169524

时间: 2024-10-07 08:44:49

OpenStack Pike Minimal安装:一、环境准备的相关文章

OpenStack Pike Minimal安装:二、身份认证

1.在controller节点上安装keystone [email protected] ~]# yum install openstack-keystone httpd mod_wsgi -y 2.配置 [[email protected] ~]# vim /etc/keystone/keystone.conf [database] connection = mysql+pymysql://keystone:[email protected]/keystone [token] provider

OpenStack Pike Minimal安装:三、镜像管理

1.创建服务凭据 #先使用脚本登陆admin [[email protected] ~]# . admin-openstack.sh ①创建glance user openstack user create --domain default --password-prompt glance ②关联 openstack role add --project service --user glance admin ③创建glance service openstack service create

OpenStack Pike Minimal安装:四、计算服务

Ⅰ.在controller节点上配置nova 1.创建nova服务凭据 #先使用脚本登陆admin [[email protected] ~]# . admin-openstack.sh ①创建nova user openstack user create --domain default --password-prompt nova ②关联 openstack role add --project service --user nova admin ③创建nova service openst

OpenStack Pike Minimal安装:六、管理界面

Ⅰ.配置dashboard 1.在controller上安装dashboard [[email protected] ~]# yum install openstack-dashboard -y 2.配置 ①修改local_settings文件 [[email protected] ~]# vim /etc/openstack-dashboard/local_settings OPENSTACK_HOST = "controller" OPENSTACK_KEYSTONE_URL =

OpenStack pike版 安装openstack服务(4) 续安装openstack服务(3)    

Compute service overview 计算服务概述 OpenStack用于对主机的计算和管理云计算系统.OpenStack的计算是一个基础设施即服务(IaaS)系统的一个重要组成部分.主要模块是用python实现的. OpenStack计算与OpenStack身份验证交互用来完成认证:OpenStack镜像服务用于磁盘和服务器镜像:用户和管理接口为OpenStack Dashboard.镜像访问受到项目和用户的限制,每个项目的配额是有限的(例如,实例的数量).OpenStack计算可

OpenStack pike版 安装openstack服务(3) 续基本环境部署(2)

安装openstack服务 所有openstack服务的安装指南链接:https://docs.openstack.org/pike/install/ 最小化部署,需要按照下面指定的顺序安装以下服务: Identity service – keystone installation for Pike Image service – glance installation for Pike Compute service – nova installation for Pike Networkin

OpenStack pike版 安装openstack服务(5) 续安装openstack服务(4)

网络服务简介 OpenStack网络(neutron)允许您创建和将其他OpenStack服务管理的接口设备附加到网络中.插件可以适应不同的网络设备和软件,为OpenStack的架构和部署提供灵活性. 它包括以下组件: neutron-server:接受并将API请求路由到相应的OpenStack网络插件以进行操作. OpenStack Networking plug-ins and agent:即插即用端口,创建网络或者子网,提供IP地址.这些插件和代理根据特定云使用的供应商和技术而有所不同.

CentOS7.2非HA分布式部署Openstack Pike版 (实验)

部署环境 一.组网拓扑 二.设备配置 笔记本:联想L440处理器:i3-4000M 2.40GHz内存:12G虚拟机软件:VMware? Workstation 12 Pro(12.5.2 build-4638234) 三.虚拟机配置 Controller节点:系统:CentOS7.2 64位(最小化安装)处理器:4核内存:4G硬盘:100G网卡:3块 Compute节点:系统:CentOS7.2 64位(最小化安装)处理器:4核内存:4G硬盘:100G网卡:3块 Cinder节点:系统:Cen

Openstack(Kilo)学习笔记之环境准备(二)

接上节Openstack(Kilo)学习笔记之环境准备(一) 一.配置源 1.配置EPEL源 yum install http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm 2.配置RDO源 yum install http://rdo.fedorapeople.org/openstack-kilo/rdo-release-kilo.rpm 3.升级系统源 yum upgrade 二.安装配置数据库