In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Many novices are often troubled by complex deployment steps when they get started with OpenStack. How to quickly have an openstack experimental environment? I choose packstack. Although it is a tool from ancient times, I have to say, it is really fragrant ~~~
1. Experimental environment
Note: The environment is built by VMware virtual machines. ENS33 is in nat mode, ENS34 is in host-only mode. In this experiment, network segment 212 is used as management ip, and network segment 211 is public network (pretend) ip, which is used to access the external network.
2. Configure yum source.
Get used to using domestic sources (Ali) because it's faster
http://mirrors.aliyun.com/repo/ for you to choose
First install wget.
yum -y install wget
Delete/etc/yum.repos.d/* Experimental environment is convenient to delete, production environment recommended backup
Download domestic centos yum source
wget http://mirrors.aliyun.com/repo/Centos-7.repo
This installation openstack rocky version
Aliyun Open Source Mirror Station
https://mirrors.aliyun.com/centos/7/cloud/x86_64/
Choose the version you want.
create and edit
/etc/yum.repos.d/openstack-rocky.repo
[openstack]
name=openstack
baseurl=https://mirrors.aliyun.com/centos/7/cloud/x86_64/openstack-rocky/
gpgcheck=0
failovermethod=priority ###(order yum chooses when multiple urls are available, see http://www.t086.com/article/5015 for details)
enabled=1
Because the error qemu version is too low during installation, you need to configure the qemu source.
https://mirrors.aliyun.com/centos/7/virt/x86_64/kvm-common/
create and edit
/etc/yum.repos.d/CentOS-qemu.repo
[centos-qemu-ev]
name=qemu
baseurl=https://mirrors.aliyun.com/centos/7/virt/x86_64/kvm-common/
gpgcheck=0
enabled=1
Clear the yum source cache and regenerate the local cache after completion. If there is an error for the first time, you can execute it again.
yum clean all && yum makecache
Node1 can also be configured to the same source.
3. Configure firewalld, selinux (all nodes)
If it is a big shot, you can configure firewalld and selinux rules in detail, otherwise it will be closed.
firewalld:systemctl stop firewalld && systemctl disable firewalld
selinux: setenforce 0 (temporarily effective) or sed -i 's/SELINUX=enforcing/SELINUX=disabled/g' /etc/selinux/config, restart the machine
4. Configure the hosts file and configure clock synchronization (strong synchronization, simple, not recommended for production environments)
hosts file, writes to all/etc/hosts files
192.168.211.60 packstack
192.168.211.61 node1
Clock synchronization service (this synchronization method is only synchronization between nodes, not synchronization with the Internet, only applicable to experimental environments)
packstack node, install ntp service
yum -y install ntp
Edit/etc/ntp.conf
commented out
#server 0.centos.pool.ntp.org iburst
#server 1.centos.pool.ntp.org iburst
#server 2.centos.pool.ntp.org iburst
#server 3.centos.pool.ntp.org iburst
added
server 127.127.1.0
fudge 127.127.1.0 stratum 10
Start the ntp service and boot it up automatically
systemctl start ntpd && systemctl enable ntpd
Node1 Install ntpdate
ntpdate packstack
5. Install packstack and configure the response file (starting from step 5, only configure in packstack)
At this time, doing a snapshot or something is simply delicious.
yum -y install openstack-packstack
Generate response file
packstack --gen-answer-file=filename The file name can start anywhere
After executing this command, you will be prompted to change your ssh public key. We only need to copy the public key to node1 to achieve secret-free login.
ssh-copy-id node1
Configure packstack response file
Remove all features that do not need to be installed
CONFIG_MANILA_INSTALL=n
CONFIG_SWIFT_INSTALL=n
CONFIG_AODH_INSTALL=n
planning node
CONFIG_CONTROLLER_HOST=192.168.212.60
CONFIG_COMPUTE_HOSTS=192.168.212.61
CONFIG_NETWORK_HOSTS=192.168.212.60
Change all passwords
Using tools to install, the password is randomly generated experimental environment is inconvenient, so we change the password to 000000
sed -i.bak -r 's/(.+_ PW)=[0-9a-z]+/\1=000000/g' deploy.conf
6. Start deployment
packstack --answer-file=deploy.conf
At this point, you can have a cup of tea or a meal. After you finish, you can see the openstack installed.
Once you're done, open the dashboard in your browser at http://192.168.212.60
7. Configure the network
Create br-ex bridge configuration
Create and edit/etc/sysconfig/network-scripts/ifcfg-br-ex
DEVICE=br-ex
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSBridge
BOOTPROTO=static
IPADDR=192.168.211.60
NETMASK=255.255.255.0
GATEWAY=192.168.211.1
Bridge ENS33 NIC to BR-EX
Modify/etc/sysconfig/network-scripts/ifcfg-ens33
DEVICE=ens33
ONBOOT=yes
DEVICETYPE=ovs
TYPE=OVSPort
BOOTPROTO=yes
OVS_BRIDGE=br-ex
After the bridge is completed, check the network card information and you will find that ens33 has no ip address, and the ip has been transferred to the br-ex bridge.
Create an external network via dashboard (select simple flat type)
Create Tenant Network
Create tenant routes
Add interfaces for routes to the subnet you just created
View network topology after creation
Because the packstack test image cirros has been installed, you can now start the instance happily.
Once by openstack network make scalp tingle, here send a simple flow trend, please big brother do not like not spray, if there is a mistake please big brother guidance
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.