openstack-packstack One-click Online Deployment
openstack focuses on services, covering network, virtualization, operating systems, servers, and so on.
OpenStack released the latest version of Ocata in February 2017. Typically, it is updated about half a year - minor version
I. Eight core services common to OpenStack
2. Advantages of OpenStack
-
Controllability: A fully open source platform, modular design, and API interfaces to facilitate integration with third-party technologies to meet their own business needs.
- Compatibility: OpenStack is compatible with other public clouds to facilitate data migration
Extensibility: Openstack uses a modular design that supports mainstream distributions of Linux and can scale horizontally to add nodes and resources.
3. Flexibility: Users can build infrastructure to suit their needs or easily scale up their clusters.The Openstack project is licensed with Apache2, which means third-party manufacturers can republish the source code.
OpenStack has the advantages of control, compatibility, scalability and flexibility and may become an industry standard in cloud computing
3. OpenStack One-Click Deployment
Experimental environment
This time, the packstack tool is used to deploy OpenStack with one click.
With this installation tool, you can quickly deploy OpenStack by simply running a command, eliminating tedious installation steps, and experiencing the management and use of OpenStack directly.
This experiment requires a newly installed operating system host to be deployed in advance, which requires access to the Internet. The host's system can be installed in a minimal way.
Minimum configuration requirements for installing hardware devices that deploy an OpenStack environment
CPU 4 Core
Memory 8G
Disk 30G
Network NAT, and a custom network card
1. Create a new server node
2. Environment Deployment, Modifying Host Name, Closing Firewall, Core Protection and Network Management Tools
[root@localhost ~]# hostnamectl set-hostname openstack [root@localhost ~]# su [root@openstack ~]# [root@openstack ~]# vi /etc/hosts 192.168.247.3 openstack [root@openstack ~]# systemctl stop firewalld [root@openstack ~]# 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 ~]# setenforce 0 [root@openstack ~]# vi /etc/selinux/config SELINUX=disabled [root@openstack ~]# 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 ~]# systemctl stop NetworkManager
3. Get repo
[root@openstack ~]# vi /etc/resolv.conf nameserver 8.8.8.8 [root@openstack ~]# ping 192.168.247.2 PING 192.168.247.2 (192.168.247.2) 56(84) bytes of data. 64 bytes from 192.168.247.2: icmp_seq=1 ttl=128 time=0.575 ms 64 bytes from 192.168.247.2: icmp_seq=2 ttl=128 time=0.434 ms ^C --- 192.168.247.2 ping statistics --- 2 packets transmitted, 2 received, 0% packet loss, time 1000ms rtt min/avg/max/mdev = 0.434/0.504/0.575/0.073 ms [root@openstack ~]# ping www.baidu.com ping: www.baidu.com: Name or service not known [root@openstack ~]# ping 8.8.8.8 PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data. 64 bytes from 8.8.8.8: icmp_seq=1 ttl=128 time=113 ms 64 bytes from 8.8.8.8: icmp_seq=2 ttl=128 time=118 ms 64 bytes from 8.8.8.8: icmp_seq=3 ttl=128 time=127 ms 64 bytes from 8.8.8.8: icmp_seq=4 ttl=128 time=126 ms 64 bytes from 8.8.8.8: icmp_seq=5 ttl=128 time=117 ms ^C --- 8.8.8.8 ping statistics --- 6 packets transmitted, 5 received, 16% packet loss, time 5007ms rtt min/avg/max/mdev = 113.755/120.764/127.661/5.399 ms [root@openstack ~]# ping www.baidu.com ping: www.baidu.com: Name or service not known [root@openstack ~]# ping www.baidu.com PING www.a.shifen.com (183.232.231.172) 56(84) bytes of data. 64 bytes from 183.232.231.172 (183.232.231.172): icmp_seq=1 ttl=128 time=31.5 ms 64 bytes from 183.232.231.172 (183.232.231.172): icmp_seq=2 ttl=128 time=31.5 ms 64 bytes from 183.232.231.172 (183.232.231.172): icmp_seq=3 ttl=128 time=31.5 ms ^C --- www.a.shifen.com ping statistics --- 3 packets transmitted, 3 received, 0% packet loss, time 2004ms rtt min/avg/max/mdev = 31.502/31.523/31.558/0.206 ms
[root@openstack ~]# cd /etc/yum.repos.d/ [root@openstack yum.repos.d]# ls CentOS-Base.repo CentOS-Debuginfo.repo CentOS-Media.repo CentOS-Sources.repo CentOS-CR.repo CentOS-fasttrack.repo CentOS.repo CentOS-Vault.repo [root@openstack yum.repos.d]# mkdir bak [root@openstack yum.repos.d]# mv C* bak/
[root@openstack yum.repos.d]# curl -o /etc/yum.repos.d/CentOS.repo http://mirrors.aliyun.com/repo/Centos-7.repo % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 2523 100 2523 0 0 68045 0 --:--:-- --:--:-- --:--:-- 70083 [root@openstack yum.repos.d]# ll total 4 drwxr-xr-x 2 root root 206 Feb 21 14:25 bak -rw-r--r-- 1 root root 2523 Feb 21 14:25 CentOS.repo
4.yum Install openstack-train
[root@openstack yum.repos.d]# yum -y install centos-release-openstack-train [root@openstack yum.repos.d]# ll total 24 drwxr-xr-x 2 root root 206 Feb 21 14:25 bak -rw-r--r-- 1 root root 956 Jun 19 2019 CentOS-Ceph-Nautilus.repo -rw-r--r-- 1 root root 715 Jun 19 2019 CentOS-NFS-Ganesha-28.repo -rw-r--r-- 1 root root 1290 Oct 23 01:26 CentOS-OpenStack-train.repo -rw-r--r-- 1 root root 612 Feb 1 2019 CentOS-QEMU-EV.repo -rw-r--r-- 1 root root 2523 Feb 21 14:25 CentOS.repo -rw-r--r-- 1 root root 353 Jul 31 2018 CentOS-Storage-common.repo
5. Update the yum cache
[root@openstack yum.repos.d]# yum clean all Loaded plugins: fastestmirror Cleaning repos: base centos-ceph-nautilus centos-nfs-ganesha28 centos-openstack-train : centos-qemu-ev extras updates Cleaning up list of fastest mirrors [root@openstack yum.repos.d]# yum makecache
6. Time Synchronization
[root@openstack yum.repos.d]# yum -y install ntpdate [root@openstack yum.repos.d]# ntpdate ntp.aliyun.com >> /var/log/ntpdate.log [root@openstack yum.repos.d]# crontab -e no crontab for root - using an empty one crontab: installing new crontab [root@openstack yum.repos.d]# systemctl restart crond [root@openstack yum.repos.d]# systemctl enable crond [root@localhost ~]# tail -f /var/log/ntpdate.log ###View update log files dynamically
7. Install openstack-packstack
[root@openstack yum.repos.d]# yum -y install openstack-packstack [root@openstack yum.repos.d]# packstack --allinone online deployment Testing if puppet apply is finished: 192.168.247.3_controller.pp [ / ] This is what waiting means tail -f /var/log/ [root@openstack ~]# Tail-f/var/log/messages View installation log Online
Success
**** Installation completed successfully ****** Additional information: - Parameter CONFIG_NEUTRON_L2_AGENT: You have chosen OVN Neutron backend. Note that this backend does not support the ***aaS or FWaaS services. Geneve will be used as the encapsulation method for tenant networks - A new answerfile was created in: /root/packstack-answers-20200221-143136.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.247.3. To use the command line tools you need to source the file. - To access the OpenStack Dashboard browse to http://192.168.247.3/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/20200221-143136-tbr4ug/openstack-setup.log - The generated manifests are available at: /var/tmp/packstack/20200221-143136-tbr4ug/manifests [root@openstack yum.repos.d]#
8. View account password
[root@openstack yum.repos.d]# cd /root [root@openstack ~]# ls anaconda-ks.cfg keystonerc_admin keystonerc_demo packstack-answers-20200221-143136.txt [root@openstack ~]# ll total 64 -rw-------. 1 root root 1632 Feb 21 2020 anaconda-ks.cfg -rw------- 1 root root 373 Feb 21 14:35 keystonerc_admin -rw------- 1 root root 318 Feb 21 14:35 keystonerc_demo -rw------- 1 root root 51648 Feb 21 14:31 packstack-answers-20200221-143136.txt [root@openstack ~]# cat /root/keystonerc_admin unset OS_SERVICE_TOKEN export OS_USERNAME=admin export OS_PASSWORD='4dc0395edf0a4fe7' export OS_REGION_NAME=RegionOne export OS_AUTH_URL=http://192.168.247.3: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
9. Upload mirror file
###Upload Mirror CentOS-7-x86_64-DVD-1810.iso go opt### [root@localhost ~]# source keystonerc_admin ###Missing value auth-url required for auth plugin password resolution encountered error [root@localhost ~(keystone_admin)]# ll //Total dosage 116 -rw-------. 1 root root 1308 4 February 2205:00 anaconda-ks.cfg -rw------- 1 root root 331 4 February 2800:55 keystonerc_admin -rw------- 1 root root 312 4 February 2800:55 keystonerc_demo -rw------- 1 root root 49523 4 February 2800:07 packstack-answers-20190428-000742.txt -rw------- 1 root root 49523 4 28/01:33 packstack-answers-20190428-013352.txt [root@localhost ~(keystone_admin)]# openstack image create --container-format bare --disk-format iso --public --file CentOS-7-x86_64-DVD-1810.iso ISO_CentOS7.6 [Errno 2] No file or directory: u'CentOS-7-x86_64-DVD-1810.iso' [root@localhost ~(keystone_admin)]# cd /opt [root@localhost opt(keystone_admin)]# ll //Total dosage 4481024 -rw-r--r-- 1 root root 4588568576 4 28/02:02 CentOS-7-x86_64-DVD-1810.iso drwxr-xr-x 3 root root 22 4 28/02:12 stack [root@localhost opt(keystone_admin)]# openstack image create --container-format bare --disk-format iso --public --file CentOS-7-x86_64-DVD-1810.iso ISO_CentOS7.6 +------------------+------------------------------------------------------+ | Field | Value | +------------------+------------------------------------------------------+ | checksum | 5b61d5b378502e9cba8ba26b6696c92a | | container_format | bare | | created_at | 2019-04-27T18:15:22Z | | disk_format | iso | | file | /v2/images/9a3469e6-4bde-4544-8fe3-daa909c6682d/file | | id | 9a3469e6-4bde-4544-8fe3-daa909c6682d | | min_disk | 0 | | min_ram | 0 | | name | ISO_CentOS7.6 | | owner | c44490a1222c4a23861b4b87147a744c | | protected | False | | schema | /v2/schemas/image | | size | 4588568576 | | status | active | | tags | | | updated_at | 2019-04-27T18:16:01Z | | virtual_size | None | | visibility | public | +------------------+------------------------------------------------------+
After uploading the above image, you can create an instance installation system on the web page