Openstack
Projects developed and initiated by NASA and Reckspace, licensed under Apache licensing
Three pillar models of cloud computing
IaaS: Infrastructure as a service
Provision of server/virtual host/network Equipment resources
PaaS: Platform as a service
Provides integrated system platforms such as Web middleware/databases
SaaS: Software as a service
Provide software services such as e-mail/anti-virus/network disk
———————————————————————————————————————————————————
OpenStack Main components
OpenStack covers all aspects of the cloud and is broken down into core projects based on maturity and importance, incubation projects
Keystone: Implementing Identity authentication
Nova: Compute capabilities for managing virtual machine instances for users
Glance: Mirror service, virtual machine image lookup and retrieval system, support multiple virtual machine image formats
Neutron: Network management, providing cloud computing network virtualization technology, similar to the virtual machine in the creation of networks, the isolation of network segments, but the function of more powerful
Cinder: Block Storage (Cloud Drive), adding disk devices to virtual machines
Horizon:ui interface for simplifying user operations on services
Swift: Object storage for built-in redundancy and high fault-tolerant mechanisms in massively scalable systems, providing mirrored storage for glance
Heat: Business processes for automating deployment of cloud infrastructure software environments
How OpenStack is deployed
RDO (Redhat Openstack)
Self-Configuring the Yum source for Epel and RDO and configuring the relevant lab environment (NTP,IP,DNS)
Red Hat RHCA Environment
Using a red Hat ready-made lab environment
——————————————————————————————————————————————
Example: Building OpenStack
Prepare the environment first to set up DNS and NTP services (to be on the RHEL7 server)
Configure IP address to 192.168.4.12,dns address as native
Configure 3 yum sources, Rhel7 discs, Osp5 discs, rht.tar.gz
1. Setting up a DNS service
[[Email protected]_clone ~]# yum-y Install bind
[[Email Protected]_clone ~]# vim/etc/named.conf (Configure global Settings)
Options {
Listen-on Port: (any;};
。。。。。
allow-query {any;};
[[Email Protected]_clone ~]# vim/etc/named.rfc1912.zones (add a statement at the end of the line)
Zone "hydra.org" in {
Type master;
File "Hydra.org.zone";
allow-update {none;};
};
[[Email Protected]_clone ~]# vim/var/named/hydra.org.zone (Create Zone Profile)
$TTL 86400
@ in SOA ns1.hydra.org. Root.hydra.org. (
20171001
3H
15M
1W
1D)
@ in NS ns1.hydra.org.
NS1 in A 192.168.4.12 (DNS server address)
$GENERATE 2-254 rhel$ in A 192.168.4.$
[[Email Protected]_clone ~]# chmod 640/var/named/hydra.org.zone (change permissions)
[Email protected]_clone ~]# systemctl enable named; Systemctl start named (boot, start)
2. Building NTP Service (NTP, Network Time Protocol)
[[Email protected]el7_clone ~]# yum-y Install NTP
[Email Protected]_clone ~]# vim/etc/ntp.conf
Restrict 192.168.4.0 mask 255.255.255.0 nomodify notrap (configuration file has, direct copy, IP segment changed to service network segment)
#server 0.rhel.pool.ntp.org Iburst (note the server lines)
Server 127.127.1.0 iburst (add)
Fudge 127.127.1.0 Straum 3 (ADD)
[Email protected]_clone ~]# systemctl enable ntpd; Systemctl start ntpd (start)
[[Email protected]_clone ~]# NETSTAT-ULNP | Grep:123 (see if it's running)
Build OpenStack
Preparing a RHEL7 server (preferably copying the previous disk qemu-img create-f qcow2-b rhel7_clone.img rhel7_ CLONE2.IMG), the IP address is configured for the 192.168.4.11,dbs server to write to the DBS server, which is the first one
and configure three Yum, then update the system Yum-y Update, configure Yum and restart the server.
Install the one-click Installation Tool Packstack
[Email protected]_2 ~]# yum-y Install Openstack-packstack
Generate an Answer file
[Email protected]_2 ~]# packstack--gen-answer-file answer.txt
Change an answer file
[Email protected]_2 ~]# vim Answer.txt
config_ntp_servers=192.168.4.12 (NTP server address)
config_keystone_admin_pw=123456 (ADMIN password)
Config_horizon_ssl=y (Web platform encryption default n, change to Y)
Config_provision_tempest=n (default y, change to N)
Installing OpenStack
[Email protected]_2 ~]# packstack--answer-file answer.txt
Configuring the Open VSwitch
Virtual switches to make up a virtual network
OvS is a high quality virtual switch technology, the virtual switch realizes the data exchange function through the software way
Dozens of or hundreds of virtual switches can be configured on a single physical server, and the number of ports can be flexibly selected
Modifying a configuration file
[Email protected]_2 ~]# cd/etc/sysconfig/network-scripts/
[[Email protected]_2 network-scripts]# CP Ifcfg-{eth0,br-ex} (copy a NIC profile)
[Email protected]_2 network-scripts]# vim Ifcfg-eth0
Device=eth0
Onboot=yes
Type=ovsport
Devicetype=ovs
Ovs_bridge=br-ex
Name=eth0
[Email protected]_2 network-scripts]# vim Ifcfg-br-ex
Device=br-ex
Type=ovsbridge
Devicetype=ovs
Onboot=yes
Bootprptp=none
ipddr0=192.168.4.11
dns1=192.168.4.12
[[Email protected]_2 ~]# ovs-vsctl add-port br-ex eth0 (add port for Br-ex virtual NIC)
[[Email protected]_2 ~]# systemctl Stop Networkmanager.service (Stop the Network service, this service will conflict with the network)
[[Email protected]_2 ~]# systemctl Disable networkmanaher (boot not self-starter)
[[Email protected]_2 ~]#/etc/init.d/network Restart (restart network)
Configured after the Web page configuration, user name admin, password for the answer file password
firefox:https://192.168.4.11/
OpenStack Cloud Management (all managed through a web interface)
Horizon:
A web interface that manages the OpenStack platform, and Horizon communicates with APIs from other OpenStack projects
can achieve the same effect as command-line operations
OpenStack uses identity for authentication, which enables real-time tracking of user and user-assigned permissions
To create a process:
Create Tenant (Project)
Create Flavor (Type)
Create User (users)
Create a virtual network
Set access and security
Create a virtual machine image
——————————————————————————————————————————————————————————————————————
Linux Cloud computing OpenStack Build