SlideShare uma empresa Scribd logo
1 de 27
Vagrant, Ansible and OpenStack
               on your laptop
                              Lorin Hochstein
                              Nimbis Services


Email: lorin@nimbisservices.com
Twitter: lhochstein
Setting up OpenStack for production is
          complex and error-prone
2012-08-04 12:31:56 INFO nova.rpc.common [-] Reconnecting to AMQP server on localhost:5672
2012-08-04 12:31:56 ERROR nova.rpc.common [-] AMQP server on localhost:5672 is unreachable:
[Errno 111] ECONNREFUSED. Trying again in 30 seconds.
2012-08-04 12:31:56 TRACE nova.rpc.common Traceback (most recent call last):
2012-08-04 12:31:56 TRACE nova.rpc.common   File "/usr/lib/python2.7/dist-
packages/nova/rpc/impl_kombu.py", line 446, in reconnect
2012-08-04 12:31:56 TRACE nova.rpc.common     self._connect()
2012-08-04 12:31:56 TRACE nova.rpc.common   File "/usr/lib/python2.7/dist-
packages/nova/rpc/impl_kombu.py", line 423, in _connect
2012-08-04 12:31:56 TRACE nova.rpc.common     self.connection.connect()
2012-08-04 12:31:56 TRACE nova.rpc.common   File "/usr/lib/python2.7/dist-
packages/kombu/connection.py", line 154, in connect
2012-08-04 12:31:56 TRACE nova.rpc.common     return self.connection
2012-08-04 12:31:56 TRACE nova.rpc.common   File "/usr/lib/python2.7/dist-
packages/kombu/connection.py", line 560, in connection
2012-08-04 12:31:56 TRACE nova.rpc.common     self._connection = self._establish_connection()
2012-08-04 12:31:56 TRACE nova.rpc.common   File "/usr/lib/python2.7/dist-
packages/kombu/connection.py", line 521, in _establish_connection
2012-08-04 12:31:56 TRACE nova.rpc.common     conn = self.transport.establish_connection()
2012-08-04 12:31:56 TRACE nova.rpc.common   File "/usr/lib/python2.7/dist-
packages/kombu/transport/pyamqplib.py", line 255, in establish_connection
2012-08-04 12:31:56 TRACE nova.rpc.common     connect_timeout=conninfo.connect_timeout)
2012-08-04 12:31:56 TRACE nova.rpc.common   File "/usr/lib/python2.7/dist-
packages/kombu/transport/pyamqplib.py", line 52, in __init__
2012-08-04 12:31:56 TRACE nova.rpc.common     super(Connection, self).__init__(*args,
You're looking for better ways to do
            deployment
Shell scripts are painful, Puppet & Chef
           have steep learning curves
if [[ $EUID -eq 0 ]]; then
    ROOTSLEEP=${ROOTSLEEP:-10}
    echo "You are running this script as root."
    echo "In $ROOTSLEEP seconds, we will create a user 'stack' and run as that
user"
    sleep $ROOTSLEEP

    # since this script runs as a normal user, we need to give that user
    # ability to run sudo
    if [[ "$os_PACKAGE" = "deb" ]]; then
        dpkg -l sudo || apt_get update && install_package sudo
    else
        rpm -qa | grep sudo || install_package sudo
    fi
    if ! getent passwd stack >/dev/null; then
        echo "Creating a user called stack"
        useradd -U -s /bin/bash -d $DEST -m stack
    fi




Source: devstack/stack.sh
You want an easy way to write & debug
         deployment scripts
Use Ansible to write OpenStack
deployment scripts, Vagrant to test
       them inside of VMs
Ansible big idea: very simple syntax,
      SSH for communication
Example Ansible play: install ntp
---
- hosts: controller
  tasks:
  - name: ensure ntp packages is installed
    action: apt pkg=ntp

 - name: ensure ntp.conf file is present
   action: copy src=files/ntp.conf dest=/etc/ntp.conf
           owner=root group=root mode=0644

 - name: ensure ntp service is restarted
   action: service name=ntp state=restarted
Specify hosts in an inventory file
[controller]
192.168.206.130

[compute]
192.168.206.131
192.168.206.132
192.168.206.133
192.168.206.134
Run the playbook
$ ansible-playbook ntp.yaml
PLAY [controller] *********************

GATHERING FACTS *********************
ok: [192.168.206.130]

TASK: [ensure ntp packages is installed] *********************
ok: [192.168.206.130]

TASK: [ensure ntp.conf file is present] *********************
ok: [192.168.206.130]

TASK: [ensure ntp service is restarted] *********************
ok: [192.168.206.130]

PLAY RECAP *********************
192.168.206.130     : ok=4    changed=3
                      unreachable=0     failed=0
What did Ansible just do?
1. Made SSH connections to remote host
2. Copied over Python modules and arguments
   parsed from playbook file
3. Executed modules on remote machine
Can run a single action using
          ansible command
$ ansible controller –m apt –a "pkg=ntp"

192.168.206.130 | success >> {
    "changed": false,
    "item": "",
    "module": "apt"
}
Ansible scripts are idempotent: can
        run multiple times safely
$ ansible-playbook ntp.yaml
PLAY [controller] *********************

GATHERING FACTS *********************
ok: [192.168.206.130]

TASK: [ensure ntp packages is installed]
*********************
ok: [192.168.206.130]

TASK: [ensure ntp.conf file is present] *********************
ok: [192.168.206.130]

TASK: [ensure ntp service is restarted] *********************
ok: [192.168.206.130]

PLAY RECAP *********************
192.168.206.130     : ok=4    changed=1
                      unreachable=0     failed=0
Use handlers if action should only
          occur on a state change
---
- hosts: controller
  tasks:
  - name: ensure glance database is present
    action: mysql_db name=glance
    notify:
    - version glance database

 handlers:
 - name: version glance database
   action: command glance-manage version_control 0
Use templates to substitute variables
            in config file
keystone.conf:
[DEFAULT]
public_port = 5000
admin_port = 35357
admin_token = {{ admin_token }}

keystone.yaml:
hosts: controller
vars:
   admin_token: 012345SECRET99TOKEN012345
tasks:
 - name: ensure keystone config script is present
    action: template src=keystone.conf dest=/etc/keystone/
               keystone.conf owner=root group=root mode=0644
Ansible supports multiple modules,
    can also do arbitrary shell commands
•   apt & yum packages
•   Stop/start/restart services
•   users & groups
•   Add SSH public keys
•   MySQL & PostgreSQL users & databases
•   VMs managed by libvirt
•   Git checkouts
Vagrant big idea: redistributable VMs,
  run with config files & commands
Import a new virtual machine
       (Ubuntu 12.04 64-bit)

$ vagrant box add precise64
http://files.vagrantup.com/
       precise64.box
Make a Vagrantfile


Vagrant::Config.run do |config|
  config.vm.box = "precise64"
end



    Vagrant can also generate this for you: “vagrant init precise64”
Boot it and connect to it
$ vagrant   up
[default]   Importing base box 'precise64'...
[default]   Matching MAC address for NAT networking...
[default]   Clearing any previously set forwarded ports...
[default]   Fixed port collision for 22 => 2222. Now on port 2200.
[default]   Forwarding ports...
[default]   -- 22 => 2200 (adapter 1)
[default]   Creating shared folders metadata...
[default]   Clearing any previously set network interfaces...
[default]   Booting VM...
[default]   Waiting for VM to boot. This can take a few minutes.
[default]   VM booted and ready for use!
[default]   Mounting shared folders...
[default]   -- v-root: /vagrant

$ vagrant ssh
Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)

 * Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Thu Jun 7 00:49:30 2012 from 10.0.2.2
