Merge pull request #3 from xarses/vagrant

Change Vagrantfile to use debian jessie
This commit is contained in:
Evgeniy L 2015-04-01 13:56:20 -07:00
commit e13b3249f9
5 changed files with 23 additions and 52 deletions

2
Vagrantfile vendored
View File

@ -6,7 +6,7 @@ VAGRANTFILE_API_VERSION = "2"
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "utopic"
config.vm.box = "thoughtbot/debian-jessie-64"
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", 2048]

View File

@ -6,14 +6,6 @@
- shell: docker --version
ignore_errors: true
register: docker_version
- shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh
when: docker_version|failed
- shell: docker pull ubuntu
- shell: apt-get install -y python-pip
- shell: pip install -y {{item}}
with_items:
- keystoneclient
- novaclient
- glanceclient
- include: compose.yml
- include: openstack.yml
- shell: curl -sSL https://get.docker.com/ | sudo sh
when: docker_version | failed
- shell: docker pull debian:jessie

View File

@ -5,30 +5,23 @@
id: docker
type: resource
handler: playbook
handler: ansible
version: v1
run:
# all of this should be moved to regular ansible playbook
# we need to reuse as much as possible of ansible goodness
- shell: docker --version
ignore_errors: true
register: docker_version
- shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh
when: docker_version|failed
- shell: docker pull ubuntu
- shell: apt-get install -y python-pip
- shell: pip install -y {{item}}
with_items: docker.openstack_clients
- shell: docker-compose --version
register: compose
ignore_errors: true
- shell: curl -L https://github.com/docker/compose/releases/download/1.1.0/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
when: compose|failed
- shell: chmod +x /usr/local/bin/docker-compose
parameters:
openstack_clients:
default:
- keystoneclient
- novaclient
- glanceclient
required: true
actions:
run:
- hosts: [docker]
sudo: yes
tasks:
# all of this should be moved to regular ansible playbook
# we need to reuse as much as possible of ansible goodness
- shell: docker --version
ignore_errors: true
register: docker_version
- shell: curl -sSL https://get.docker.com/ubuntu/ | sudo sh
when: docker_version|failed
- shell: docker pull debian:jessie
remove:
- hosts: [docker]
sudo: yes
tasks:
- shell: apt-get remove -y docker

View File

@ -1,14 +0,0 @@
class BaseService(object):
def __init__(self, resources, hosts='all'):
self.hosts = hosts
self.resources = resources
def run(self):
for resource in self.resources:
yield resource.run()
# how service should be different from resources, apart from providing
# additional data?