bignou 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (8) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +18 -0
  3. data/Gemfile +4 -0
  4. data/Gemfile.lock +10 -0
  5. data/LICENSE +20 -0
  6. data/README.md +4 -0
  7. data/bin/bignou +35 -0
  8. metadata +64 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: bf45b243e8a2911fe655f7376a97bfb64ae76dc1
4
+ data.tar.gz: f1ae1d46e79964dd66252d34e5d57cd8aaed11e9
5
+ SHA512:
6
+ metadata.gz: 8c1a88c6c39c014351ebbe4ca7420b6950e11b78cf29862909ad736de8d04b9e11576bed156e72aae01c7594f89f866db79bd8f79b6663eec648a13b7c8ad08c
7
+ data.tar.gz: 2b04284fb77c7b37e933b643bfdfd1567ff12b8068810c0b1e301106c0da3275d4cb9820954b314051635d862d5e906cf9c0e79ce4384c0a5dfd1ba20ee3ffbd
@@ -0,0 +1,18 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ coverage
6
+ InstalledFiles
7
+ lib/bundler/man
8
+ pkg
9
+ rdoc
10
+ spec/reports
11
+ test/tmp
12
+ test/version_tmp
13
+ tmp
14
+
15
+ # YARD artifacts
16
+ .yardoc
17
+ _yardoc
18
+ doc/
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ gem "boson"
4
+
@@ -0,0 +1,10 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ boson (1.2.4)
5
+
6
+ PLATFORMS
7
+ ruby
8
+
9
+ DEPENDENCIES
10
+ boson
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2013 Victor Goya
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,4 @@
1
+ bignou
2
+ ======
3
+
4
+ Manage VM with LXC and AUFS
@@ -0,0 +1,35 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'boson/runner'
4
+ require 'pathname'
5
+
6
+ class BignouRunner < Boson::Runner
7
+
8
+ LXC_ROOT = "/var/lib/lxc"
9
+
10
+ def initialize
11
+ cmd "mkdir -p '#{root}' '#{aufs_root}'"
12
+ end
13
+
14
+ desc "Create virtual machine name from base"
15
+ def create(base, name)
16
+ cmd "mount -t aufs -o br=#{aufs_root.join(name)}:#{root.join(base)} none #{root.join(name)}"
17
+ cmd "#{ENV['EDITOR'] || 'nano'} #{root.join(name, 'config')}"
18
+ end
19
+
20
+ private
21
+ def root
22
+ Pathname.new LXC_ROOT
23
+ end
24
+
25
+ def aufs_root
26
+ root.join ".aufs"
27
+ end
28
+
29
+ def cmd(command)
30
+ puts command
31
+ system command
32
+ end
33
+ end
34
+
35
+ BignouRunner.start
metadata ADDED
@@ -0,0 +1,64 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: bignou
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Victor Goya
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2013-12-09 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: boson
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Manage VM with LXC and AUFS
28
+ email: goya.victor@gmail.com
29
+ executables:
30
+ - bignou
31
+ extensions: []
32
+ extra_rdoc_files: []
33
+ files:
34
+ - .gitignore
35
+ - Gemfile
36
+ - Gemfile.lock
37
+ - LICENSE
38
+ - README.md
39
+ - bin/bignou
40
+ homepage: https://github.com/phorque/bignou
41
+ licenses:
42
+ - MIT
43
+ metadata: {}
44
+ post_install_message:
45
+ rdoc_options: []
46
+ require_paths:
47
+ - lib
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ requirements:
55
+ - - '>='
56
+ - !ruby/object:Gem::Version
57
+ version: '0'
58
+ requirements: []
59
+ rubyforge_project:
60
+ rubygems_version: 2.0.0
61
+ signing_key:
62
+ specification_version: 4
63
+ summary: Bignou
64
+ test_files: []