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| Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "utopic" config.vm.box = "thoughtbot/debian-jessie-64"
config.vm.provider "virtualbox" do |v| config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--memory", 2048] v.customize ["modifyvm", :id, "--memory", 2048]

View File

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

View File

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

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?