vocker 0.1.0 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 834fa1d18bf8e23e1faa503aa702833f1bcd4b31
4
- data.tar.gz: bb7ab7702c172a3288187936928e449a35f0e22a
3
+ metadata.gz: 315ab3e764686000c69f9d0cb24bf5893fddad0f
4
+ data.tar.gz: 402042dff0ed768ace0fc49032ed043e666e8393
5
5
  SHA512:
6
- metadata.gz: 7ff4f1feb914ce2a7c664a4773b7459adcdbb5b0a5db8b7758542a3f63281344c1358d2c99c2e1bea44fc525a19edee2d63c23826e4dc474ba8d5179900aed74
7
- data.tar.gz: 1016810d2ea2364b09b245bfc2ac260fb3ca705b01a82b7ed9792b29834bca931398b47fc6adf4f041bf34ee79a25425284a5cde3e19fc3a4ace90bfd2b38b5f
6
+ metadata.gz: c7136d70584226624f2b1e90748807dbee4a8af868d215b7afb3d04ba6ea7d35192c709a595b277d080c8848f380234eec872908db99e510fc6a2126200b1e42
7
+ data.tar.gz: 42723e0cae99b1ae6026fd357d106a95ce8a1985fea5b950ed62bee437693cd580549ddb542910013a08bb418efa4cb3687be1ac2a2fafce09cd2527628264ca
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ matrix:
6
+ allow_failures:
7
+ - rvm: 2.0.0
data/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ ## [0.2.0](https://github.com/fgrehm/vocker/compare/v0.1.0...master) (unreleased)
2
+
3
+ - Update installer for Docker 0.6 [GH-1]
4
+
5
+ ## 0.1.0 (August 15, 2013)
6
+
7
+ - Initial public release.
data/Gemfile.lock CHANGED
@@ -13,7 +13,7 @@ GIT
13
13
  PATH
14
14
  remote: .
15
15
  specs:
16
- vocker (0.1.0)
16
+ vocker (0.2.0)
17
17
 
18
18
  GEM
19
19
  remote: https://rubygems.org/
@@ -10,7 +10,6 @@ Vagrant.require_plugin 'vocker'
10
10
  Vagrant.configure("2") do |config|
11
11
  config.vm.box = "raring64"
12
12
  config.vm.synced_folder "../", "/vagrant", id: 'vagrant-root'#, nfs: true
13
- config.vm.synced_folder "~/projetos/oss/ventriloquist", "/home/vagrant/ventriloquist"
14
13
  config.vm.network :private_network, ip: "192.168.123.123"
15
14
 
16
15
  config.cache.auto_detect = true
@@ -4,15 +4,15 @@ module VagrantPlugins
4
4
  module Debian
5
5
  module DockerInstall
6
6
  def self.docker_install(machine)
7
- # Inspired on https://github.com/progrium/dokku/blob/master/Makefile#L33-L40
8
7
  machine.communicate.tap do |comm|
9
- # TODO: Try to not depend on installing software-properties-common
10
- comm.sudo("apt-get install -y -q software-properties-common")
11
- comm.sudo("apt-add-repository -y ppa:dotcloud/lxc-docker")
8
+ # TODO: Perform check on the host machine if aufs is installed and using LXC
9
+ if machine.provider_name != :lxc
10
+ comm.sudo("lsmod | grep aufs || modprobe aufs || apt-get install -y linux-image-extra-`uname -r`")
11
+ end
12
+ comm.sudo("curl http://get.docker.io/gpg | apt-key add -")
13
+ comm.sudo("echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list")
12
14
  comm.sudo("apt-get update")
13
15
  comm.sudo("apt-get install -y -q xz-utils lxc-docker -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold'")
14
- # TODO: Error out if provider is lxc
15
- # comm.sudo("lsmod | grep aufs || modprobe aufs || apt-get install -y linux-image-extra-`uname -r`")
16
16
  end
17
17
  end
18
18
  end
@@ -24,14 +24,20 @@ module VagrantPlugins
24
24
  cids_dir = "/var/lib/vocker/cids"
25
25
  config[:cidfile] ||= "#{cids_dir}/#{Digest::SHA1.hexdigest name}"
26
26
 
27
- id = "$(cat #{config[:cidfile]})"
28
-
29
27
  @machine.communicate.sudo("mkdir -p #{cids_dir}")
30
- if container_exist?(id)
31
- start_container(id)
32
- else
33
- create_container(config)
34
- end
28
+ run_container(config)
29
+ end
30
+ end
31
+
32
+ def run_container(config)
33
+ raise "Container's cidfile was not provided!" unless config[:cidfile]
34
+
35
+ id = "$(cat #{config[:cidfile]})"
36
+
37
+ if container_exist?(id)
38
+ start_container(id)
39
+ else
40
+ create_container(config)
35
41
  end
36
42
  end
37
43
 
@@ -14,7 +14,7 @@ module VagrantPlugins
14
14
  end
15
15
 
16
16
  def provision
17
- @logger = Log4r::Logger.new("vagrant::plugins::docker-provisioner")
17
+ @logger = Log4r::Logger.new("vagrant::provisioners::vocker")
18
18
 
19
19
  @logger.info("Checking for Docker installation...")
20
20
  @installer.ensure_installed
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Vocker
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -32,7 +32,7 @@ describe VagrantPlugins::Vocker::DockerClient do
32
32
 
33
33
  it 'ensures container ids folder exists' do
34
34
  subject.run containers
35
- expect(communicator).to have_received.sudo(with{|cmd| cmd == 'mkdir -p /var/lib/vocker/cids'})
35
+ expect(communicator).to have_received.sudo('mkdir -p /var/lib/vocker/cids')
36
36
  end
37
37
 
38
38
  it 'automatically assigns a digest of the command as the cidfile if not specified' do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Rehm
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-15 00:00:00.000000000 Z
11
+ date: 2013-09-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -47,6 +47,8 @@ extra_rdoc_files: []
47
47
  files:
48
48
  - .gitignore
49
49
  - .rspec
50
+ - .travis.yml
51
+ - CHANGELOG.md
50
52
  - Gemfile
51
53
  - Gemfile.lock
52
54
  - Guardfile