RDO一键快速安装OpenStack-Rocky版

Tawnie ·
更新时间:2024-11-10
· 863 次阅读

环境 VMware CentOS 7 CPU核心数:4 RAM:8G DISK:35G 准备

关于这个配置,是我在试了一天得出的结论,一直卡着

192.168.1.106_controller.pp: Testing if puppet apply is finished: 192.168.1.106_controller.pp [ | ]

我也不知道他一直在测试什么,只是卡着,也不报错。
各种搜,显示关了防火墙,关了selinux,关了networkmanager。然后又查出可能是配置不够,因为自动安装比手动更吃配置,我原先配置是4G2核,升级到4核6G,还是卡,然后升级到4核8G,网上有人说他加到了16G,我一共就16G也没办法试,就8G再看看,这时候等了一会发现他test成功了。
那么大概就是,这个卡着的原因就是因为内存不够。
然后开始配置吧

把网卡改成桥接模式,修改配置文件/etc/sysconfig/network-scripts/ifcfg-eno16777736,DNS要设置好,不然解析不了域名了。GATEWAY可以通过netstat -rn查看。

TYPE=Ethernet BOOTPROTO=static DEFROUTE=yes IPV4_FAILURE_FATAL=no IPV6INIT=yes IPV6_AUTOCONF=yes IPV6_DEFROUTE=yes IPV6_FAILURE_FATAL=no NAME=eno16777736 UUID=acd2af84-eb36-4ffe-8a43-8528e2d8e87c DEVICE=eno16777736 ONBOOT=yes PEERDNS=yes PEERROUTES=yes IPV6_PEERDNS=yes IPV6_PEERROUTES=yes IPADDR=192.168.1.106 NETMASK=255.255.255.0 GATEWAY=192.168.1.1 DNS1=114.114.114.114 DNS2=8.8.4.4

重启网络

systemctl restart network

这里我换源了,但是换了我也不知道是谁的源,随便换个阿里或者163的吧。
配置一下时间同步服务,使用chrony。

yum install -y chrony

编辑配置文件/etc/chrony.conf
添加

restrict 192.168.1.106 #server *ntp.ubuntu.com* iburst server 127.127.1.0 prefer

然后修改主机名

hostname set-hostname controller

改Hostsetc/Hosts添加192.168.1.106 controller
可以重启一下。
关闭防火墙和SELINUX和Network,通过getenforce查看selinux状态(enforcing试开启disable是关闭)。通过systemctl status firewalld查看防火墙状态。
执行systemctl stop firewalld && systemctl disable firewalld关闭防火墙。
编辑/etc/selinux/config的SELINUX改为disabled。
执行systemctl stop NetworkManager && systemctl disable NetworkManager
重启网络network服务。顺便重启一下。

然后依次执行下面命令就可以完成安装了

yum install -y centos-release-openstack-rocky yum -y update yum install -y openstack-packstack packstack --allinone

这时候就应该正常了。

Welcome to the Packstack setup utility The installation log file is available at: /var/tmp/packstack/20200216-203503-JQ6TO1/openstack-setup.log 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 LBaaS Agent 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.1.106_controller.pp 192.168.1.106_controller.pp: [ DONE ] Applying 192.168.1.106_network.pp 192.168.1.106_network.pp: [ DONE ] Applying 192.168.1.106_compute.pp 192.168.1.106_compute.pp: [ DONE ] Applying Puppet manifests [ DONE ] Finalizing [ DONE ] **** Installation completed successfully ****** Additional information: * A new answerfile was created in: /root/packstack-answers-20200216-203504.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.1.106. To use the command line tools you need to source the file. * To access the OpenStack Dashboard browse to http://192.168.1.106/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/20200216-203503-JQ6TO1/openstack-setup.log * The generated manifests are available at: /var/tmp/packstack/20200216-203503-JQ6TO1/manifests 安装完成

装完以后,在~目录下有几个文件,此时由两个用户,一个是admin,另一个是demo。密码分别在keystone_admin和keystoneec_demo里面,如admin里面是这样,似乎就是环境变量。

unset OS_SERVICE_TOKEN export OS_USERNAME=admin export OS_PASSWORD='19b0a14315174976' export OS_REGION_NAME=RegionOne export OS_AUTH_URL=http://192.168.1.106: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

执行source keystonerc_admin导入admin的环境变量,执行openstack user list可以测试一下能不能用,可以显示用户说明正常了。

然后再测试一下登录dashboard,登录192.168.1.106/dashboard
输入用户名密码登录

admin 19b0a14315174976

修改一下语言和TimeZone。


作者:BluePROT



rdo openstack

需要 登录 后方可回复, 如果你还没有账号请 注册新账号