1 Openstack-Ussuri部署-环境准备-ubuntu1804

1.1 环境介绍

在这里插入图片描述

本文采用的是:控制节点+网络节点+计算节点的模式,三张网卡,没有做bond

OS:ubuntu1~18.04

eth0 172.16.1.0/24 Management network
eth1 172.16.2.0/24 External network
eth2 172.16.3.0/24 Tunnel network

controller160 eth0:172.16.1.160 eth1:172.16.2.160 eth2:172.16.3.160 2c2g
neutron161 eth0:172.16.1.161 eth1:172.16.2.161 eth2:172.16.3.161 1c1g
compute162 eth0:172.16.1.162 eth1:172.16.2.162 eth2:172.16.3.162 1c1g

1.2 主机名、IP地址配置

#主机名设置

hostnamectl set-hostname controller160
su -

#IP配置,根据个人习惯使用最快的方式去配置即可
#设置完成后,使用netplan apply让网络配置生效
#vim /etc/netplan/50-cloud-init.yaml

network:
    version: 2
    ethernets:
        eth0:
            addresses:
            - 172.16.1.160/24
            gateway4: 172.16.1.254
            nameservers:
                addresses:
                - 192.168.31.1
                search:
                - lan
            set-name: eth0
        eth1:
            addresses:
            - 172.16.2.160/24
            #gateway4: 172.16.2.254
            nameservers:
                addresses:
                - 192.168.31.1
                search:
                - lan
            set-name: eth1
        eth2:
            addresses:
            - 172.16.3.160/24
            #gateway4: 172.16.3.254
            nameservers:
                addresses:
                - 192.168.31.1
                search:
                - lan
            set-name: eth2

#配置hosts,添加以下字段:
#vim /etc/hosts

vim /etc/hosts
#[Ussuri]
172.16.1.160 controller160
172.16.1.161 neutron161
172.16.1.162 compute162

1.3 基础软件安装&ntp时间同步 - 每台部署

#移动自带源

mv /etc/apt/sources.list /etc/apt/sources.list.backup

#更换成阿里源
#vim /etc/apt/sources.list

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

#更新源包

apt-get update

#安装基础软件

apt install ifupdown net-tools wget vim ntpdate bash-completion lrzsz -y

#ntp时间同步

ntpdate ntp3.aliyun.com

echo "*/3 * * * * ntpdate ntp3.aliyun.com &> /dev/null" > /tmp/crontab

crontab /tmp/crontab

1.4 关闭防火墙 selinux - 每台部署

#注意:线上生产环境请使用iptable放行的方式
#关闭防火墙

sudo ufw status

sudo ufw disable

#关闭selinux,最小化安装是没有selinux

1.5 安装Ussuri版yum源 - 每台部署

#安装ussuri版本yum源

add-apt-repository cloud-archive:ussuri

apt-get update

apt dist-upgrade

#安装openstack client

apt install python3-openstackclient

至此,环境准备已完毕,如有问题请联系我改正,感激不尽!

1.x部署过程中碰到的问题

eg1.0 当设置三张网卡的时候,可能会出现ping不通baidu.com
解决方案:三张网卡只选管理网卡做为默认网关即可,gateway4只配置在eth0,可解决

你可能感兴趣的:(1 Openstack-Ussuri部署-环境准备-ubuntu1804)