PA200 - OpenStack - Technical Insight Petr Blaho, Ilya Etingof April 3, 2018 OpenStack Overview Lecture plan • Warm-up • VM deploy demo • OpenStack key components • OpenStack VM deploy workflow • OpenStack service structure • OpenStack contribution model Morning exercise Why cloud computing? 1. To improve the utilization of computer resources 2. To improve information security 3. To boost network performance 4. To improve service reliability 5. To achieve service elasticity 1 OpenStack service model? 1. Software as a Service 2. Application as a Service 3. Platform as a Service 4. Infrastructure as a Service 5. Computing as a Service OpenStack is a: 1. Google software 2. Service of Amazon 3. Microsoft solution 4. Red Hat subscription service 5. Community effort OpenStack major competitors 1. Amazon Web Services 2. IBM BlueMix 3. Google Compute 4. Microsoft Azure 5. In-house cloud management solutions 6. None of the above OpenStack consumption model 1. License from the OpenStack Foundation 2. Commercial Red Hat subscription 3. Official certification from Mirantis 4. None of the above 2 Deploy a VM with OpenStack • Request & launch a VM • Log into the VM • Destroy the VM Demo: request & launch a VM • Choose VM configuration • Choose OS to install on the VM • Create the VM, boot the OS • Log into VM and use it somehow • Tier down the VM Demo: Choose VM configuration $ openstack flavor list +----+-----------+-----------+------+-----------+------+-------+-------------+ | ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | +----+-----------+-----------+------+-----------+------+-------+-------------+ | 1 | m1.tiny | 512 | 0 | 0 | | 1 | 1.0 | | 2 | m1.small | 2048 | 10 | 20 | | 1 | 1.0 | | 3 | m1.medium | 4096 | 10 | 40 | | 2 | 1.0 | | 4 | m1.large | 8192 | 10 | 80 | | 4 | 1.0 | | 5 | m1.xlarge | 16384 | 10 | 160 | | 8 | 1.0 | +----+-----------+-----------+------+-----------+------+-------+-------------+ Demo: Choose OS image $ openstack image list +--------------------------------------+--------------+--------+ | ID | Name | Status | +--------------------------------------+--------------+--------+ 3 | afa49adf-2831-4a00-9c57-afe1624d5557 | CentOS-6 | active | | 842c207f-6964-4ed7-a41a-06ec66a7c954 | Ubuntu-14 | active | | 30a2a55a-2045-4ed8-a605-2d1c1143edd3 | Ubuntu-16 | active | | 713f2fbc-05c5-491b-9e02-e000861e7b30 | Fedora-24 | active | | 5cb9c233-5867-4e47-80a1-9d774f800444 | Debian-7 | active | | f84868a5-5261-404a-9c54-ec317ea16b94 | CentOS-7 | active | | b105ad3b-7df8-4318-9c3d-4e4fa4cc4563 | Debian-8 | active | | b67b74bc-c3a8-4087-9c28-de02161fdedd | CoreOS | active | +--------------------------------------+--------------+--------+ Demo: Create VM & boot OS $ openstack server create --flavor m1.small --key-name mykey \ --network mynetwork --image CentOS-7 mycentos +------------------------+--------------------------------------+ | Property | Value | +------------------------+--------------------------------------+ ... | id | 0e4011a4-3128-4674-ab16-dd1b7ecc126e | | status | BUILD | +------------------------+--------------------------------------+ Demo: List running VMs $ openstack server list +--------------------------------------+--------------+--------+----------------------- | ID | Name | Status | Networks +--------------------------------------+--------------+--------+----------------------- | 76b3adb3-1f5a-4276-8b82-abdf21352946 | mycentos | ACTIVE | mynetwork=192.168.1.23 | 246e50b8-29fa-4310-b972-a71cd0df43bf | Ubuntu14 | ACTIVE | mynetwork=192.168.1.98 +--------------------------------------+--------------+--------+----------------------- Demo: Log into VM $ ssh centos@192.168.1.23 mycentos $ 4 Demo: Tier down VM $ openstack server delete mycentos Orchestration: Heat • Stacks up the resources • Using declarative language (YAML) • Heat engine executes the template Orchestration: Heat templates resources: instance: type: OS::Nova::Server properties: flavor: m1.small image: ubuntu-trusty-x86_64 networks: - network: private Orchestration: Heat $ openstack stack create -t teststack.yaml teststack +--------+----------------+--------------------+----------------------+ | id | stack_name | stack_status | creation_time | +--------+----------------+--------------------+----------------------+ | ... | teststack | CREATE_IN_PROGRESS | 2018-03-05T18:10:40Z | +--------+----------------+--------------------+----------------------+ OpenStack design • A collection of loosely coupled services • Interacting over REST APIs • Using well-defined protocols • Each service is a project backed by a team 5 OpenStack key services • Compute service - Nova • Network service - Neutron • Image service - Glance • Object Storage service - Swift • Identity service - Keystone OpenStack key services VM deployment workflow • Heat engine executes a template • Nova schedules VM creation • Nova asks Glance for image • Glance asks Swift for image contents • Heat asks Cinder for volume • Nova asks Neutron for network 6 VM deployment workflow VM deployment workflow OpenStack service structure • Message queue 7 • Persistent database • REST API service • Service engine • Remote agent Other OpenStack services • Orchestration - Heat • Baremetal provisioning - Ironic • Non/relational database service - Trove • Dashboard - Horison • Block Storage - Cinder • Telemetry - Ceilometer More OpenStack services • Elastic Map Reduce - Sahara • Messaging Service - Zaqar • Shared Filesystems - Manila • DNS Service - Designate • Key Management - Barbican • Containers - Magnum • Application Catalog - Murano • Governance - Congress 8 OpenStack governance • Open source • Open community • Open design • Open development Open source • Fully functional, no vendor-specifics • Apache 2.0 License Open community • Public meetings on IRC • Mailing lists, bugs on Launchpad and Storyboard • Elected Project Team Lead • Elected Technical Committee Open design • OpenStack Summit • OpenStack Forum • Project Team Gatherings Open development • Code contributions - https://review.openstack.org/ • Project Team Lead • Core Reviewers • Specifications - https://specs.openstack.org/ 9 Questions? • https://www.openstack.org/ 10