OpenStack

Posted winter1519

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了OpenStack相关的知识,希望对你有一定的参考价值。

使用kolla-ansible部署OpenStack。

由于环境有限就使用VMware虚拟机进行操作,部署一个单实例的。

关于OpenStack的概念,历史再次就不在赘述了,直接开搞吧。

Linux系统初始配置。

1、关闭selinux和防火墙。

[[email protected] ~]# systemctl stop firewalld.service   关闭防火墙
[[email protected] ~]# systemctl disable firewalld         开机关闭
2、安装epel源

[[email protected] ~]# yum install epel-release -y
3、配置hosts

[[email protected] ~]# cat /etc/hostname
CFCA
[[email protected] ~]# cat /etc/hosts
127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6
192.168.209.6 CFCA
4、同步时间

[[email protected] ~]# yum install ntp -y
[[email protected] ~]# systemctl start ntp
[[email protected] ~]# systemctl enable ntpd.service
5、配置pip镜像源,方便下载Python库
[[email protected] ~]# mkdir ~/.pip/
[[email protected] ~]# vim ~/.pip/pip.conf
[global]
index-url = http://mirrors.aliyun.com/pypi/simple/
[install]
trusted-host=mirrors.aliyun.com
6、配置网卡信息
添加网卡。

ens32: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.209.6  netmask 255.255.255.0  broadcast 192.168.209.255
        inet6 fe80::97dd:b327:4a4e:afdb  prefixlen 64  scopeid 0x20<link>
        ether 00:0c:29:7d:60:e3  txqueuelen 1000  (Ethernet)
        RX packets 952964  bytes 1426235645 (1.3 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 598664  bytes 45943842 (43.8 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ens35: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:0c:29:7d:60:ed  txqueuelen 1000  (Ethernet)
        RX packets 5310  bytes 1766547 (1.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

[[email protected] network-scripts]# cp ifcfg-ens32 ifcfg-35
[[email protected] network-scripts]# vim ifcfg-ens35
TYPE=Ethernet
BOOTPROTO=none
NAME=ens35
DEVICE=ens35
ONBOOT=yes

安装基础包和docker服务

1、安装基础包

[[email protected] ~]# yum install python-devel libffi-devel gcc openssl-devel git python-pip -y
[[email protected] ~]# pip install -U pip    #升级一下pip
[[email protected] ~]# yum install -y yum-utils device-mapper-persistent-data lvm2    #安装一下必要的系统工具
2、添加docker yum源并安装docker

[[email protected] ~]#  systemctl stop libvirtd.service && systemctl disable libvirtd.service && systemctl status libvirtd.service

[[email protected] ~]# yum remove  docker docker-io docker-selinux python-docker-py    如果已经安装了docker的话先卸载了,以免不兼容

添加docker-ce yum源并安装docker-ce

[[email protected] ~]# yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo
[[email protected] ~]# yun install docker-ce   安装docker-ce社区版本
[[email protected] ~]# systemctl start  docker  &&  systemctl enable docker && systemctl status docker   启动docker
3、设置docker volume卷挂载方式

 















































以上是关于OpenStack的主要内容,如果未能解决你的问题,请参考以下文章

OpenStackOpenStack系列15之OpenStack高可用详解

OpenStackOpenStack与云计算概述

OpenStack概念

Openstack

OpenStack基础知识(持续更新)!

openstack-5computer(计算服务)