Cloud computing, OpenStack one-click deployment

1. Cloud computing overview

  • Cloud computing is an increase, use, and delivery model of Internet-based related services. It usually involves the provision of dynamic, easily scalable and often virtualized resources through the Internet. Cloud is a metaphor for the network and the Internet. In the past, the cloud was often used to represent the telecommunication network in the figure, and later it was also used to represent the abstraction of the Internet and the underlying infrastructure.
  • In a narrow sense, cloud computing refers to the delivery and use mode of IT infrastructure, and refers to obtaining the required resources through the network in an on-demand and easily scalable manner
  • In a broad sense, cloud computing refers to the delivery and use mode of services, and refers to obtaining the required services through the network in an on-demand and easily scalable manner. This service can be related to IT and software, the Internet, or other services.
  • It means that computing power can also be circulated through the Internet as a commodity. "

Concept decomposition

  • Cloud: The cloud in cloud computing represents the meaning of recycling (when more clouds become rain, they fall on the ground, the clouds decrease, the water evaporates into the air, and the clouds increase).
  • Computing: Computing in cloud computing represents computing resources, covering virtual machines, storage, networks, etc.
  • Cloud computing: It means that computing resources are distributed and recycled on demand, just like the cloud water cycle.

1. Cloud computing features

Features Explanation
Hyperscale With a considerable scale, enterprise private clouds generally have hundreds of front-end servers, providing users with unprecedented computing power
Virtualization Support users to obtain application services at any location and using various terminals
High reliability Measures such as fault tolerance of multiple copies of data and interchangeability of computing nodes to ensure high reliability of services. Cloud computing is more reliable than local computing
Versatility Not for specific applications, the same "cloud" can support different applications to run at the same time
High scalability The scale can be dynamically scaled to meet the needs of application and user scale growth
On-demand service It is a huge resource pool, which can be purchased on demand; you can pay like water and electricity, and pay as much as you need.
Extremely cheap Special fault-tolerant measures can use extremely cheap nodes to form the cloud. Automated centralized management companies do not need to bear high management costs. The versatility greatly improves resource utilization; therefore, users can enjoy high performance at low cost.

2. How to use cloud computing

(1) Public cloud

  • Public cloud means that the infrastructure is not built by itself, and it depends on how to use it.

Public cloud classification

  • 1. Traditional telecommunications infrastructure operators, such as shared cloud services provided by China Mobile, China Unicom, and China Telecom
  • 2. Government-led local cloud computing platform (government cloud)
  • 3. Shared cloud platforms built by Internet giants (such as Alibaba, Tencent)
  • 4. Some IDC operators
  • 5. Foreign cloud computing companies

(2) Private cloud

  • The private cloud builds its own cloud environment, and the equipment and facilities need to be maintained by itself or a third party
  • The private cloud is built for a user to use alone, so you can effectively control the data security and service quality. The foundation of the private cloud is that you must first have the infrastructure and control the way to deploy applications on this facility. , The private cloud can be deployed in the firewall of the enterprise data center, the core attribute is proprietary resources
  • Commonly used and more classic private clouds include VmWare and openstack

(3) Hybrid cloud

  • Combining public cloud and private cloud is the way many enterprises use it
  • Generally put the core business on its own private cloud, and the secondary on the public cloud
  • But there are also some problems: security, data redundancy, law, service quality, etc.

(4) Cloud storage

Cloud storage system is a cloud computing system with data storage and management as the core

(5) Cloud games

The game runs on the server side of the cloud platform. The cloud platform decompresses the game screen and transmits it to the user. The user side does not need a high-configuration processor and graphics card, but only needs basic video decompression capabilities.

(6) Cloud IoT

Based on the cloud platform to realize the Internet connected with things.

(7) Cloud security

Through a large number of meshed clients, it detects the abnormalities of the software in the network, obtains the latest information of Trojan horses and malicious programs, pushes it to the cloud platform server for automatic analysis and processing, and then sends the solution to each client. The more cloud platform users, the more secure.

