开发面试题 multithreading jpa datepicker vue前端框架 vue双向绑定 flink教程视频 java遍历json数组 oracle数据库创建表空间 mysql 导入数据 python输出 python3网络编程 python怎么调用函数 linux配置python环境 javapackage java的map java中获取当前时间 java怎么输出数组 linux文档 linux装机 m4a转mp3格式转换器 jb51 计价软件 fireworks8序列号 linux端口映射 混沌世界隐藏英雄密码 win10wifi 早早省 快手规则 勇敢者的游戏3 删除mysql服务 安卓人脸识别 pyodbc 联发科p22 xshow autoit js动画效果 批量更新 cad波浪线 换肤小助手
当前位置: 首页 > 学习教程  > 编程语言

OpenStack单节点完整部署[T版]

2020/10/16 17:49:41 文章标签:

OpenStack单节点完整部署[T版] #单节点部署配置最低要求 #磁盘的容量必须要大一点 最好设置100G角色系统内存磁盘CPU(启用虚拟化功能)客户端CentOS78G80G系统盘数据盘双核双线程 注:虚拟机处于NAT模式下,保证能够正常上网 #安装好…

OpenStack单节点完整部署[T版]

#单节点部署配置最低要求
#磁盘的容量必须要大一点 最好设置100G+
角色系统内存磁盘CPU(启用虚拟化功能)
客户端CentOS78G80G系统盘+数据盘双核双线程

注:虚拟机处于NAT模式下,保证能够正常上网

在这里插入图片描述

#安装好一台全新的虚拟机 配置好IP 启动ssh远程连接方便进行配置

在这里插入图片描述

#接下来把NET模式的动态IP改成静态IP 要保证PING百度能通
[root@openstack network-scripts]# vi ifcfg-ens33 
[root@openstack network-scripts]# cat !$
cat ifcfg-ens33
TYPE=Ethernet
PROXY_METHOD=none
BROWSER_ONLY=no
BOOTPROTO=static
DEFROUTE=yes
IPV4_FAILURE_FATAL=no
IPV6INIT=yes
IPV6_AUTOCONF=yes
IPV6_DEFROUTE=yes
IPV6_FAILURE_FATAL=no
IPV6_ADDR_GEN_MODE=stable-privacy
NAME=ens33
UUID=3cba7c77-a6fa-482d-8c4f-d27437771308
DEVICE=ens33
ONBOOT=yes
IPADDR=192.168.22.142
NETMASK=255.255.255.0
GATEWAY=192.168.22.2
DNS1=8.8.8.8
DNS2=114.114.114.114
[root@openstack network-scripts]# cat /etc/resolv.conf
# Generated by NetworkManager
nameserver 8.8.8.8
nameserver 114.114.114.114
[root@openstack network-scripts]# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: ens33: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 00:0c:29:95:e3:97 brd ff:ff:ff:ff:ff:ff
    inet 192.168.22.142/24 brd 192.168.22.255 scope global noprefixroute ens33
       valid_lft forever preferred_lft forever
    inet6 fe80::83a5:aa32:a511:baf8/64 scope link noprefixroute 
       valid_lft forever preferred_lft forever
[root@openstack network-scripts]# 

在这里插入图片描述

#关闭防火墙、核心防护
[root@openstack network-scripts]# ping www.baidu.com
PING www.wshifen.com (104.193.88.77) 56(84) bytes of data.
64 bytes from 104.193.88.77 (104.193.88.77): icmp_seq=1 ttl=128 time=205 ms
64 bytes from 104.193.88.77 (104.193.88.77): icmp_seq=2 ttl=128 time=204 ms
^C
--- www.wshifen.com ping statistics ---
4 packets transmitted, 2 received, 50% packet loss, time 3014ms
rtt min/avg/max/mdev = 204.886/205.327/205.768/0.441 ms
[root@openstack network-scripts]# 
[root@openstack network-scripts]# systemctl stop firewalld
[root@openstack network-scripts]# systemctl disable firewalld
Removed symlink /etc/systemd/system/multi-user.target.wants/firewalld.service.
Removed symlink /etc/systemd/system/dbus-org.fedoraproject.FirewallD1.service.
[root@openstack network-scripts]# setenforce 0
[root@openstack network-scripts]# getenforce 
Permissive
[root@openstack network-scripts]# vi /etc/sysconfig/selinux 
[root@openstack network-scripts]# cat !$
cat /etc/sysconfig/selinux

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=disabled
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected. 
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted 

在这里插入图片描述

#关闭NetworkManager服务
[root@openstack network-scripts]# systemctl disable NetworkManager
Removed symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.NetworkManager.service.
Removed symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service.
Removed symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service.
[root@openstack network-scripts]# systemctl stop NetworkManager
[root@openstack network-scripts]# 

在这里插入图片描述

