Top Banner
Build Cloud like Rackspace with OpenStack Ansible Jirayut Nimsaeng DevOps & Cloud Architect 2nd Cloud OpenStack-Container Conference and Workshop 2016 Grand Postal Building, Bangrak, Bangkok | September 22-23, 2016
103

Build cloud like Rackspace with OpenStack Ansible

Apr 16, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Build cloud like Rackspace with OpenStack Ansible

Build Cloud like Rackspace with OpenStack Ansible

Jirayut NimsaengDevOps & Cloud Architect

2nd Cloud OpenStack-Container Conference and Workshop 2016Grand Postal Building, Bangrak, Bangkok | September 22-23, 2016

Page 2: Build cloud like Rackspace with OpenStack Ansible

What is OpenStack● Open source software for creating private and

public clouds

● Coordinated collection of software from a few dozen related projects

Page 3: Build cloud like Rackspace with OpenStack Ansible

What is OpenStack

Page 4: Build cloud like Rackspace with OpenStack Ansible

OpenStack Core Services

Page 5: Build cloud like Rackspace with OpenStack Ansible

OpenStack Optional Services

Page 6: Build cloud like Rackspace with OpenStack Ansible

OpenStack Release Cycle

Page 7: Build cloud like Rackspace with OpenStack Ansible

Why OpenStack?

Page 8: Build cloud like Rackspace with OpenStack Ansible

Maturity

Page 9: Build cloud like Rackspace with OpenStack Ansible

High Availability and Scalability

Page 10: Build cloud like Rackspace with OpenStack Ansible

Cost saving

http://www.slideshare.net/randybias/openstack-architected-like-aws-and-gcp

Page 11: Build cloud like Rackspace with OpenStack Ansible

Automation Infrastructure

Page 12: Build cloud like Rackspace with OpenStack Ansible

OpenStack Core Services

Page 13: Build cloud like Rackspace with OpenStack Ansible

Overview

Page 14: Build cloud like Rackspace with OpenStack Ansible

OpenStack Dashboard (Horizon)

● A graphical interface to OpenStack services

● Develop on Django web application that is Python

Page 15: Build cloud like Rackspace with OpenStack Ansible

Play with Horizon

Page 16: Build cloud like Rackspace with OpenStack Ansible

OpenStack Image Service (Glance)

● Managed pre-built OS images

● Accepts API requests for disk or server images

● Images can have metadata definitions

● Supports the storage of disk or server images on various

repository types

Page 17: Build cloud like Rackspace with OpenStack Ansible

Play with Glance

Page 18: Build cloud like Rackspace with OpenStack Ansible

OpenStack Networking (Neutron)

● Provide networks and connectivity for instances

● Create and attach interfaces devices

● Plug-ins use to accommodate different networking

equipment and software

● It is Software Defined Networking or SDN● And provided functionality to do Network Function

Virtualization or NFV

Page 19: Build cloud like Rackspace with OpenStack Ansible

Traditional Switch Topology

Page 20: Build cloud like Rackspace with OpenStack Ansible

Data Plane and Control Plane

Page 21: Build cloud like Rackspace with OpenStack Ansible

Neutron Components

Page 22: Build cloud like Rackspace with OpenStack Ansible

Play with Neutron

Page 23: Build cloud like Rackspace with OpenStack Ansible

Security Groups

● Named collection of network access rules to limit the types of

traffic that have access to instance

● You can assign one or more security groups to instance

● Basically it is iptables

● Any incoming traffic that is not matched by a rule is denied

access by default

● What you can configure are

○ Source of traffic

○ Protocol

○ Destination port

● Rules are automatically enforced as soon as you create or modify

Page 24: Build cloud like Rackspace with OpenStack Ansible

Play with Security Groups

Page 25: Build cloud like Rackspace with OpenStack Ansible

Key Pairs

● SSH keys

● Provides SSH access to the instances

● Image must has cloud-init package

● Key pair is belongs to an individual user, not to a project

Page 26: Build cloud like Rackspace with OpenStack Ansible

Play with Key Pairs

Page 27: Build cloud like Rackspace with OpenStack Ansible

OpenStack Compute (Nova)

● Virtualization

● Start and Stop VMs

● Keep track of all running VMs to do load balancing

● Report back to the cloud VM states

Page 28: Build cloud like Rackspace with OpenStack Ansible

Nova Hypervisors Supported

● KVM

● LXC

● Qemu

● VMWare vSphere

● Xen

● IBM PowerVM

● Microsoft Hyper-V

Page 29: Build cloud like Rackspace with OpenStack Ansible

Play with Nova

Page 30: Build cloud like Rackspace with OpenStack Ansible

Floating IP

● An IP address that a project can associate with a VM

Page 31: Build cloud like Rackspace with OpenStack Ansible

Play with Floating IP

Page 32: Build cloud like Rackspace with OpenStack Ansible

OpenStack Block Storage (Cinder)

● Adds persistent storage to a virtual machine

