openstack workshop @ kalasalingam

45
Openstack Workshop @ Kalasalingam Institute of Technology Sep 26th 2015 Beny Raja & Jayaprakash

Upload: beny-raja

Post on 16-Apr-2017

283 views

Category:

Technology


1 download

TRANSCRIPT

Page 1: Openstack workshop @ Kalasalingam

Openstack Workshop@ Kalasalingam Institute of Technology Sep 26th 2015

Beny Raja & Jayaprakash

Page 2: Openstack workshop @ Kalasalingam

What is Cloud Computing?

Sharing Compute Resources - RAM, CPU and Hard drive

Cloud computing means storing and accessing data / programs over the Internet on a shared platform instead of your local server.

Cloud computing enables companies to consume compute resources as a utility rather than having to build and maintain computing infrastructures in-house.

Page 3: Openstack workshop @ Kalasalingam

Advantages and Why?❖ No Capital investment and very low Operating Expense

❖ Cost effective - Pay for what you use

❖ Scalability - up and down

❖ Quick Disaster Recovery

❖ Environmental friendly

❖ Work from anywhere

Page 4: Openstack workshop @ Kalasalingam

Models of Cloud Computing

IaaS (Infrastructure as a Service)

Provides compute resources (RAM, CPU and Storage) over the Internet.

eg: AWS, Rackspace, HpCloud

PaaS (Platform as a Service)

Provides the platform/environment to deploy the application. eg: GAE, Microsoft Azure

SaaS (Software as a Service)

Provides the software/ application over the Internet. eg: Google apps, Dropbox.

Page 5: Openstack workshop @ Kalasalingam
Page 6: Openstack workshop @ Kalasalingam

Types of IaaS Model

Public Cloud

Services are delivered to the client through the Internet from a third party service provider. eg: AWS, GAE, InstaCompute

Private Cloud

Services are managed and provided within the organization. eg: IBM, eBay.

Hybrid Cloud

Integrated cloud service utilising both private and public clouds to perform distinct functions within the same organization. eg: Interoute, IBM

Page 7: Openstack workshop @ Kalasalingam

What is Hypervisor and different types

A hypervisor is a piece of computer software, firmware or hardware that creates and runs virtual machines.

Type 1Citrix Xenserver, VMware Esxi

Type 2 Virtual box, VMware workstation

Page 8: Openstack workshop @ Kalasalingam

Different Cloud Platforms

Page 9: Openstack workshop @ Kalasalingam

What is Openstack?

OpenStack is a set of open source software tools for building and managing cloud computing platforms for public and private clouds.

Page 10: Openstack workshop @ Kalasalingam

Why OpenStack ?

Control and Flexibility. Open source platform means you’re never locked to a proprietary vendor, and modular design can integrate with legacy or third-party technologies to meet your business needs.

Industry Standard.

Proven Software. Run the same software that today powers some of the largest public and private clouds in the world.

Compatible and Connected. Compatibility with public OpenStack clouds means enterprises are prepared for the future—making it easy to migrate data and applications to public clouds when conditions are right—based on security policies, economics, and other key business criteria.

Page 11: Openstack workshop @ Kalasalingam

Who are all Involved?

Founded by rackspace and NASA in 2010. Now managed by the openstack foundation established in

2012.

Page 12: Openstack workshop @ Kalasalingam

KeystoneGlanceNovaNeutronHorizonCinder

HeatCeilometerTroveSaharaSwift

Projects Under OpenStack - Integrated

Page 14: Openstack workshop @ Kalasalingam

OpenStack Releases...

Page 15: Openstack workshop @ Kalasalingam

Openstack Architecture

Page 16: Openstack workshop @ Kalasalingam

Dashboard (Horizon)

Web based user interface to other OpenStack services like Nova, Swift, Keystone, Neutron, Heat, etc.

Developed with python Django web framework

Recommended to deployed under Apache web server

Extendable to other upcoming openstack services