vagrant@precise64:~$
Boot multi-VMs: configure IPs,
            memory, hostname
Vagrant::Config.run do |config|

 config.vm.box = "precise64”
 config.vm.define :controller do |controller_config|
   controller_config.vm.network :hostonly, "192.168.206.130"
   controller_config.vm.host_name = "controller"
 end

 config.vm.define :compute1 do |compute1_config|
   compute1_config.vm.network :hostonly, "192.168.206.131"
   compute1_config.vm.host_name = "compute1"
   compute1_config.vm.customize ["modifyvm", :id,
                                 "--memory", 1024]
 end

end
Openstack-ansible: Ansible scripts for
       OpenStack Compute




                     Links to OpenStack
                     Install & Deploy Guide
Config: controller, one compute host,
          QEMU, FlatDHCP

     controller                                          compute1

                         .130              .131
                  eth1                            eth1
                                192.168.206.*




                         .130              .131
                  eth2                            eth2
    eth0                        192.168.100.*              eth0

    NAT                                                    NAT
Vagrantfile describes this setup
Vagrant::Config.run do |config|

 config.vm.box = "precise64"

 config.vm.define :controller do |controller_config|
   controller_config.vm.network :hostonly, "192.168.206.130”
   controller_config.vm.host_name = "controller"
 end

  config.vm.define :compute1 do |compute1_config|
    compute1_config.vm.network :hostonly, "192.168.206.131”
    compute1_config.vm.host_name = "compute1"
    compute1_config.vm.customize ["modifyvm", :id, "--memory",
1024]
    compute1_config.vm.customize ["modifyvm", :id, "--
nicpromisc3",
                              "allow-all"]
  end
