Professional Documents
Culture Documents
About me
Soufiane Benmalek
Consultant
+41 78 706 77 25
soufiane.benmalek[at]dbi-services.com
1.What is OpenStack?
2.DBaaS – Database as a Service
3.dbi DBaaS
4.Demo
1
! Introduction
! History
! Architecture 2
November 2010
! First OpenStack release: Austin
Currently
! 16th OpenStack release: Pike
Source: https://releases.openstack.org/
dbi DBaaS with Openstack 9/13/2017 Page 9
What is OpenStack?
Architecture
Source: https://docs.openstack.org/install-guide/_images/openstack-arch-kilo-logical-v1.png
dbi DBaaS with Openstack 9/13/2017 Page 10
What is OpenStack?
Architecture
Dashboard Identity
(Horizon) service
Keystone
Provides a token service
for validating Token
subsequent requests
Maintains a list of
Catalog
OpenStack service
endpoints
Nova
! Provides virtualization capabilities within the OpenStack cloud
! Supports multiple hypervisors
> KVM, vSphere, Xen, Hyper-V
! Supports containers
> LXC, Docker
Glance
! Every instance needs an OS to boot up
! Pre-made images
! OS on demand
! Supports multiple image formats (RAW, qcow2, VMDK, AMI, etc...)
! Supports multiple backends (File, Ceph, Swift, Cinder)
Cinder
! By default instances have ephemeral storage
! Provides persistent storage devices to instances
! Supports migration, backups
! Instances can boot from an volume
Neutron
! Provides network as a service between instances within the cloud
! Supports multiple technologies
> VXLAN, GRE
Horizon
! Codename for the OpenStack dashboard
! User friendly
! Can be customized easily
Upgrades Support
Best
Security
practices
OpenStack-Ansible
! 30 companies contribute to this project
! Uses Ansible for deployment
! Isolation
> Each OpenStack service runs in a LinuxContainer (LXC)
! Supports multiple OS
> CentOS 7, RHEL 7.2, Ubuntu 14.04 & 16.04, openSUSE 42.x
! Really good documentation
! Can be deployed on one host (AIO) for testing Source: http://stackalytics.com/?module=openstack-ansible&release=pike
1
! Project overview
! Market comparison
! Approach 2
! Compare automation tools
3
Project specifications
! Must run on OpenStack
! First focus is made on MySQL/MariaDB for now
! Must enable the use of dbi services best practices
! Create a turnkey solution for our customers
Trove
! OpenStack component for deploying databases as a service
! First integrated in Icehouse release
! Multiple datastores
! Supports the latest OpenStack versions
! Runs an agent on the deployed databases
! Two types of images
> Open source images (not recommended for production)
> Enterprises images
! Images built using disk-image-builder tool
training@infra01:~$ git clone https://git.openstack.org/openstack/diskimage-builder
Cloning into 'diskimage-builder'...
EDB Ark
! Developed by EDB enterprise
! Deploy PostgreSQL databases in OpenStack
! Web User Interface
! Available for other cloud platforms
> AWS, Azure
! Can be used for free
> Only pay for compute resources
How?
! Automation tool Package Compare
> Easy to use, flexible the automation
! Packaging the solution solution tools
> Not a bunch of scripts
Project specifications
! Must run on OpenStack Choose one
! First focus is made on MySQL/MariaDB for now
! Must enable the use of dbi services best practices
! Create a turnkey solution for our customers
Heat resources:
my_instance:
! Comes Out of the box type: OS::Nova::Server
! Employs a template language called HOT properties:
key_name: { get_param: key_name }
> 100% YAML based image: { get_param: image }
flavor: { get_param: flavor }
! Uses OpenStack resources networks: [{network: {get_param: network} }]
heat_template_version: 2014-10-16
description: |
Sample instance
resources:
instance:
type: OS::Nova::Server
properties:
flavor: m1.small
image: ubuntu-trusty-x86_64
networks:
- network: private
Juju
! Many providers
> OpenStack, AWS, Azure, vSphere
$ training@infra01:~$ juju add-cloud ovh IODAY.yaml
! Private clouds
! Public clouds
> Ask the provider to give you metadata
$ training@infra01:~$ juju metadata generate-image -d ~/simplestreams -i $IMAGE_ID -s
$OS_SERIES -r $REGION -u http://$KEYSTONE_IP:5000/v2.0/
! Deploys charms
Terraform
! Developed by HashiCorp
! Tool for provisioning infrastructure in an easy and repeatable way
! Supports many providers
> OpenStack, AWS, Google Cloud Platform, VMware, Microsoft Azure, etc.
! Multiple provisioners
> Ansible (through plugin), Chef, File, Shell, etc.
# Configure the OpenStack Provider
provider "openstack" {
user_name = "admin"
tenant_name = "admin"
password = "pwd"
auth_url = "http://myauthurl:5000/v2.0"
region = "RegionOne"
}
Ansible
! Configuration tool
! 100% YAML based
! Built-in OpenStack modules (os_server, os_volume, os_auth)
> Via SHADE à OpenStack SDK
! Tasks are written in playbooks
- name: Create a new instance and attaches to a
network and passes metadata to the instance
os_server:
state: present
auth:
auth_url: https://auth_url/v2
username: admin
password: admin
project_name: admin
name: vm1
image: 4f905f38-e52a-43d2-b6ec-754a13ffb529
key_name: ansible_key
flavor: 4
nics:
- net-id: 34605f38-e52a-25d2-b6e
Portable on OpenStack
Portable on any cloud
1
! Architecture
! Packaging
! Demo 2
The image is
The end user The databases are
uploaded to
launches a script deployed
OpenStack (or not)
Packer
! Open source tool developed by HashiCorp
! Automate the creation of any machine images
! Runs on every major operating systems
Different output
image formats :
RAW, qcow2, ISO,
Builds on AMI
Packer
$ training@infra01:~$ cat myraw.json
{
"builders":
[
{
"type": "qemu",
"iso_url": "http://mirror.raystedman.net/centos/7/isos/x86_64/CentOS-7-x86_64-
Minimal-1611.iso",
"output_directory": "output_centos_tdhtest",
"shutdown_command": "shutdown -P now",
"disk_size": 5000,
"format": "qcow2",
Nyon
Any questions?
Please do ask!
We would love to boost
your IT-Infrastructure
How about you?
dbi DBaaS with Openstack 9/13/2017 Page 37