Openstack one-click deployment

Preface

OpenStack is an open source cloud computing management platform project, a combination of a series of software open source projects. An open source code project authorized by the Apache License (a free software license issued by the Apache Software Foundation) developed and initiated by NASA (National Aeronautics and Space Administration) and Rackspace in cooperation

NIST's definition of cloud computing

On the basis of summarizing various cloud computing definitions and descriptions, Peter Mell and Tim Grance of NIST proposed a definition of cloud computing in April 2009 (it was version 15.0 in October 2009). This may be the current The only definition that is widely recognized and supported.

Cloud computing is a model that can obtain computing resources (including networks, servers, storage, applications and services, etc.) through the network in a convenient and on-demand manner and improve their availability. These resources come from a shared, configurable The resource pool can be acquired and released in the least effortless and unattended manner. This model has five key functions, including three service models and four deployment methods.

Cloud computing overview

concept

  • Cloud computing in a narrow sense refers to the delivery and use mode of IT infrastructure
  • Cloud computing in a broad sense refers to the delivery and usage model of services

Cloud computing resources

  • Internet resources
  • Storage resources
  • Computing resources

Cloud computing service model

laaS (Infrastructure as a Service)

  • Provide underlying IT infrastructure services, including processing capacity, storage space, network resources, etc.
  • Object-oriented is generally IT managers

PaaS (Platform as a Service)

  • The system platform with the installed development environment is used as a kind of service to provide users through the Internet
  • Object-oriented is generally a developer

SaaS (software as a service)

  • Provide users with services such as software and applications directly through the Internet
  • Object-oriented is generally a normal user

OpenStack overview

  • Co-sponsored by NASA (National Aeronautics and Space Administration) and Rackspace
  • Free software and open source projects licensed under the Apache license
  • An open source project that provides software for the construction and management of public and private clouds
  • Covers all aspects of networking, virtualization, operating systems, servers, etc.

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 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, and use it directly when creating a virtual machine, and support multi-format images
Block Storage (block storage service) Cinder Responsible for providing persistent block storage devices for running instances, which can be easily expanded, pay 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

OpenStack advantages

Controllability

Fully open source platform, providing API interface, easy to integrate with third-party technology

compatibility

OpenStack is compatible with other public clouds, facilitating data migration

Scalability

Modular design, you can increase nodes and resources through horizontal expansion

flexibility

Establish the corresponding infrastructure and increase the scale of the cluster according to your own needs

Industry Standard

Many leading IT companies have joined the OpenStack project

OpenStack one-click deployment experience

1. Environmental requirements

CentOS 7.6 system
CPU: dual-core dual-threaded / enable virtualization function
Memory: 4G
hard disk: 30G+300G
network card: NAT mode
Optional: net.ifnames=0 biosdevname=0 (can be modified to eth0 network card when creating)

2. Configure static address and host name

BOOTPROTO=static
IPADDR=192.168.15.50
NETMASK=255.255.255.0
GATEWAY=192.168.15.2
DNS1=192.168.15.2
DNS2=8.8.8.8

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

systemctl stop firewalld
systemctl disable firewalld
systemctl stop NetworkManager
setenforce 0

4. Install time synchronization service and synchronize Alibaba Cloud clock server

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

5. Configure yum source

[root@openstack ~]# cd /etc/yum.repos.d/
[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-Base.repo http://mirrors.aliyun.com/repo/Centos-7.repo
[root@openstack yum.repos.d]# yum -y install centos-release-openstack-train
[root@openstack yum.repos.d]# yum clean all
[root@openstack yum.repos.d]# yum makecache (fast)

6. Restart and view service status

reboot

7. Download the OpenStack management toolkit and deploy OpenStack online

yum -y install openstack-packstack
packstack --allinone

Insert picture description here
Create 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 查看

Insert picture description here

8. View user information

cd /root && cat keystonerc_admin

Insert picture description here

9. Web page login

Visit http://192.168.15.50/dashboard/ to view the effect

Insert picture description here

10. Upload mirror

The first type-command line

openstack image create "cirros"   --file cirros-0.3.5-x86_64-disk.img  --disk-format qcow2 --container-format bare  --public

It is recommended to use the first

The second type-console

[External link image transfer failed. The source site may have an anti-hotlinking mechanism. It is recommended to save the image and upload it directly (img-zgAs4ana-1610989774514) (C:\Users\Zhu Junjie\AppData\Roaming\Typora\typora-user-images\ image-20210119010807693.png)]

Created successfully

Insert picture description here

to sum up

OpenStack provides scalable and elastic cloud computing services for private clouds and public clouds. The project goal is to provide a cloud computing management platform that is simple to implement, scalable, rich, and standardized.

Guess you like

Origin blog.csdn.net/weixin_50345054/article/details/112798215