Ansible is Sensible - events.static.linuxfound.org · Ansible is Sensible OpenStack Done the Easy...
-
Upload
nguyendiep -
Category
Documents
-
view
243 -
download
0
Transcript of Ansible is Sensible - events.static.linuxfound.org · Ansible is Sensible OpenStack Done the Easy...
Ansible is Sensible
OpenStack Done the Easy Way
Created by: Igor Ljubuncic
Modified Date: October 2015
• Introduction
• The OpenStack Paradox
• My journey
• Enter Ansible
• DevOps
• Q&A
Agenda
2 www.rackspace.com
9 Worldwide Data Centers
6,000+ Rackers
Global Footprint
Customers in 120+ Countries
Annualized Revenue Over $1.8B
3 www.rackspace.com
About Rackspace
60% 100 OF
THE
We Serve FORTUNE®
OV
ER
300,000+
110,000+ Servers
45,000+ VM
≅70 PB Stored
Customers
Portfolio of Hosted Solutions Dedicated - Cloud - Hybrid
IGOR LJUBUNCIC Linux Lead Engineer, Rackspace UK
dedoimedo.com (DON’T CLICK!)
Books
Patents
Petrolhead
and … OpenStack newbie…
4 www.rackspace.com
About me
• Provide service?
• Use it?
• Expertise
• Learning curve & time
• Deployment size
Should you use it?
9 www.rackspace.com
Wikimedia.org, CC BY-SA 3.0
www.rackspace.com 10
My journey
sed -i "s/^# admin_token.*/admin_token
= ADMIN" /etc/keystone/keystone.conf
export OS_USERNAME=admin
export OS_PASSWORD=openstack
mkdir -p /etc/swift/{object-
server,containerserver,account-server}
network_manager=nova.network.manager.Vl
anManager
vlan_start=100
vlan_interface=eth2
public_interface=eth1
dhcpbridge_flagfile=/etc/nova/nova.conf
dhcpbridge=/usr/bin/nova-dhcpbridge
apt-get -y install quantum-dhcp-agent
quantum-l3-agent quantum-plugin-
openvswitch quantum-plugin-openvswitch-
agent
www.rackspace.com 11
My journey
nova flavor-list
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| ID | Name | Memory_MB | Disk | Ephemeral | Swap | VCPUs | RXTX_Factor | Is_Public |
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
| 1 | m1.tiny | 512 | 1 | 0 | | 1 | 1.0 | True |
| 2 | m1.small | 2048 | 20 | 0 | | 1 | 1.0 | True |
| 201 | tempest1 | 256 | 1 | 0 | | 1 | 1.0 | True |
| 202 | tempest2 | 512 | 1 | 0 | | 1 | 1.0 | True |
| 3 | m1.medium | 4096 | 40 | 0 | | 2 | 1.0 | True |
| 4 | m1.large | 8192 | 80 | 0 | | 4 | 1.0 | True |
| 5 | m1.xlarge | 16384 | 160 | 0 | | 8 | 1.0 | True |
+-----+-----------+-----------+------+-----------+------+-------+-------------+-----------+
nova secgroup-add-rule default tcp 22 22 0.0.0.0/0
nova secgroup-add-rule default icmp -1 -1 0.0.0.0/0
nova keypair-add Igor > igor.pem
nova boot First --image 896fa8ca-682b-4f4e-859e-9f08b82b47fb --flavor 2 --key-name Igor
• Configuration management tool
• Remote connection via OpenSSH (or paramiko Python module)
• But you can also pull configurations (Ansible-Pull)
• Inventory file – groups & names
• Command line
• Playbooks!
• YAML
www.rackspace.com 14
Ansible
www.rackspace.com 15
Ansible playbooks
---
- hosts: webservers
vars:
http_port: 80
remote_user: root
tasks:
- name: write the apache config file
template:
src: /srv/httpd.j2
dest: /etc/httpd.conf
notify:
- restart apache
handlers:
- name: restart apache
service:
name: httpd
state: restarted
16 www.rackspace.com
But why male
models?
What about
OpenStack?
© Paramount Pictures, used for illustration purposes only
• https://github.com/stackforge/os-ansible-deployment
• http://www.slideshare.net/KevinCarter10/osad-slidesvancouver2015
• Ubuntu 14.04, LXC
• Ansible Playbook magic
www.rackspace.com 17
OpenStack Ansible Deployment (OSAD)
bash <(curl http://git.openstack.org/cgit/stackforge/os-
ansible-deployment/plain/scripts/run-aio-build.sh)
openstack-ansible setup-everything.yml
• Focus on using OpenStack not building it
• Configuration management driven methodology
• Simplicity, modular building blocks
• Clean and tidy deployments
• Community help
www.rackspace.com 18
Drive business
THANK YOU
RACKSPACE® | 1 FANATICAL PLACE, CITY OF WINDCREST | SAN ANTONIO, TX 78218
US SALES: 1-800-961-2888 | US SUPPORT: 1-800-961-4454 | WWW.RACKSPACE.COM
© RACKSPACE LTD. | RACKSPACE® AND FANATICAL SUPPORT® ARE SERVICE MARKS OF RACKSPACE US, INC. REGISTERED IN THE UNITED S TATES AND OTHER COUNTRIES. | WWW.RACKSPACE.COM
RACKSPACE® | 5 MILLINGTON ROAD | HAYES, UNITED KINGDOM UB3 4AZ
UK SALES: +44 (0)20 8712 6507 | UK SUPPORT: 0800 988 0300 | WWW.RACKSPACE.CO.UK