#YUM源配置
[root@openstack network-scripts]# cd /etc/yum.repos.d/
[root@openstack yum.repos.d]# ls
CentOS-Base.repo  CentOS-CR.repo  CentOS-Debuginfo.repo  CentOS-fasttrack.repo  CentOS-Media.repo  CentOS-Sources.repo  CentOS-Vault.repo
[root@openstack yum.repos.d]# mkdir bak
[root@openstack yum.repos.d]# mv ./*.repo bak/
[root@openstack yum.repos.d]# vi CentOS-Base.repo
[root@openstack yum.repos.d]# cat !$
cat CentOS-Base.repo
[openstack-train]
name=openstack-train
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-train/
enabled=1
gpgcheck=0
#[openstack-ocata]
#name=openstack-ocata
#baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-ocata/
#enabled=1
#gpgcheck=0
#[openstack-rocky]
#name=openstack-rocky
#baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-rocky/
#enabled=1
#gpgcheck=0
 
[kvm-common]
name=kvm-common
baseurl=https://mirrors.aliyun.com/centos/7/virt/x86_64/kvm-common/
enabled=1
gpgcheck=0
 
[base]
name=CentOS-$releasever - Base - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
baseurl=http://mirrors.163.com/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#released updates
[updates]
name=CentOS-$releasever - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
name=CentOS-$releasever - Updates - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
baseurl=http://mirrors.163.com/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that may be useful
[extras]
name=CentOS-$releasever - Extras - 163.com
#mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras
baseurl=http://mirrors.163.com/centos/$releasever/extras/$basearch/
gpgcheck=1
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus - 163.com
baseurl=http://mirrors.163.com/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=0
gpgkey=http://mirrors.163.com/centos/RPM-GPG-KEY-CentOS-7
[root@openstack yum.repos.d]#

在这里插入图片描述

#删除原有的缓存,建立新的缓存
[root@openstack yum.repos.d]# yum clean all
Loaded plugins: fastestmirror
Cleaning repos: base extras kvm-common openstack-train updates
[root@openstack yum.repos.d]# yum makecache
Loaded plugins: fastestmirror
Determining fastest mirrors
base                                                                                                                                                                                      | 3.6 kB  00:00:00     
extras                                                                                                                                                                                    | 2.9 kB  00:00:00     
kvm-common                                                                                                                                                                                | 3.0 kB  00:00:00     
openstack-train                                                                                                                                                                           | 3.0 kB  00:00:00     
updates                                                                                                                                                                                   | 2.9 kB  00:00:00     
(1/16): base/7/x86_64/group_gz                                                                                                                                                            | 153 kB  00:00:00     
(2/16): base/7/x86_64/primary_db                                                                                                                                                          | 6.1 MB  00:00:00     
(3/16): extras/7/x86_64/filelists_db                                                                                                                                                      | 217 kB  00:00:00     
(4/16): extras/7/x86_64/other_db                                                                                                                                                          | 124 kB  00:00:00     
(5/16): base/7/x86_64/other_db                                                                                                                                                            | 2.6 MB  00:00:00     
(6/16): kvm-common/filelists_db                                                                                                                                                           |  14 kB  00:00:00     
(7/16): kvm-common/primary_db                                                                                                                                                             |  57 kB  00:00:00     
(8/16): kvm-common/other_db                                                                                                                                                               |  71 kB  00:00:00     
(9/16): openstack-train/primary_db                                                                                                                                                        | 1.1 MB  00:00:00     
(10/16): openstack-train/other_db                                                                                                                                                         | 422 kB  00:00:00     
(11/16): base/7/x86_64/filelists_db                                                                                                                                                       | 7.1 MB  00:00:02     
(12/16): updates/7/x86_64/filelists_db                                                                                                                                                    | 2.4 MB  00:00:01     
(13/16): updates/7/x86_64/primary_db                                                                                                                                                      | 4.5 MB  00:00:00     
(14/16): updates/7/x86_64/other_db                                                                                                                                                        | 318 kB  00:00:00     
(15/16): extras/7/x86_64/primary_db                                                                                                                                                       | 206 kB  00:00:05     
(16/16): openstack-train/filelists_db                                                                                                                                                     | 3.2 MB  00:00:07     
Metadata Cache Created
[root@openstack yum.repos.d]# 

在这里插入图片描述

#同步阿里云的时间
[root@openstack yum.repos.d]# yum -y install ntpdate 
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
Package ntpdate-4.2.6p5-29.el7.centos.2.x86_64 already installed and latest version
Nothing to do
[root@openstack yum.repos.d]# ntpdate ntp.aliyun.com
15 Oct 01:14:57 ntpdate[20610]: step time server 203.107.6.88 offset -28799.095887 sec
[root@openstack yum.repos.d]# crontab -e
no crontab for root - using an empty one
crontab: no changes made to crontab
[root@openstack yum.repos.d]# crontab -e
no crontab for root - using an empty one
crontab: installing new crontab
#每两分钟同步一次
[root@openstack yum.repos.d]# crontab -l
*/2 * * * * /usr/sbin/ntpdate ntp.aliyun.com >> /var/log/ntpdate.log
[root@openstack yum.repos.d]# systemctl restart crond
[root@openstack yum.repos.d]# systemctl enable crond
[root@openstack yum.repos.d]# 

