This series of articles covers the entire process from OpenStack offline source creation to OpenStack installation. The OpenStack installation version used in this tutorial series is Version 20 Train (version T), and on May 13, 2020, the OpenStack community released version 21 Ussuri (Version U).
Gold Mining community: Customizing OpenStack Images | Customizing OpenStack images | Environment Preparation Customizing OpenStack images | Windows7 Customizing OpenStack images | Windows10 Customizing OpenStack images | Linux Customize an OpenStack image | Windows Server2019
CSDN: OpenStack Ussuri Offline Installation and Deployment Series (full) OpenStack Train Offline Installation and Deployment Series (full) Looking forward to making progress together with you.
OpenStack Train offline deployment | 0 Create offline yum source
- If offline source installation is used, it is usually necessary to configure the local PIP source;
- If you install the offline software package, you usually need to configure the local YUM source.
The environment that
System: Centos7 version: CentOS – 7 – x86_64 – Minimal – 1908 ISO download links: mirrors.aliyun.com/centos/7/is…
Openstack openstack- Queens openstack- Rocky openstack-stein openstack-train is available in Centos7 as of press time
OpenStack version: Tain
It sources:
Centos:Mirror.centos.org/centos/7/cl…
North institute of technology:Mirror.bit.edu.cn/centos/7/cl…
Ali cloud:Mirrors.aliyun.com/centos/7/cl…
Software installation
You are advised to change the yum source to a domestic source before installation
yum clean all
yum makecache
yum -y install vim createrepo yum-utils httpd net-tools reposync
yum install centos-release-openstack-train
ls -1 /etc/yum.repos.d/
yum repolist
Copy the code
[root@host-192-168-2-123 ~]# yum repolist Failed to set locale, defaulting to C Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.aliyun.com * centos-ceph-nautilus: mirrors.aliyun.com * centos-nfs-ganesha28: mirrors.aliyun.com * centos-openstack-stein: mirrors.aliyun.com * centos-openstack-train: mirrors.aliyun.com * centos-qemu-ev: mirrors.aliyun.com * extras: mirrors.aliyun.com * updates: mirrors.aliyun.com repo id repo name status base/7/x86_64 CentOS-7 - Base 10097 centos-ceph-nautilus/7/x86_64 CentOS-7 - Ceph Nautilus 224 centos-nfs-ganesha28/7/x86_64 centos-7-nfs Ganesha 2.8 140 centos-openstack stein/7/x86_64 centos-7 - OpenStack stein 2415+2 centos-openstack-train/7/x86_64 CentOS-7 - OpenStack train 2323+2 centos-qemu-ev/7/x86_64 CentOS-7 - QEMU EV 87 extras/7/x86_64 CentOS-7 - Extras 341 updates/7/x86_64 CentOS-7 - Updates 1787 repolist: 17414Copy the code
Synchronize to local
mkdir -p /var/www/html/yumrepository
reposync -p /var/www/html/yumrepository/
Copy the code
[root@host-192-168-2-123 yumrepository]# pwd
/var/www/html/yumrepository
[root@host-192-168-2-123 yumrepository]# ls
base centos-nfs-ganesha28 centos-openstack-train extras
centos-ceph-nautilus centos-openstack-stein centos-qemu-ev updates
[root@host-192-168-2-123 yumrepository]#
Copy the code
After the OpenStack installation package is downloaded to the local directory, you need to rebuild the YUM repository or update the original repository. Therefore, the repodata in the remote YUM repository may not be synchronized to the local after synchronization, and the repository path may have changed, so you only need to upgrade the local YUM repository. The command to create or update the local YUM repository is createrepo, which is provided by the Createrepo installation package.
Local production
Creating an YUM repository
# into each folder, CD/var/WWW/HTML/yumrepository CD. / base # yum using createrepo tool source, # yum install createrepo -y createrepo. # yum install createrepo -y createrepo. # yum install createrepo -y createrepo. [root@host-192-168-2-123 base]# ls Packages [root@host-192-168-2-123 base]# createrepo. Spawning worker 0 with 5049 pkgs Spawning worker 1 with 5048 pkgs Workers Finished Saving Primary metadata Saving file lists metadata Saving other metadata Generating sqlite DBs Sqlite DBs complete [root@host-192-168-2-123 base]# ls Packages repodata [root@host-192-168-2-123 base]#Copy the code
Note that this is required for each yum repository directory that is being synchronized.
49 cd /var/www/html/yumrepository/base/
50 ls
51 createrepo .
Copy the code
After the RPM software library package is updated, go to the corresponding directory and use createrepo Update to synchronize. reposync -p /var/www/html/yumrepository/ createrepo --update .Copy the code
Configure the service HTTPD
#Start the service
systemctl start httpd
#Set automatic startup upon startup
systemctl enable httpd
systemctl status httpd
Copy the code
Configuration directory file description:
Service directory/etc/HTTPD main configuration file/etc/HTTPD/conf/HTTPD. Conf site access log data directory/var/WWW/HTML/var/log/HTTPD/access_log error log /var/log/httpd/error_logCopy the code
Example Modify the configuration file /etc/selinux/config
vim /etc/selinux/config
SELINUX=disabled
Copy the code
Disable the firewall, selinux, NetworkManager
systemctl stop firewalld NetworkManager.service
systemctl disable firewalld NetworkManager.service
systemctl status firewalld NetworkManager.service
setenforce 0
Copy the code
validation
On another machine, create a new repo file
# remove the original system built-in repo file, Ori_repo-config mv /etc/yum. Repos. D /*./ori_repo-config/ touch /etc/yum.repos.d/CentOS-PrivateLocal.repo vim /etc/yum.repos.d/CentOS-PrivateLocal.repoCopy the code
Note: ① Change the IP address to the yumRepository host address. 2. To avoid installation conflicts, only one [centos-openstack-stein] and [centos-openstack-train] are reserved.
[base] name = CentOS - $releasever - base baseurl = http://192.168.2.123/yumrepository/base/ gpgcheck = 0 enabled = 1 / updates Name = CentOS - $releasever - Updates baseurl = http://192.168.2.123/yumrepository/updates/ gpgcheck = 0 enabled = 1 / extras Name = CentOS - $releasever - Extras baseurl = http://192.168.2.123/yumrepository/extras/ gpgcheck = 0 enabled = 1 [centos-openstack-train] name=CentOS-7 - OpenStack train Baseurl gpgcheck = 0 enabled = = http://192.168.2.123/yumrepository/centos-openstack-train/ [1] centos - qemu - ev Name = CentOS - $releasever - baseurl QEMU EV = http://192.168.2.123/yumrepository/centos-qemu-ev/ gpgcheck = 0 enabled = 1 [centos - ceph - nautilus] name = centos - 7 - ceph nautilus baseurl = http://192.168.2.123/yumrepository/centos-ceph-nautilus/ Gpgcheck =0 enabled=1 [centos-nfs-ganesha28] name= centos-7-nfs Ganesha 2.8 Baseurl = http://192.168.2.123/yumrepository/centos-nfs-ganesha28/ gpgcheck = 0 enabled = 1Copy the code
After the configuration is complete, you need to clear the existing cache of yum and rebuild the cache. To clear the yum stale cache, run the following command:
yum clean all
yum makecache
Copy the code