As a cloud administrator, the dashboard provides an overall view of the size and state of your cloud. You can create users and projects, assign users to projects and set limits on the resources for those projects.

The dashboard provides users a self-service portal to provision their own resources within the limits set by administrators.

Page 17: Openstack workshop @ Kalasalingam
Page 18: Openstack workshop @ Kalasalingam

Compute (Nova)

Nova, also known as OpenStack Compute, is the software that controls your Infrastructure as as Service (IaaS) cloud computing platform.

Components/Services:

❖Nova-api - Gateway

❖Controller - Collection of services that enable you to launch virtual machine instances.

❖Compute - Exactly the VM is created under hypervisor

❖Scheduler - Part of controller to select which compute node

Page 19: Openstack workshop @ Kalasalingam

Nova cont.

Page 20: Openstack workshop @ Kalasalingam

Virtual Machine Security groups

Page 21: Openstack workshop @ Kalasalingam

Identity (keystone)

Keystone is an OpenStack project that provides Identity, Token, Catalog and Policy services for use specifically by projects in the OpenStack family. Every Openstack API call gets authenticated & authorized with keystone and proceed further.

Concepts:

Tenants

Users

Roles

Tokens

Services

Quotas

Page 22: Openstack workshop @ Kalasalingam

keystone cont.

Page 23: Openstack workshop @ Kalasalingam

Networking (Neutron)

OpenStack Neutron is an SDN (Software Defined Networking) project focused on delivering networking-as-a-service (NaaS) in virtual compute environments.

It also lets tenants create multiple private networks and control the IP addressing them. As a result of API extensions, organizations have additional control over security and compliance policies, quality of service [QoS], monitoring and troubleshooting, as well as the ability to easily deploy advanced network services, such as a firewall, intrusion detection, or VPN.

Page 24: Openstack workshop @ Kalasalingam

Neutron - network for Cloud Administrator

Vlan Network

Page 25: Openstack workshop @ Kalasalingam

Neutron - Network Components for End user

External Network - The external network typically provides Internet access for your instances.Tenant Network - The tenant network provides internal network access for instances. Tenant Router - Default gateway for the tenant VMs, which connects the Tenant Network and the External network

Page 26: Openstack workshop @ Kalasalingam

Neutron Advanced Services

LBaaS (Load Balancer as a Service) It allows for proprietary and open-source load balancing technologies to drive the actual load balancing of requests.FWaaS (Firewall as a Service)Neutron extension that introduces firewall feature set.VPNaaS (VPN as a Service)Connect Remote Location through vpn using IPsec/l2tp

Page 27: Openstack workshop @ Kalasalingam

Image Service (Glance)Image repository of Openstack. It includes discovering, registering, and retrieving virtual machine images.The images made available through Glance can be stored in a variety of locations like jbod, Swift, S3, ceph or Raid.

Supported disk formatsraw (unstructured) qcow2 (Qemu) isovhd, vmdk, vdi (Hyper-V, Esxi, Virtual Box) aki, ari, ami (amazon images)

Page 28: Openstack workshop @ Kalasalingam

Block Storage (Cinder)

It is a Storage as a service component of Openstack. It provides ephemeral and persistent block level storage device, that keeps the data even after the instance is terminated. It provides block storage devices to VM instances as additional storage.

The backend should be configured as a logical volume and added to the volume groups. It also supports variety of drivers like NAS/SAN, NFS, iSCSI, Ceph, and more.

Page 29: Openstack workshop @ Kalasalingam

Object Storage (Swift)Swift is a highly available, distributed, eventually consistent object/blob store. Organizations can use Swift to store lots of data efficiently, safely, and cheaply.

Components for Cloud AdminProxy ServerThe RingStorage PoliciesObject ServerContainer ServerAccount ServerReplicationUpdatersAuditors

Page 30: Openstack workshop @ Kalasalingam

Swift - Components for end user

End user lists

Account - Your Cloud Administrator creates your account and you own all resources in that account.

Containers - Contains objects and defines namespace for each objects. You can create any number of containers within an account.