end
If all goes well…
$ make all
. . .
-------------------------------------+--------------------------------------+
| Property                            | Value                                 |
+-------------------------------------+--------------------------------------+
| OS-DCF:diskConfig                   | MANUAL                                |
| OS-EXT-SRV-ATTR:host                | None                                  |
| OS-EXT-SRV-ATTR:hypervisor_hostname | None                                  |
| OS-EXT-SRV-ATTR:instance_name       | instance-00000001                     |
| OS-EXT-STS:power_state              | 0                                     |
| OS-EXT-STS:task_state               | scheduling                            |
| OS-EXT-STS:vm_state                 | building                              |
| accessIPv4                          |                                       |
| accessIPv6                          |                                       |
| adminPass                           | CJ8NNNa4dc6f                          |
| config_drive                        |                                       |
| created                             | 2012-08-09T02:51:14Z                  |
| flavor                              | m1.tiny                               |
| hostId                              |                                       |
| id                                  | 8e9238b8-208d-46a8-8f66-c40660abacff |
| image                               | cirros-0.3.0-x86_64                   |
| key_name                            | mykey                                 |
| metadata                            | {}                                    |
| name                                | cirros                                |
Links
• Vagrantfile & Ansible playbooks for OpenStack:
http://github.com/lorin/openstack-ansible
• Ansible: http://ansible.github.com
• Vagrant: http://vagrantup.com
• Ansible playbook examples:
  https://github.com/ansible/ansible/tree/devel/examples
  /playbooks
• Vagrant boxes: http://vagrantbox.es
Image sources
•   http://vagrantup.com
•   http://ansible.github.com
•   http://openstack.org
•   http://en.wikipedia.org/wiki/File:Rack001.jpg
•   http://en.wikipedia.org/wiki/File:Easy_button.JPG
•   http://hezik.nl/enable-ssh-server-on-backtrack-5-r2/

Mais conteúdo relacionado

Mais procurados

Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~
Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~
Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~株式会社クライム
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansibleKhizer Naeem
 
Designing a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd productsDesigning a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd productsJulian Mazzitelli
 
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)シスコシステムズ合同会社
 
Open vSwitch Introduction
Open vSwitch IntroductionOpen vSwitch Introduction
Open vSwitch IntroductionHungWei Chiu
 
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링OpenStack Korea Community
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축Ji-Woong Choi
 
L3HA-VRRP-20141201
L3HA-VRRP-20141201L3HA-VRRP-20141201
L3HA-VRRP-20141201Manabu Ori
 
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会真乙 九龍
 
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개OpenStack Korea Community
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-RegionJi-Woong Choi
 
バイナリ解析入門
バイナリ解析入門バイナリ解析入門
バイナリ解析入門aksechack0001
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOSAkihiro Suda
 
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介IBM Analytics Japan
 
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月 知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月 VirtualTech Japan Inc.
 
ACRN Kata Container on ACRN
ACRN Kata Container on ACRNACRN Kata Container on ACRN
ACRN Kata Container on ACRNProject ACRN
 
nexus helm 설치, docker/helm repo 설정과 예제
nexus helm 설치, docker/helm repo 설정과 예제nexus helm 설치, docker/helm repo 설정과 예제
nexus helm 설치, docker/helm repo 설정과 예제choi sungwook
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking ExplainedThomas Graf
 
DevOps Meetup ansible
DevOps Meetup   ansibleDevOps Meetup   ansible
DevOps Meetup ansiblesriram_rajan
 

Mais procurados (20)

Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~
Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~
Veeam新機能 徹底解説 Part 1:Oracle RMAN連携 ~運用変えずVeeamでらくらくバックアップ&リストア~
 
Automation with ansible
Automation with ansibleAutomation with ansible
Automation with ansible
 
Designing a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd productsDesigning a complete ci cd pipeline using argo events, workflow and cd products
Designing a complete ci cd pipeline using argo events, workflow and cd products
 
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)
Cisco Modeling Labs (CML)を使ってネットワークを学ぼう!(DevNet編)
 
Open vSwitch Introduction
Open vSwitch IntroductionOpen vSwitch Introduction
Open vSwitch Introduction
 
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
[OpenInfra Days Korea 2018] (Track 4) - Grafana를 이용한 OpenStack 클라우드 성능 모니터링
 
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
[오픈소스컨설팅]쿠버네티스를 활용한 개발환경 구축
 
