openstack in 10 mins

35
OPENSTACK IN 1 mins Dawood Sayyed

Upload: dawood-ms

Post on 08-Jan-2017

264 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Openstack in 10 mins

OPENSTACK IN 1 minsDawood Sayyed

Page 2: Openstack in 10 mins

What is Open Stack ?• OpenStack is a free and open-source software platform for cloud

computing, mostly deployed as an infrastructure-as-a-service (IaaS). The software platform consists of interrelated components that control hardware pools of processing, storage, and networking resources throughout a data center.

Page 3: Openstack in 10 mins

What we will do with Open-stack ?• Single node installation• Multi node installation• Difference between Dev-stack and Pack-stack• Dev-stack installation • Pack-stack installation

Page 4: Openstack in 10 mins

Openstack Services • Dashboard / Horizon• Provides a web-based self-service portal to interact with underlying

OpenStack services, such as launching an instance, assigning IP addresses and configuring access controls.• Compute / Nova• Manages the lifecycle of compute instances in an OpenStack

environment. Responsibilities include spawning, scheduling and decommissioning of virtual machines on demand.

Page 5: Openstack in 10 mins

Openstack Services • Networking / Neutron• Enables Network-Connectivity-as-a-Service for other OpenStack

services, such as OpenStack Compute. Provides an API for users to define networks and the attachments into them. Has a pluggable architecture that supports many popular networking vendors and technologies.

Page 6: Openstack in 10 mins

Openstack Services • Object Storage /Swift• Stores and retrieves arbitrary unstructured data objects via a RESTful,

HTTP based API. It is highly fault tolerant with its data replication and scale-out architecture. Its implementation is not like a file server with mountable directories. In this case, it writes objects and files to multiple drives, ensuring the data is replicated across a server cluster.

Page 7: Openstack in 10 mins

Openstack Services • Block Storage /Cinder • Provides persistent block storage to running instances. Its pluggable

driver architecture facilitates the creation and management of block storage devices.

• Image Service /Glance• Stores and retrieves virtual machine disk images. OpenStack Compute

makes use of this during instance provisioning.

Page 8: Openstack in 10 mins

Openstack Services • Telemetry / Ceilometer• Monitors and meters the OpenStack cloud for billing, benchmarking,

scalability, and statistical purposes.• Orchestration /Heat • Orchestrates multiple composite cloud applications by using either

the native HOTtemplate format or the AWS CloudFormation template format, through both an OpenStack-native REST API and a CloudFormation-compatible Query AP

Page 9: Openstack in 10 mins

Single node installation on Openstack• Single Node• Single Node Installation runs all OpenStack services in one node

including Control, Network, Compute, Storage services.• Networking• It is recommended to have 2 NIC cards (eth0 and eth1) to install

OpenStack. However, for this tutorial we will use a single interface eth0 with a static IP (192.168.100.10). We can use same IP (as eth0) as gateway of external subnet or add virtual interface (eth0:1) with different subnet.

Page 10: Openstack in 10 mins

Networking on single node Openstack• It is recommended to have 2 NIC cards (eth0 and eth1) to install

OpenStack. However, for this tutorial we will use a single interface eth0 with a static IP (192.168.100.10). We can use same IP (as eth0) as gateway of external subnet or add virtual interface (eth0:1) with different subnet• # vi /etc/network/interfaces• auto eth0• iface eth0 inet static• address 192.168.100.10• netmask 255.255.255.0

Page 11: Openstack in 10 mins

Networking on single node Openstack• gateway 192.168.100.1• # service networking restart → if required• # hostname <hostname>• # echo <hostname> > /etc/hostname• # echo ‘192.168.100.10 <hostname>’ >> /etc/hosts

Page 12: Openstack in 10 mins

Single node OpenStack Ubuntu Cloud Archive Repo• Now install the latest stable release of Openstack (Kilo/Liberty) from

Ubuntu’s cloud archive:• # apt-get install python-software-properties• # add-apt-repository cloud-archive:kilo• # apt-get update• # apt-get dist-upgrade (Optional)

Page 13: Openstack in 10 mins

Openstack Single node install MySQL Server• OpenStack services require a database to store information and

supports many popular database engines including MongoDB and PostGre. In this tutorial, we will use MySQL as database backend.• # apt-get install python-mysqldb mysql-server• #bind-address 192.168.100.10 (Comment out this line or change

192.168.100.10 to 0.0.0.0)

Page 14: Openstack in 10 mins

Openstack Single Node Install Messaging server• OpenStack requires a Messaging / Broker service to communicate

between its services. We will use RabbitMQ but Qpid and ZeroMQ (0MQ) are also supported.• # apt-get install rabbitmq-server• It is optional to change the password in the dev environment but is

recommended in production. By default guest user is created with password guest.• # rabbitmqctl change_password guest <New_Pass>

Page 15: Openstack in 10 mins

Enable IP Forwarding • We need to enable Packet Forwarding for networking to work, we can

opt. this to configure during Network installation.• # vi /etc/sysctl.conf• net.ipv4.ip_forward=1 (Uncomment this line)

Page 16: Openstack in 10 mins

Multinode Openstack

Page 17: Openstack in 10 mins

NIC Requirement for Multinode • Networking:

• Following is the NIC card requirement for multi node installation of OpenStack:• Compute node • Control node• Network node