Objects - Stores data content, such as documents, images, and so on. By default, each object can be as large as 5GB and it can be increased by the cloud admin.

Page 31: Openstack workshop @ Kalasalingam

Orchestration (Heat)

● Heat is the orchestration component of Openstack.

● Template-driven engine that allows us to describe and automate the deployment of infrastructure & application

● Extended features like AutoScaling, Software deployment using configuration management tools like puppet, Chef

● Stack - Grouping of cloud resources

● Intern Heat will talk to other services

Stack Topology

Page 32: Openstack workshop @ Kalasalingam

Autoscaling

Automatically adds or removes compute resources depending upon actual usage.

Page 33: Openstack workshop @ Kalasalingam

Telemetry (Ceilometer)

Monitoring & Metering component of Openstack

Collects metrics of openstack cloud resources

Alarms can be defined against a resource metrics

Page 34: Openstack workshop @ Kalasalingam

Ceilometer Architecture

Page 35: Openstack workshop @ Kalasalingam

CLI

Page 36: Openstack workshop @ Kalasalingam
Page 37: Openstack workshop @ Kalasalingam

Keystone (Identity Service)List all users

keystone user-list

List all services in service catalog

keystone service-list

Create new user

keystone user-create --name --tenant-id --pass --email --enabled

Create new tenant

keystone tenant-create --name --description --enabled

Page 38: Openstack workshop @ Kalasalingam

Nova (Compute Service)List instances

nova list

List images

nova image-list

List flavors

nova flavor-list

Boot an instance

nova boot --image cirros --flavor m1.tiny --security-groups jp --nic net-id=acf5f405-9b56-46c5-9a63-b5871f36f68a TestInstance

Page 39: Openstack workshop @ Kalasalingam

Nova VM actions (Pause, suspend, stop, reboot)

nova stop <name>

nova start <name>

nova pause <name>

nova unpause <name>

nova suspend <name>

nova resume <name>

nova reboot <name>

Page 40: Openstack workshop @ Kalasalingam

Nova cont.

# Create an instance snapshot

nova image-create volumeTwoImage snapshotOfVolumeImage

nova image-show snapshotOfVolumeImage

# Manage security groups

# Add rules to default security group allowing ping and ssh between #instances in the default security group

nova secgroup-add-group-rule default default icmp -1 -1

nova secgroup-add-group-rule default default tcp 22 22

Page 41: Openstack workshop @ Kalasalingam

Glance (Image Service)

# Manage images

glance image-list, glance image-show/image-delete/image_update <image>

glance image-create --name “cirros-threepart-kernel” --disk-format aki --container-format aki --is-public True --file ~/images/cirros-0.3.1~pre4-x86_64-vmlinuz

Page 42: Openstack workshop @ Kalasalingam

Neutron (Networking Service)

# Create network

neutron net-create <name>

# Create a subnet

neutron subnet-create <network name> <cidr>

neutron subnet-create my-network 10.0.0.0/29

# List/Show network and subnet

neutron net/subnet-list

neutron net/subnet-show <id or name of network>

Page 43: Openstack workshop @ Kalasalingam

Cinder (Block Storage)

# Manage volumes and volume snapshots

# Create a new volume

cinder create 1 --display-name MyFirstVolume

# Boot an instance and attach to volume

nova boot—image cirros-qcow2 --flavor m1.tiny MyVolumeInstance

# Attach volume to instance after instance is active, and volume is available

nova volume-attach <instance-id> <volume-id> auto

nova volume-attach MyVolumeInstance /dev/vdb auto

Page 44: Openstack workshop @ Kalasalingam

Swift (Object Store)

# List, Create containers & Objects in a container

swift list, swift post mycontainer, swift list container

# Upload file to a container

swift upload mycontainer myfile.txt

# Download object from container

swift download <container name> <file name>

# Upload with chunks, for large file

swift upload -S 64 mycontainer largeFile

Page 45: Openstack workshop @ Kalasalingam