● Managing volumes, volume snapshots and volume types

● Interacts with Nova to provide volumes for instances

Page 33: Build cloud like Rackspace with OpenStack Ansible

Storage types

Page 34: Build cloud like Rackspace with OpenStack Ansible

Play with Cinder

Page 35: Build cloud like Rackspace with OpenStack Ansible

OpenStack Identity (Keystone)

● Provides a single point of integration for managing

○ Authentication

○ Authorization

○ Catalog of services

● Can integrate with external user management systems such

as LDAP

Page 36: Build cloud like Rackspace with OpenStack Ansible

Service Catalog

● Users and services can locate other services by using the

service catalog

● A service catalog is a collection of available services

● Each service can have one or many endpoints

● Endpoint has three types

○ admin

○ internal

○ public

Page 37: Build cloud like Rackspace with OpenStack Ansible

OpenStack Keystone API V2

Page 38: Build cloud like Rackspace with OpenStack Ansible

OpenStack Keystone API V3

Page 39: Build cloud like Rackspace with OpenStack Ansible

OpenStack Identity Design

Page 40: Build cloud like Rackspace with OpenStack Ansible

Domains

Page 41: Build cloud like Rackspace with OpenStack Ansible

Groups

Page 42: Build cloud like Rackspace with OpenStack Ansible

OpenStack and Active Directory

Page 43: Build cloud like Rackspace with OpenStack Ansible

OpenStack Policy

Page 44: Build cloud like Rackspace with OpenStack Ansible

OpenStack policy.json

Page 45: Build cloud like Rackspace with OpenStack Ansible

Play with Keystone

Page 46: Build cloud like Rackspace with OpenStack Ansible

Summary

Page 47: Build cloud like Rackspace with OpenStack Ansible

OpenStack Optional Services

Page 48: Build cloud like Rackspace with OpenStack Ansible
Page 49: Build cloud like Rackspace with OpenStack Ansible
Page 50: Build cloud like Rackspace with OpenStack Ansible

OpenStack Object Storage (Swift)

● Multi-tenant object storage system

● Highly scalable

● Can manage large amounts of unstructured data

● Low cost

● Interact with RESTful HTTP API

Page 51: Build cloud like Rackspace with OpenStack Ansible

Play with Swift

Page 52: Build cloud like Rackspace with OpenStack Ansible

OpenStack Telemetry (Ceilometer)

● Collect data, store in database and provide API service

● Uses an agent-based architecture

● Still need to use command for almost features

Page 53: Build cloud like Rackspace with OpenStack Ansible

Play with Ceilometer

Page 54: Build cloud like Rackspace with OpenStack Ansible

OpenStack Bare-Metal Provisioning (Ironic)

● Provides physical hardware as opposed to virtual machines

● Configure via PXE or IPMI

● Make it easy to provision physical servers like a virtual

machines in a cloud

Page 55: Build cloud like Rackspace with OpenStack Ansible

OpenStack Orchestration (Heat)

● Tool for orchestrating cloud

● Automated configures and deploys resources in stacks

● Defined with templates. Heat Orchestration Template (HOT)

or Cloud Formation

Page 56: Build cloud like Rackspace with OpenStack Ansible

Heat Orchestration Template

Page 57: Build cloud like Rackspace with OpenStack Ansible

And many more...

Page 58: Build cloud like Rackspace with OpenStack Ansible

OpenStack Distributed Storage

Page 59: Build cloud like Rackspace with OpenStack Ansible

Distributed Storage Solution

Page 60: Build cloud like Rackspace with OpenStack Ansible

What is Ceph?

● Distributed storage platform

● Software-defined Storage

● Maintain by Red Hat (that acquired InkTank)

● Support Block, Object, File

Page 61: Build cloud like Rackspace with OpenStack Ansible

Why Ceph?

● Enterprise Class

● Data Protection with Replication

● Self-healing

● No RAID needed

● Flexibility and Scalability (to exabyte!!)

● Performance (with RADOS)

● Lower cost (free and open source)

● Fully-tested with OpenStack

Page 62: Build cloud like Rackspace with OpenStack Ansible

Way to deploy OpenStack

Page 63: Build cloud like Rackspace with OpenStack Ansible
Page 64: Build cloud like Rackspace with OpenStack Ansible

Vendor lock-in

Page 65: Build cloud like Rackspace with OpenStack Ansible

No vendor lock-in

Page 66: Build cloud like Rackspace with OpenStack Ansible

Why OpenStack Ansible?

Page 67: Build cloud like Rackspace with OpenStack Ansible

Use and maintain by Rackspace and Big Tent

Page 68: Build cloud like Rackspace with OpenStack Ansible

Because it is Ansible

● Agentless architecture

● No centralized server

● Human readable

● Open Source

● Highly flexible and configurable

● Idempotent

Page 69: Build cloud like Rackspace with OpenStack Ansible

Infrastructure as a Code

Page 70: Build cloud like Rackspace with OpenStack Ansible

Comply Security Technical Implementation Guide