Page 18: Openstack in 10 mins

Compute Node • Compute Node

• Two Network Interfaces:

• a. External Network: Used for External Connectivity

• b. Management Network: Used for connectivity for OpenStack nodes.

Page 19: Openstack in 10 mins

Control Node • Control Node

• Two Network Interfaces:

• a. External Network: Used for External Connectivity

• b. Management Network: Used for connectivity for OpenStack nodes

Page 20: Openstack in 10 mins

Network Node • Network• Three Network Interfaces:• a. External Network: Used for External Connectivity• b. Management Network: Used for connectivity for OpenStack nodes• c. Data Network: Used for connectivity between VM’s.• Note that each network Interface must have a static IP.

Page 21: Openstack in 10 mins

Preparation of Control Node:

• Networking• The control node has two Network Interfaces: One with network

connectivity (eth0), and another internal network for Management use.• # vi /etc/network/interfaces auto eth0• iface eth0 inet static• address 192.168.100.10• netmask 255.255.255.0

Page 22: Openstack in 10 mins

Preparation of Control Node• gateway 192.168.100.1• #Management Network• auto eth1• iface eth1 inet static• address 10.0.0.10• netmask 255.255.255.0• gateway 10.0.0.1

Page 23: Openstack in 10 mins

Preparation of Control Node• # service networking restart• And set the hostname.

Page 24: Openstack in 10 mins

Multinode OpenStack Ubuntu Cloud Archive repository• To install OpenStack we will add the latest stable release (Codename:-

Liberty) repository.• # apt-get install python-software-properties• # add-apt-repository cloud-archive:Liberty• # apt-get update• # apt-get dist-upgrade (Optional)

Page 25: Openstack in 10 mins

Multinode Openstack Install MySQL server• OpenStack services require a database to store information. We will

use MySQL as database back-end. OpenStack supports most of the popular database engines such as mongodb, PostGre, etc.• # apt-get install python-mysqldb mysql-server• The next step is optional for single node installation. If we need to add

additional nodes, such as compute nodes or storage nodes, MySQL should start on all the interfaces, as the default is only for localhost.• # /etc/mysql/my.cnf

Page 26: Openstack in 10 mins

Install MySQL server• #bind-address 192.168.100.10 (Comment out this line or change

192.168.100.10 to 0.0.0.0)

Page 27: Openstack in 10 mins

Install Messaging server• OpenStack requires a messaging/broker service to communicate

between its services. We will use RabbitMQ, but Qpid and ZeroMQ (0MQ) are also supported• # apt-get install rabbitmq-server• It is optional to change the password in the dev environment,

however, it is recommended in production. By default, the guest user is created with the password guest.• # rabbitmqctl change_password guest &lt;New_Pass&gt; • Now, the node is ready for OpenStack Installation.

Page 28: Openstack in 10 mins

Install MySQL python library.• On network nodes we only need to install MySQL client and MySQL

Python library• # apt-get install python-mysqldb

Page 29: Openstack in 10 mins

Devstack and Packstack• DevStack is an opinionated script to quickly create an OpenStack

development environment. It can also be used to demonstrate starting/running OpenStack services and provide examples of using them from a command line.• Packstack is a utility that uses Puppet modules to deploy various parts

of OpenStack on multiple pre-installed servers over SSH automatically. Currently only Fedora, Red Hat Enterprise Linux (RHEL) and compatible derivatives of both are supported.

Page 30: Openstack in 10 mins

Devstack Installation• Select a Linux Distribution• Only Ubuntu 14.04 (Trusty), Fedora 22 (or Fedora 23) and

CentOS/RHEL 7 are documented here. OpenStack also runs and is packaged on other flavors of Linux such as OpenSUSE and Debian.• Install Selected OS• In order to correctly install all the dependencies, we assume a specific

minimal version of the supported distributions to make it as easy as possible. We recommend using a minimal install of Ubuntu or Fedora server in a VM if this is your first time.

Page 31: Openstack in 10 mins

Devstack Installation• Download DevStack• Git clone https://git.openstack.org/openstack-dev/devstack• The devstack repo contains a script that installs OpenStack and• Templates for configuration files• Add Stack User• Devstack should be run as a non-root user with sudo enabled

(standard logins to cloud images such as “ubuntu” or “cloud-user” are usually fine).• You can quickly create a separate stack user to run DevStack with

Page 32: Openstack in 10 mins

DevStack Installation• Devstack/tools/create-stack-user.sh; su stack• Cd devstack; ./stack.sh

Page 33: Openstack in 10 mins

PackStack Installation and Running• Sudo yum install –y openstack-packstack• Which packstack• Single Node Deployment• Packstack –install-hosts=192.168.1.0• Multiple Node Deployment• Packstack –install-hosts=192.168.1.0,192.168.1.1,192.168.1.2• [email protected]’s password:

Page 34: Openstack in 10 mins

PackStack Installation and Running• Packstack• ~/.ssh/id_rsa.pub.• Should Packstack install Glance image service.• Should Packstack install Cinder volume service• Should Packstack install Nova compute image service• Should Packstack install Horizon dashboard service• Should Packstack install Swift object storage service

Page 35: Openstack in 10 mins

Packstack client tools ?• Should Packstack install Openstack client tools• Should Packstack install NTP• Should Packstack install Nagios to monitor openstack host