在这里插入图片描述

#安装OpenStack T版
#安装OpenStack-packstack软件包

##出现如下界面则安装成功 
##等待时间大约一到二小时
**** Installation completed successfully ******
[root@openstack yum.repos.d]# yum -y install centos-release-openstack-train openstack-packstack
[root@openstack yum.repos.d]# packstack --allinone
Welcome to the Packstack setup utility

The installation log file is available at: /var/tmp/packstack/20201015-013015-jDp7tO/openstack-setup.log
Packstack changed given value  to required value /root/.ssh/id_rsa.pub

Installing:
Clean Up                                             [ DONE ]
Discovering ip protocol version                      [ DONE ]
Setting up ssh keys                                  [ DONE ]
Preparing servers                                    [ DONE ]
Pre installing Puppet and discovering hosts' details [ DONE ]
Preparing pre-install entries                        [ DONE ]
Setting up CACERT                                    [ DONE ]
Preparing AMQP entries                               [ DONE ]
Preparing MariaDB entries                            [ DONE ]
Fixing Keystone LDAP config parameters to be undef if empty[ DONE ]
Preparing Keystone entries                           [ DONE ]
Preparing Glance entries                             [ DONE ]
Checking if the Cinder server has a cinder-volumes vg[ DONE ]
Preparing Cinder entries                             [ DONE ]
Preparing Nova API entries                           [ DONE ]
Creating ssh keys for Nova migration                 [ DONE ]
Gathering ssh host keys for Nova migration           [ DONE ]
Preparing Nova Compute entries                       [ DONE ]
Preparing Nova Scheduler entries                     [ DONE ]
Preparing Nova VNC Proxy entries                     [ DONE ]
Preparing OpenStack Network-related Nova entries     [ DONE ]
Preparing Nova Common entries                        [ DONE ]
Preparing Neutron API entries                        [ DONE ]
Preparing Neutron L3 entries                         [ DONE ]
Preparing Neutron L2 Agent entries                   [ DONE ]
Preparing Neutron DHCP Agent entries                 [ DONE ]
Preparing Neutron Metering Agent entries             [ DONE ]
Checking if NetworkManager is enabled and running    [ DONE ]
Preparing OpenStack Client entries                   [ DONE ]
Preparing Horizon entries                            [ DONE ]
Preparing Swift builder entries                      [ DONE ]
Preparing Swift proxy entries                        [ DONE ]
Preparing Swift storage entries                      [ DONE ]
Preparing Gnocchi entries                            [ DONE ]
Preparing Redis entries                              [ DONE ]
Preparing Ceilometer entries                         [ DONE ]
Preparing Aodh entries                               [ DONE ]
Preparing Puppet manifests                           [ DONE ]
Copying Puppet modules and manifests                 [ DONE ]
Applying 192.168.22.142_controller.pp
Testing if puppet apply is finished: 192.168.22.142_controller.pp  [ - ]
192.168.22.142_controller.pp:                        [ DONE ]           
Applying 192.168.22.142_network.pp
192.168.22.142_network.pp:                           [ DONE ]        
Applying 192.168.22.142_compute.pp
192.168.22.142_compute.pp:                           [ DONE ]        
Applying Puppet manifests                            [ DONE ]
Finalizing                                           [ DONE ]

 **** Installation completed successfully ******

Additional information:
 * Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the VPNaaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks
 * A new answerfile was created in: /root/packstack-answers-20201015-013016.txt
 * Time synchronization installation was skipped. Please note that unsynchronized time on server instances might be problem for some OpenStack components.
 * File /root/keystonerc_admin has been created on OpenStack client host 192.168.22.142. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://192.168.22.142/dashboard .
Please, find your login credentials stored in the keystonerc_admin in your home directory.
 * The installation log file is available at: /var/tmp/packstack/20201015-013015-jDp7tO/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20201015-013015-jDp7tO/manifests
[root@openstack yum.repos.d]# 

在这里插入图片描述

#查看用户名和密码登陆
[root@openstack yum.repos.d]# cd
[root@openstack ~]# ls
anaconda-ks.cfg  keystonerc_admin  keystonerc_demo  packstack-answers-20201015-013016.txt
[root@openstack ~]# cat keystonerc_admin
unset OS_SERVICE_TOKEN
    export OS_USERNAME=admin
    export OS_PASSWORD='f6f154395fcb4d91'
    export OS_REGION_NAME=RegionOne
    export OS_AUTH_URL=http://192.168.22.142:5000/v3
    export PS1='[\u@\h \W(keystone_admin)]\$ '
    
export OS_PROJECT_NAME=admin
export OS_USER_DOMAIN_NAME=Default
export OS_PROJECT_DOMAIN_NAME=Default
export OS_IDENTITY_API_VERSION=3

在这里插入图片描述

在这里插入图片描述

#在设置里面可以修改语言 主界面如下

在这里插入图片描述

在这里插入图片描述


本文链接: http://www.dtmao.cc/news_show_300200.shtml

附件下载

相关教程

    暂无相关的数据...

共有条评论 网友评论

验证码: 看不清楚?