L3HA-VRRP-20141201
L3HA-VRRP-20141201L3HA-VRRP-20141201
L3HA-VRRP-20141201
 
ゼロからはじめるKVM超入門
ゼロからはじめるKVM超入門ゼロからはじめるKVM超入門
ゼロからはじめるKVM超入門
 
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
【Zabbix2.0】snmpttによるトラップメッセージの編集 #Zabbix #自宅ラック勉強会
 
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
[OpenInfra Days Korea 2018] (Track 2) Neutron LBaaS 어디까지 왔니? - Octavia 소개
 
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
[오픈소스컨설팅] Open Stack Ceph, Neutron, HA, Multi-Region
 
バイナリ解析入門
バイナリ解析入門バイナリ解析入門
バイナリ解析入門
 
[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS[KubeCon EU 2022] Running containerd and k3s on macOS
[KubeCon EU 2022] Running containerd and k3s on macOS
 
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
Db2 v11.5.4 高可用性構成 & HADR 構成パターンご紹介
 
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月 知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
知っているようで知らないNeutron -仮想ルータの冗長と分散- - OpenStack最新情報セミナー 2016年3月
 
ACRN Kata Container on ACRN
ACRN Kata Container on ACRNACRN Kata Container on ACRN
ACRN Kata Container on ACRN
 
nexus helm 설치, docker/helm repo 설정과 예제
nexus helm 설치, docker/helm repo 설정과 예제nexus helm 설치, docker/helm repo 설정과 예제
nexus helm 설치, docker/helm repo 설정과 예제
 
Linux Networking Explained
Linux Networking ExplainedLinux Networking Explained
Linux Networking Explained
 
DevOps Meetup ansible
DevOps Meetup   ansibleDevOps Meetup   ansible
DevOps Meetup ansible
 

Destaque

OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise Cisco Canada
 
Deploying OpenStack with Ansible
Deploying OpenStack with AnsibleDeploying OpenStack with Ansible
Deploying OpenStack with AnsibleKevin Carter
 
[1A7]Ansible의이해와활용
[1A7]Ansible의이해와활용[1A7]Ansible의이해와활용
[1A7]Ansible의이해와활용NAVER D2
 
OpenStack Branding and Marketing
OpenStack Branding and MarketingOpenStack Branding and Marketing
OpenStack Branding and MarketingOpen Stack
 
Quantum essex summary
Quantum essex summaryQuantum essex summary
Quantum essex summaryDan Wendlandt
 
ZeroMQ简介
ZeroMQ简介ZeroMQ简介
ZeroMQ简介Xu Wang
 
Nosql why and how on Microsoft Azure
Nosql why and how on Microsoft AzureNosql why and how on Microsoft Azure
Nosql why and how on Microsoft AzureVito Flavio Lorusso
 
Dough: OpenStack Billing Project
Dough: OpenStack Billing ProjectDough: OpenStack Billing Project
Dough: OpenStack Billing ProjectZhongyue Luo
 
Winning at Personalized Customer Engagement
Winning at Personalized Customer EngagementWinning at Personalized Customer Engagement
Winning at Personalized Customer EngagementMarketo
 
OpenStack design summit (colony session)
OpenStack design summit (colony session)OpenStack design summit (colony session)
OpenStack design summit (colony session)Shigetoshi Yokoyama
 
Securing open stack for compliance
Securing open stack for complianceSecuring open stack for compliance
Securing open stack for complianceTomasz Zen Napierala
 
Flexible, simple deployments with OpenStack-Ansible
Flexible, simple deployments with OpenStack-AnsibleFlexible, simple deployments with OpenStack-Ansible
Flexible, simple deployments with OpenStack-AnsibleMajor Hayden
 
Managing sensitive data with Ansible vault
Managing sensitive data with Ansible vaultManaging sensitive data with Ansible vault
Managing sensitive data with Ansible vaultPascal Stauffer
 
Ansible for Enterprise
Ansible for EnterpriseAnsible for Enterprise
Ansible for EnterpriseAnsible
 
[세미나] Vagrant 이지원
[세미나] Vagrant 이지원[세미나] Vagrant 이지원
[세미나] Vagrant 이지원지원 이
 
OpenStack-Ansible Security
OpenStack-Ansible SecurityOpenStack-Ansible Security
OpenStack-Ansible SecurityMajor Hayden
 
XE 모듈 개발 - 걸음마부터 날기까지 - 달리기
XE 모듈 개발 - 걸음마부터 날기까지 - 달리기XE 모듈 개발 - 걸음마부터 날기까지 - 달리기
XE 모듈 개발 - 걸음마부터 날기까지 - 달리기승엽 신
 
Deploying Efficient OpenStack Clouds, Yaron Haviv
Deploying Efficient OpenStack Clouds, Yaron HavivDeploying Efficient OpenStack Clouds, Yaron Haviv
Deploying Efficient OpenStack Clouds, Yaron HavivCloud Native Day Tel Aviv
 
Open stack and sdn hands-on and demo
Open stack and sdn hands-on and demoOpen stack and sdn hands-on and demo
Open stack and sdn hands-on and demoKyohei Moriyama
 

Destaque (20)

OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise OpenStack Deployment in the Enterprise
OpenStack Deployment in the Enterprise
 
Deploying OpenStack with Ansible
Deploying OpenStack with AnsibleDeploying OpenStack with Ansible
Deploying OpenStack with Ansible
 
[1A7]Ansible의이해와활용
[1A7]Ansible의이해와활용[1A7]Ansible의이해와활용
[1A7]Ansible의이해와활용
 
OpenStack Branding and Marketing
OpenStack Branding and MarketingOpenStack Branding and Marketing
OpenStack Branding and Marketing
 
Quantum essex summary
Quantum essex summaryQuantum essex summary
Quantum essex summary
 
ZeroMQ简介
ZeroMQ简介ZeroMQ简介
ZeroMQ简介
 
Nosql why and how on Microsoft Azure
Nosql why and how on Microsoft AzureNosql why and how on Microsoft Azure
Nosql why and how on Microsoft Azure
 
Dough: OpenStack Billing Project
Dough: OpenStack Billing ProjectDough: OpenStack Billing Project
Dough: OpenStack Billing Project
 
Winning at Personalized Customer Engagement
Winning at Personalized Customer EngagementWinning at Personalized Customer Engagement
Winning at Personalized Customer Engagement
 
OpenStack design summit (colony session)
OpenStack design summit (colony session)OpenStack design summit (colony session)
OpenStack design summit (colony session)
 
Securing open stack for compliance
Securing open stack for complianceSecuring open stack for compliance
Securing open stack for compliance
 
Ansible & Vagrant
Ansible & VagrantAnsible & Vagrant
Ansible & Vagrant
 
Flexible, simple deployments with OpenStack-Ansible
Flexible, simple deployments with OpenStack-AnsibleFlexible, simple deployments with OpenStack-Ansible
Flexible, simple deployments with OpenStack-Ansible
 
Managing sensitive data with Ansible vault
Managing sensitive data with Ansible vaultManaging sensitive data with Ansible vault
Managing sensitive data with Ansible vault
 
Ansible for Enterprise
Ansible for EnterpriseAnsible for Enterprise
Ansible for Enterprise
 
[세미나] Vagrant 이지원
[세미나] Vagrant 이지원[세미나] Vagrant 이지원
[세미나] Vagrant 이지원
 
OpenStack-Ansible Security
OpenStack-Ansible SecurityOpenStack-Ansible Security
OpenStack-Ansible Security
 
XE 모듈 개발 - 걸음마부터 날기까지 - 달리기
XE 모듈 개발 - 걸음마부터 날기까지 - 달리기XE 모듈 개발 - 걸음마부터 날기까지 - 달리기
XE 모듈 개발 - 걸음마부터 날기까지 - 달리기
 
Deploying Efficient OpenStack Clouds, Yaron Haviv
Deploying Efficient OpenStack Clouds, Yaron HavivDeploying Efficient OpenStack Clouds, Yaron Haviv
Deploying Efficient OpenStack Clouds, Yaron Haviv
 
Open stack and sdn hands-on and demo
Open stack and sdn hands-on and demoOpen stack and sdn hands-on and demo
Open stack and sdn hands-on and demo
 

Semelhante a Deploy OpenStack on your laptop with Vagrant and Ansible

ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments Eueung Mulyana
 
Component pack 6006 install guide
Component pack 6006 install guideComponent pack 6006 install guide
Component pack 6006 install guideRoberto Boccadoro
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratchjoshuasoundcloud
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guideSeungmin Shin
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Praguetomasbart
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation ToolsEdwin Beekman
 
Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Trevor Roberts Jr.
 
Openstack 101
Openstack 101Openstack 101
Openstack 101POSSCON
 
NFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center OperationsNFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center OperationsCumulus Networks
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016StackIQ
 
Ansible for Beginners
Ansible for BeginnersAnsible for Beginners
Ansible for BeginnersArie Bregman
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefMatt Ray
 
StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce
StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce
StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce StackIQ
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_trainingvideos
 
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...addame
 

Semelhante a Deploy OpenStack on your laptop with Vagrant and Ansible (20)

ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments ONOS SDN Controller - Clustering Tests & Experiments
ONOS SDN Controller - Clustering Tests & Experiments
 
kubernetes practice
kubernetes practicekubernetes practice
kubernetes practice
 
Component pack 6006 install guide
Component pack 6006 install guideComponent pack 6006 install guide
Component pack 6006 install guide
 
Linux Containers From Scratch
Linux Containers From ScratchLinux Containers From Scratch
Linux Containers From Scratch
 
Linux configer
Linux configerLinux configer
Linux configer
 
TrinityCore server install guide
TrinityCore server install guideTrinityCore server install guide
TrinityCore server install guide
 
Docker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in PragueDocker and friends at Linux Days 2014 in Prague
Docker and friends at Linux Days 2014 in Prague
 
Network Automation Tools
Network Automation ToolsNetwork Automation Tools
Network Automation Tools
 
Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013Couch to OpenStack: Nova - July, 30, 2013
Couch to OpenStack: Nova - July, 30, 2013
 
Openstack 101
Openstack 101Openstack 101
Openstack 101
 
Ass OS
Ass OSAss OS
Ass OS
 
NFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center OperationsNFD9 - Matt Peterson, Data Center Operations
NFD9 - Matt Peterson, Data Center Operations
 
Ass hđh
Ass hđhAss hđh
Ass hđh
 
Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016Salesforce at Stacki Atlanta Meetup February 2016
Salesforce at Stacki Atlanta Meetup February 2016
 
Ansible for Beginners
Ansible for BeginnersAnsible for Beginners
Ansible for Beginners
 
Bare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and ChefBare Metal to OpenStack with Razor and Chef
Bare Metal to OpenStack with Razor and Chef
 
Stacki - The1600+ Server Journey
Stacki - The1600+ Server JourneyStacki - The1600+ Server Journey
Stacki - The1600+ Server Journey
 
StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce
StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce
StackiFest16: Stacki 1600+ Server Journey - Dave Peterson, Salesforce
 
9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training9 creating cent_os 7_mages_for_dpdk_training
9 creating cent_os 7_mages_for_dpdk_training
 
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
Montreal On Rails 5 : Rails deployment using : Nginx, Mongrel, Mongrel_cluste...
 

Último

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAndikSusilo4
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 

Último (20)

Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Azure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & ApplicationAzure Monitor & Application Insight to monitor Infrastructure & Application
Azure Monitor & Application Insight to monitor Infrastructure & Application
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 

Deploy OpenStack on your laptop with Vagrant and Ansible

  • 1. Vagrant, Ansible and OpenStack on your laptop Lorin Hochstein Nimbis Services Email: lorin@nimbisservices.com Twitter: lhochstein
  • 2. Setting up OpenStack for production is complex and error-prone 2012-08-04 12:31:56 INFO nova.rpc.common [-] Reconnecting to AMQP server on localhost:5672 2012-08-04 12:31:56 ERROR nova.rpc.common [-] AMQP server on localhost:5672 is unreachable: [Errno 111] ECONNREFUSED. Trying again in 30 seconds. 2012-08-04 12:31:56 TRACE nova.rpc.common Traceback (most recent call last): 2012-08-04 12:31:56 TRACE nova.rpc.common File "/usr/lib/python2.7/dist- packages/nova/rpc/impl_kombu.py", line 446, in reconnect 2012-08-04 12:31:56 TRACE nova.rpc.common self._connect() 2012-08-04 12:31:56 TRACE nova.rpc.common File "/usr/lib/python2.7/dist- packages/nova/rpc/impl_kombu.py", line 423, in _connect 2012-08-04 12:31:56 TRACE nova.rpc.common self.connection.connect() 2012-08-04 12:31:56 TRACE nova.rpc.common File "/usr/lib/python2.7/dist- packages/kombu/connection.py", line 154, in connect 2012-08-04 12:31:56 TRACE nova.rpc.common return self.connection 2012-08-04 12:31:56 TRACE nova.rpc.common File "/usr/lib/python2.7/dist- packages/kombu/connection.py", line 560, in connection 2012-08-04 12:31:56 TRACE nova.rpc.common self._connection = self._establish_connection() 2012-08-04 12:31:56 TRACE nova.rpc.common File "/usr/lib/python2.7/dist- packages/kombu/connection.py", line 521, in _establish_connection 2012-08-04 12:31:56 TRACE nova.rpc.common conn = self.transport.establish_connection() 2012-08-04 12:31:56 TRACE nova.rpc.common File "/usr/lib/python2.7/dist- packages/kombu/transport/pyamqplib.py", line 255, in establish_connection 2012-08-04 12:31:56 TRACE nova.rpc.common connect_timeout=conninfo.connect_timeout) 2012-08-04 12:31:56 TRACE nova.rpc.common File "/usr/lib/python2.7/dist- packages/kombu/transport/pyamqplib.py", line 52, in __init__ 2012-08-04 12:31:56 TRACE nova.rpc.common super(Connection, self).__init__(*args,
  • 3. You're looking for better ways to do deployment
  • 4. Shell scripts are painful, Puppet & Chef have steep learning curves if [[ $EUID -eq 0 ]]; then ROOTSLEEP=${ROOTSLEEP:-10} echo "You are running this script as root." echo "In $ROOTSLEEP seconds, we will create a user 'stack' and run as that user" sleep $ROOTSLEEP # since this script runs as a normal user, we need to give that user # ability to run sudo if [[ "$os_PACKAGE" = "deb" ]]; then dpkg -l sudo || apt_get update && install_package sudo else rpm -qa | grep sudo || install_package sudo fi if ! getent passwd stack >/dev/null; then echo "Creating a user called stack" useradd -U -s /bin/bash -d $DEST -m stack fi Source: devstack/stack.sh
  • 5. You want an easy way to write & debug deployment scripts
  • 6. Use Ansible to write OpenStack deployment scripts, Vagrant to test them inside of VMs
  • 7. Ansible big idea: very simple syntax, SSH for communication
  • 8. Example Ansible play: install ntp --- - hosts: controller tasks: - name: ensure ntp packages is installed action: apt pkg=ntp - name: ensure ntp.conf file is present action: copy src=files/ntp.conf dest=/etc/ntp.conf owner=root group=root mode=0644 - name: ensure ntp service is restarted action: service name=ntp state=restarted
  • 9. Specify hosts in an inventory file [controller] 192.168.206.130 [compute] 192.168.206.131 192.168.206.132 192.168.206.133 192.168.206.134
  • 10. Run the playbook $ ansible-playbook ntp.yaml PLAY [controller] ********************* GATHERING FACTS ********************* ok: [192.168.206.130] TASK: [ensure ntp packages is installed] ********************* ok: [192.168.206.130] TASK: [ensure ntp.conf file is present] ********************* ok: [192.168.206.130] TASK: [ensure ntp service is restarted] ********************* ok: [192.168.206.130] PLAY RECAP ********************* 192.168.206.130 : ok=4 changed=3 unreachable=0 failed=0
  • 11. What did Ansible just do? 1. Made SSH connections to remote host 2. Copied over Python modules and arguments parsed from playbook file 3. Executed modules on remote machine
  • 12. Can run a single action using ansible command $ ansible controller –m apt –a "pkg=ntp" 192.168.206.130 | success >> { "changed": false, "item": "", "module": "apt" }
  • 13. Ansible scripts are idempotent: can run multiple times safely $ ansible-playbook ntp.yaml PLAY [controller] ********************* GATHERING FACTS ********************* ok: [192.168.206.130] TASK: [ensure ntp packages is installed] ********************* ok: [192.168.206.130] TASK: [ensure ntp.conf file is present] ********************* ok: [192.168.206.130] TASK: [ensure ntp service is restarted] ********************* ok: [192.168.206.130] PLAY RECAP ********************* 192.168.206.130 : ok=4 changed=1 unreachable=0 failed=0
  • 14. Use handlers if action should only occur on a state change --- - hosts: controller tasks: - name: ensure glance database is present action: mysql_db name=glance notify: - version glance database handlers: - name: version glance database action: command glance-manage version_control 0
  • 15. Use templates to substitute variables in config file keystone.conf: [DEFAULT] public_port = 5000 admin_port = 35357 admin_token = {{ admin_token }} keystone.yaml: hosts: controller vars: admin_token: 012345SECRET99TOKEN012345 tasks: - name: ensure keystone config script is present action: template src=keystone.conf dest=/etc/keystone/ keystone.conf owner=root group=root mode=0644
  • 16. Ansible supports multiple modules, can also do arbitrary shell commands • apt & yum packages • Stop/start/restart services • users & groups • Add SSH public keys • MySQL & PostgreSQL users & databases • VMs managed by libvirt • Git checkouts
  • 17. Vagrant big idea: redistributable VMs, run with config files & commands
  • 18. Import a new virtual machine (Ubuntu 12.04 64-bit) $ vagrant box add precise64 http://files.vagrantup.com/ precise64.box
  • 19. Make a Vagrantfile Vagrant::Config.run do |config| config.vm.box = "precise64" end Vagrant can also generate this for you: “vagrant init precise64”
  • 20. Boot it and connect to it $ vagrant up [default] Importing base box 'precise64'... [default] Matching MAC address for NAT networking... [default] Clearing any previously set forwarded ports... [default] Fixed port collision for 22 => 2222. Now on port 2200. [default] Forwarding ports... [default] -- 22 => 2200 (adapter 1) [default] Creating shared folders metadata... [default] Clearing any previously set network interfaces... [default] Booting VM... [default] Waiting for VM to boot. This can take a few minutes. [default] VM booted and ready for use! [default] Mounting shared folders... [default] -- v-root: /vagrant $ vagrant ssh Welcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64) * Documentation: https://help.ubuntu.com/ Welcome to your Vagrant-built virtual machine. Last login: Thu Jun 7 00:49:30 2012 from 10.0.2.2 vagrant@precise64:~$
  • 21. Boot multi-VMs: configure IPs, memory, hostname Vagrant::Config.run do |config| config.vm.box = "precise64” config.vm.define :controller do |controller_config| controller_config.vm.network :hostonly, "192.168.206.130" controller_config.vm.host_name = "controller" end config.vm.define :compute1 do |compute1_config| compute1_config.vm.network :hostonly, "192.168.206.131" compute1_config.vm.host_name = "compute1" compute1_config.vm.customize ["modifyvm", :id, "--memory", 1024] end end
  • 22. Openstack-ansible: Ansible scripts for OpenStack Compute Links to OpenStack Install & Deploy Guide
  • 23. Config: controller, one compute host, QEMU, FlatDHCP controller compute1 .130 .131 eth1 eth1 192.168.206.* .130 .131 eth2 eth2 eth0 192.168.100.* eth0 NAT NAT
  • 24. Vagrantfile describes this setup Vagrant::Config.run do |config| config.vm.box = "precise64" config.vm.define :controller do |controller_config| controller_config.vm.network :hostonly, "192.168.206.130” controller_config.vm.host_name = "controller" end config.vm.define :compute1 do |compute1_config| compute1_config.vm.network :hostonly, "192.168.206.131” compute1_config.vm.host_name = "compute1" compute1_config.vm.customize ["modifyvm", :id, "--memory", 1024] compute1_config.vm.customize ["modifyvm", :id, "-- nicpromisc3", "allow-all"] end end
  • 25. If all goes well… $ make all . . . -------------------------------------+--------------------------------------+ | Property | Value | +-------------------------------------+--------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-SRV-ATTR:host | None | | OS-EXT-SRV-ATTR:hypervisor_hostname | None | | OS-EXT-SRV-ATTR:instance_name | instance-00000001 | | OS-EXT-STS:power_state | 0 | | OS-EXT-STS:task_state | scheduling | | OS-EXT-STS:vm_state | building | | accessIPv4 | | | accessIPv6 | | | adminPass | CJ8NNNa4dc6f | | config_drive | | | created | 2012-08-09T02:51:14Z | | flavor | m1.tiny | | hostId | | | id | 8e9238b8-208d-46a8-8f66-c40660abacff | | image | cirros-0.3.0-x86_64 | | key_name | mykey | | metadata | {} | | name | cirros |
  • 26. Links • Vagrantfile & Ansible playbooks for OpenStack: http://github.com/lorin/openstack-ansible • Ansible: http://ansible.github.com • Vagrant: http://vagrantup.com • Ansible playbook examples: https://github.com/ansible/ansible/tree/devel/examples /playbooks • Vagrant boxes: http://vagrantbox.es
  • 27. Image sources • http://vagrantup.com • http://ansible.github.com • http://openstack.org • http://en.wikipedia.org/wiki/File:Rack001.jpg • http://en.wikipedia.org/wiki/File:Easy_button.JPG • http://hezik.nl/enable-ssh-server-on-backtrack-5-r2/

Notas do Editor

  1. Ansible scripts are called playbooks, that are organized into individual plays.Ansible plays are collection of tasks. You also need to specify which hosts you’re running on.This play has three tasks: - Install the NTP package - Copy over a local ntp.conf file - Restart the ntp service
  2. By default, ansible will look in /etc/ansible/hosts for the inventory file, you can override this to specify a different location.
  3. The items that appear in green did not change state. With a real ansible run, yellow ones would change state.
  4. Ansible scripts are called playbooks, that are organized into individual plays.Ansible plays are collection of tasks. You also need to specify which hosts you’re running on.This play has three tasks: - Install the NTP package - Copy over a local ntp.conf file - Restart the ntp service
  5. Arbitrary shell commands are not idempotent, of course
  6. This will download a “box”, a preconfigured
  7. This is a bare-bones config file