3. Cloud computing service model

model Explanation
LaaS (Infrastructure as a Service) Object-oriented generally refers to IT managers; it provides underlying IT infrastructure services, including understanding capabilities, storage space, network resources, etc.
SaaS (Platform as a Service) Object-oriented is generally a developer; it is to provide a system platform with a well-installed development environment as a service to customers via the Internet
PaaS (software as a service) Object-oriented is generally an ordinary user; it is to provide users with services such as software and applications directly through the Internet

Insert picture description here
definition:

  • Runtime is the low-level pure C language API, which contains many low-level grammars.
  • The OC code we usually write is eventually transformed into runtime C language code during the running of the program. Runtime is also called runtime. It is the worker behind the oC.

Role: runtime is mainly to do some low-level operations

  • 1. Dynamically add object member variables and methods
  • 2. The realization of dynamic exchange of two methods (the method that can replace the system)
  • 3. Get all member methods and all member variables of a certain class
  • 4. Realization of classification can also add attributes
  • 5. Realize the automatic archiving and unarchiving of NSCoding
  • 6. Realize automatic conversion of dictionary to model

Summary: Mainly do the bottom layer interactive work.

2. OpenStack

  • Co-sponsored by NASA (National Aeronautics and Space Administration) and Rackspace (a leading global hosting server and cloud computing provider)
  • Free software and open source projects authorized under the Apache license (a free software license issued by the Apache Software Foundation) are not just a piece of software. This project is composed of several main components to complete some specific tasks.
  • Provide scalable and flexible cloud computing services for the construction and management of public and private clouds (open source projects)
  • Covers all aspects of networking, virtualization, operating systems, servers, etc.

1.OpenStack service

service project name description
Compute (computing service) Nova Responsible for the management of the instance life cycle and the unit of computing resources. Shield the Hypervisor, support multiple virtualization technologies (Red Hat defaults to KVM), and support horizontal expansion
Network Neutron Responsible for the management of the virtual network and create the network topology for the instance. It is a tenant-oriented network management, you can define your own network, and each tenant does not affect each other
Identity (identity authentication service) Keystone Similar to the LDAP service, it authenticates and authorizes users, tenants, roles, and services. And supports multiple authentication mechanisms
Dashboard (Control Panel Service) Horizon Provide a web management interface to interact with OpenStack underlying services
Image Service Glance Provide registration and management of virtual machine image templates, copy the prepared operating system as an image template, which can be used directly when creating a virtual machine, and supports multi-format images
Block Storage (block storage service) Cinder Responsible for providing durable block storage devices for running instances, which can be easily expanded, paid on demand, and support a variety of back-end storage
Object Storage Swift Provides cloud-based elastic storage for OpenStack and supports clusters without single point of failure
Telemetry (metering service) Ceilometer A centralized source for measurement, monitoring, and control of data resources, providing OpenStack users with a way to keep accounts

1.OpenStack advantages

Controllability

  • It is a completely open source platform. An open source platform means that it will not be bound and restricted by a specific manufacturer
    . API interfaces are provided. The modular design can integrate legacy and third-party technologies to meet their own business needs.

compatibility

  • OpenStack is compatible with other public clouds, making it easy for users (enterprises) to migrate data and applications to
    the cloud computing community. There is a popular concept that data has weight. Once the data is stored in a cloud computing provider, it It becomes onerous and difficult to migrate. As the most important resource of an enterprise, if data security cannot be protected during the migration process, it is likely to bring disaster to the enterprise. I believe no company is willing to take this risk.

Scalability

  • At present, mainstream Linux systems basically support OpenStack.
    OpenStack has advantages in scalability when deploying public clouds on a large scale, and it can also be used in private clouds. Some enterprise features are gradually improving.
    Modular design can be achieved through horizontal Expand to add nodes and add resources