http://docs.openstack.org/developer/openstack-ansible-security/auto_controls-all.html

Page 71: Build cloud like Rackspace with OpenStack Ansible

Best way to learn how OpenStack working

Page 72: Build cloud like Rackspace with OpenStack Ansible

OpenStack Ansible (OSA)

Page 73: Build cloud like Rackspace with OpenStack Ansible

OpenStack Ansible (OSA)

● OSA uses Ansible to automate deploy OpenStack

environment on Ubuntu Linux

● OSA deploy OpenStack components into Linux container

(LXC) for isolation and ease of maintenance

Page 74: Build cloud like Rackspace with OpenStack Ansible

Ansible

● Ansible provides an automation platform to simplify system

and application deployment

● Ansible manages systems using Secure Shell (SSH)

● Ansible uses playbooks written in the YAML language for

orchestration

● Ansible host types

○ Deployment host

○ Target hosts

Page 75: Build cloud like Rackspace with OpenStack Ansible

YAML

Page 76: Build cloud like Rackspace with OpenStack Ansible

Linux Containers (LXC)

● Containers provide operating-system level virtualization

● No overhead and complexity of virtual machines

● Access to the same kernel, devices and file systems

● It is Linux kernel namespaces

Page 77: Build cloud like Rackspace with OpenStack Ansible

Software requirements

● Ubuntu 16.04 LTS or Ubuntu 14.04 LTS

● Secure Shell (SSH) client and server that supports public

key authentication

● Network Time Protocol (NTP) client for time synchronization

● Python 2.7.x must be on the hosts

● en_US.UTF-8 as locale

Page 78: Build cloud like Rackspace with OpenStack Ansible

Hardware requirements

● CPU support hardware-assisted virtualization extensions

● Disk for install OS should be SSD and doing RAID1

● Network recommended 10 Gigabit Ethernet with bonded

LACP network interfaces

● Enable jumbo frames

● Switch L3 for VLAN and support LACP

Page 79: Build cloud like Rackspace with OpenStack Ansible

OpenStack Ansible Architecture

Page 80: Build cloud like Rackspace with OpenStack Ansible

Infrastructure services

● MariaDB/Galera

● RabbitMQ

● MemcacheD

● Repository

● Load Balancer

● Utility Container

● Log Aggregation Host

● Unbound DNS Container

Page 81: Build cloud like Rackspace with OpenStack Ansible

OpenStack Services supported

Enabled by default

● Cinder

● Nova

● Horizon

● Keystone

● Glance

● Neutron

● Heat

Not enabled by default

● Swift

● Ironic

● Aodh, Ceilometer, Gnocchi

● Magnum

● Sahara

● Aodh

● Ceilometer

● Gnocchi

Page 82: Build cloud like Rackspace with OpenStack Ansible

Networking

● OSA uses Linux bridges to provide layer 2 connectivity

between interfaces and containers

Page 83: Build cloud like Rackspace with OpenStack Ansible

OpenStack Ansible Network

Page 84: Build cloud like Rackspace with OpenStack Ansible

OSA Network on Compute Host

Page 85: Build cloud like Rackspace with OpenStack Ansible

VXLAN and VLAN

Page 86: Build cloud like Rackspace with OpenStack Ansible

Cinder

Page 87: Build cloud like Rackspace with OpenStack Ansible

Glance

Page 88: Build cloud like Rackspace with OpenStack Ansible

Ephemeral storage

Page 89: Build cloud like Rackspace with OpenStack Ansible

Storage choice

● LVM

● iSCSI

● Ceph

● SANs

Page 90: Build cloud like Rackspace with OpenStack Ansible

Swift

Page 91: Build cloud like Rackspace with OpenStack Ansible

How to Deploy with OpenStack Ansible

Page 92: Build cloud like Rackspace with OpenStack Ansible

OpenStack Ansible Deploy Steps

Page 93: Build cloud like Rackspace with OpenStack Ansible

Q/A

Page 94: Build cloud like Rackspace with OpenStack Ansible

Backup Slides

Page 95: Build cloud like Rackspace with OpenStack Ansible

OpenStack CLI

Page 96: Build cloud like Rackspace with OpenStack Ansible

Automated configure commands

Page 97: Build cloud like Rackspace with OpenStack Ansible

Some tips

Page 98: Build cloud like Rackspace with OpenStack Ansible

Caching

Page 99: Build cloud like Rackspace with OpenStack Ansible

OpenStack Network

Page 100: Build cloud like Rackspace with OpenStack Ansible

OpenStack Network

● Single Flat Network

● Multiple Flat Networks

● Mixed Flat + Private Networks

● Single Provider Router

● Per-Tenant Router

Page 101: Build cloud like Rackspace with OpenStack Ansible

OpenStack Network

Page 102: Build cloud like Rackspace with OpenStack Ansible

VLANs or VXLANs?

Page 103: Build cloud like Rackspace with OpenStack Ansible

VLANs Network Traffic Flow