flexibility

  • Flexibility is one of the biggest advantages of OpenStack. Users can build infrastructure according to their own needs, and can easily increase the scale of their clusters
    . Released under the extremely loose and free Apache license, which means that any third party can redistribute These codes, on the basis of which proprietary software is developed and released in accordance with the new license, have left many cloud computing companies with greater room for development

Industry Standard

  • More than 60 leading companies from more than a dozen countries around the world, including Cisco, Dell, Intel, and Microsoft, have participated in OpenStack projects, and cloud platforms that use OpenStack technology around the world are constantly on the line
    . The participation of leading cloud computing companies will be An intangible disclosure of information is that OpenStack may become an industry standard in the future, and the original intention of the OpenStack project development is to develop a set of open source software standards

Practice test

  • Practice is the only criterion for testing truth. OpenStack's cloud operating system has been verified by the large-scale public and private cloud technologies that are operating around the world
    . The development trend of OpenStack in China is also very good, including Internet of Things users, domestic universities and some Large and small enterprises have begun to use OpenStack to build a cloud computing environment, integrate enterprise architecture and manage the company's internal IT infrastructure

Three. OpenStack one-click deployment

Environmental preparation

system CPU RAM hard disk Network card
CentOS 7.6 system Dual-core dual-threaded / enable virtualization 4G 30G+300G NAT mode

1. Configure static address and host name

BOOTPROTO=static
IPADDR=192.168.226.140
NETMASK=255.255.255.0
GATEWAY=192.168.226.2
#在/etc/resolv.conf中添加:
nameserver 114.114.114.114
systmectl restart network    #重启网卡

2. Turn off (set not to start after booting) firewall, core protection, NetworkManager

systemctl stop firewalld
systemctl disable firewalld
systemctl stop NetworkManager
setenforce 0

3. Install time synchronization service, synchronize Alibaba Cloud clock server (ntp1, ntp2...), set periodic tasks, and set self-start after boot

yum install -y ntpdate
ntpdate ntp.aliyun.com >>/var/log/ntpdate.log
crontab -e

4. Configure yum source

cd /etc/yum.repos.d/
mkdir bak
mv C* bak/
curl -o /etc/yum.repos.d/CentOS-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
yum -y install centos-release-openstack-train
yum clean all
yum makecache (fast)		#()部分可选择添加

5. Restart and view service status

reboot或init6

6. Download the OpenStack management toolkit and deploy OpenStack online

yum -y install openstack-packstack
packstack --allinone

 **** 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-20201018-191715.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.226.150. To use the command line tools you need to source the file.
 * To access the OpenStack Dashboard browse to http://192.168.226.150/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/20201018-191715-BH2Wcy/openstack-setup.log
 * The generated manifests are available at: /var/tmp/packstack/20201018-191715-BH2Wcy/manifests

7. Create a br-ex network card configuration file

cd /etc/sysconfig/network-scripts/
cp ifcfg-eth0 ifcfg-br-ex
sed -i "100d" ifcfg-br-ex
cat <<EOF >> ifcfg-br-ex
TYPE=Ethernet
BOOTPROTO=none
NAME=br-ex
DEVICE=br-ex
ONBOOT=yes
IPADDR=172.24.4.1
PREFIX=24
EOF
systemctl restart network

ifconfig    #查看

8. View user information

cd /root && cat keystonerc_admin

9. Web login

openstack image create "cirros"   --file cirros-0.3.5-x86_64-disk.img  --disk-format qcow2 --container-format bare  --public   #命令行上传镜像

Four. Summary

With the development of cloud computing, in order to have a judgment standard for cloud computing, the 9 characteristics of cloud computing are summarized as follows:
(1) IT capabilities are provided in the form of services
(2) networked access
(3) user self-service
(4) Provide open service access and management interfaces
(5) Continuous service update and incubation
(6) Resource aggregation into pools
(7) Automated management and rapid delivery
(8) Elastic expansion
(9) Resource usage metering

Guess you like

Origin blog.csdn.net/LI_MINGXUAN/article/details/114371446