veewee 0.3.0.alpha2 → 0.3.0.alpha3
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/veewee/builder/virtualbox/helper/export_vagrant.rb +1 -1
- data/lib/veewee/command/kvm.rb +7 -7
- data/lib/veewee/command/vagrant.rb +53 -53
- data/lib/veewee/command/vmfusion.rb +4 -4
- data/lib/veewee/config.rb +1 -1
- data/lib/veewee/version.rb +1 -1
- data/templates/ubuntu-10.04.3-server-amd64/vagrant.sh +1 -1
- data/templates/ubuntu-10.10-server-amd64/vagrant.sh +1 -1
- metadata +3 -3
data/Gemfile.lock
CHANGED
data/lib/veewee/command/kvm.rb
CHANGED
@@ -38,12 +38,12 @@ module Veewee
|
|
38
38
|
desc "undefine [BOXNAME]", "Removes the definition of a basebox "
|
39
39
|
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
40
40
|
def undefine(definition_name)
|
41
|
-
|
41
|
+
env.ui.info "Removing definition #{definition_name}"
|
42
42
|
begin
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
43
|
+
venv=Veewee::Environment.new(options)
|
44
|
+
venv.ui=env.ui
|
45
|
+
venv.undefine(definition_name,options)
|
46
|
+
venv.info "Definition #{definition_name} succesfully removed"
|
47
47
|
rescue Error => ex
|
48
48
|
env.ui.error "#{ex}"
|
49
49
|
exit -1
|
@@ -51,13 +51,13 @@ module Veewee
|
|
51
51
|
end
|
52
52
|
|
53
53
|
desc "ostypes", "List the available Operating System types"
|
54
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
54
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
55
55
|
def ostypes
|
56
56
|
venv=Veewee::Environment.new(options)
|
57
57
|
venv.ui=env.ui
|
58
58
|
venv.list_ostypes
|
59
59
|
end
|
60
|
-
|
60
|
+
|
61
61
|
desc "templates", "List the currently available templates"
|
62
62
|
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
63
63
|
def templates
|
@@ -3,106 +3,106 @@ require 'veewee'
|
|
3
3
|
module Veewee
|
4
4
|
module Vagrant
|
5
5
|
class Command < ::Vagrant::Command::GroupBase
|
6
|
-
|
6
|
+
|
7
7
|
register "basebox", "Commands to manage baseboxes"
|
8
8
|
desc "build [TEMPLATE_NAME] [BOX_NAME]", "Build box"
|
9
9
|
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the build"
|
10
10
|
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
11
11
|
method_option :nogui,:type => :boolean , :default => false, :aliases => "-n", :desc => "no gui"
|
12
|
-
method_option :auto,:type => :boolean , :default => false, :aliases => "-a", :desc => "auto answers"
|
12
|
+
method_option :auto,:type => :boolean , :default => false, :aliases => "-a", :desc => "auto answers"
|
13
13
|
method_option :postinstall_include, :type => :array, :default => [], :aliases => "-i", :desc => "patterns of postinstall filenames to additionally include"
|
14
14
|
method_option :postinstall_exclude, :type => :array, :default => [], :aliases => "-e", :desc => "patterns of postinstall filenames to exclude"
|
15
15
|
def build(definition_name,box_name=nil)
|
16
16
|
venv=Veewee::Environment.new(options)
|
17
|
-
venv.ui=
|
17
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
18
18
|
venv.config.builders["virtualbox"].build(definition_name,box_name,options)
|
19
19
|
end
|
20
|
-
|
20
|
+
|
21
21
|
desc "destroy [BOXNAME]", "Destroys the virtualmachine that was build"
|
22
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
22
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
23
23
|
def destroy(box_name)
|
24
24
|
venv=Veewee::Environment.new(options)
|
25
|
-
venv.ui=
|
25
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
26
26
|
venv.config.builders["virtualbox"].get_box(box_name).destroy
|
27
|
-
end
|
27
|
+
end
|
28
28
|
|
29
29
|
desc "define [BOXNAME] [TEMPLATE]", "Define a new basebox starting from a template"
|
30
|
-
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "overwrite the definition"
|
31
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
30
|
+
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "overwrite the definition"
|
31
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
32
32
|
def define(definition_name, template_name)
|
33
33
|
venv=Veewee::Environment.new(options)
|
34
|
-
venv.ui=
|
35
|
-
|
34
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
35
|
+
|
36
36
|
venv.define(definition_name,template_name,options)
|
37
|
-
|
38
|
-
|
39
|
-
|
37
|
+
venv.ui.info "The basebox '#{definition_name}' has been succesfully created from the template '#{template_name}'"
|
38
|
+
venv.ui.info "You can now edit the definition files stored in definitions/#{definition_name} or build the box with:"
|
39
|
+
venv.ui.info "vagrant basebox build '#{definition_name}'"
|
40
40
|
end
|
41
41
|
|
42
42
|
desc "undefine [BOXNAME]", "Removes the definition of a basebox "
|
43
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
43
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
44
44
|
def undefine(definition_name)
|
45
|
-
|
45
|
+
venv=Veewee::Environment.new(options)
|
46
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
46
47
|
begin
|
47
|
-
venv
|
48
|
-
venv.ui=env.ui
|
48
|
+
venv.ui.info "Removing definition #{definition_name}"
|
49
49
|
venv.undefine(definition_name,options)
|
50
|
-
|
50
|
+
venv.ui.info "Definition #{definition_name} succesfully removed"
|
51
51
|
rescue Error => ex
|
52
|
-
|
52
|
+
venv.ui.error"#{ex}"
|
53
53
|
exit -1
|
54
54
|
end
|
55
|
-
end
|
56
|
-
|
55
|
+
end
|
56
|
+
|
57
57
|
desc "templates", "List the currently available templates"
|
58
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
58
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
59
59
|
def templates
|
60
|
-
env.ui.info "The following templates are available:"
|
61
60
|
venv=Veewee::Environment.new(options)
|
62
|
-
venv.ui=
|
63
|
-
|
61
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
62
|
+
venv.ui.info "The following templates are available:"
|
63
|
+
|
64
64
|
venv.get_template_paths.keys.each do |name|
|
65
|
-
|
66
|
-
end
|
65
|
+
venv.ui.info "vagrant basebox define '<box_name>' '#{name}'"
|
66
|
+
end
|
67
67
|
end
|
68
68
|
|
69
69
|
desc "list", "Lists all defined boxes"
|
70
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
70
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
71
71
|
def list
|
72
|
-
env.ui.info "The following local definitions are available:"
|
73
72
|
venv=Veewee::Environment.new(options)
|
74
|
-
venv.ui=
|
75
|
-
|
73
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
74
|
+
venv.ui.info "The following local definitions are available:"
|
75
|
+
|
76
76
|
venv.get_definition_paths.keys.each do |name|
|
77
|
-
|
77
|
+
venv.ui.info "- #{name}"
|
78
78
|
end
|
79
|
-
end
|
79
|
+
end
|
80
80
|
|
81
81
|
desc "ostypes", "List the available Operating System types"
|
82
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
82
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
83
83
|
def ostypes
|
84
84
|
venv=Veewee::Environment.new(options)
|
85
|
-
venv.ui=
|
85
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
86
86
|
venv.list_ostypes
|
87
87
|
end
|
88
|
-
|
89
|
-
desc "validate [NAME]", "Validates a box against vagrant compliancy rules"
|
90
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
91
|
-
def validate(box_name)
|
92
|
-
venv=Veewee::Environment.new(options)
|
93
|
-
venv.ui=env.ui
|
94
|
-
|
95
|
-
venv.config.builders["virtualbox"].validate_vagrant(box_name,options)
|
96
|
-
end
|
97
88
|
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
89
|
+
desc "validate [NAME]", "Validates a box against vagrant compliancy rules"
|
90
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
91
|
+
def validate(box_name)
|
92
|
+
venv=Veewee::Environment.new(options)
|
93
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
94
|
+
|
95
|
+
venv.config.builders["virtualbox"].validate_vagrant(box_name,options)
|
96
|
+
end
|
97
|
+
|
98
|
+
desc "export [NAME]", "Exports the basebox to the vagrant box format"
|
99
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
100
|
+
def export(box_name)
|
101
|
+
venv=Veewee::Environment.new(options)
|
102
|
+
venv.ui = ::Veewee::UI::Shell.new(venv, shell)
|
103
|
+
venv.config.builders["virtualbox"].export_vagrant(box_name,options)
|
104
|
+
end
|
105
105
|
|
106
106
|
end
|
107
|
-
end
|
107
|
+
end
|
108
108
|
end
|
@@ -7,14 +7,14 @@ module Veewee
|
|
7
7
|
method_option :force,:type => :boolean , :default => false, :aliases => "-f", :desc => "force the build"
|
8
8
|
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
9
9
|
method_option :nogui,:type => :boolean , :default => false, :aliases => "-n", :desc => "no gui"
|
10
|
-
method_option :auto,:type => :boolean , :default => false, :aliases => "-a", :desc => "auto answers"
|
10
|
+
method_option :auto,:type => :boolean , :default => false, :aliases => "-a", :desc => "auto answers"
|
11
11
|
method_option :postinstall_include, :type => :array, :default => [], :aliases => "-i", :desc => "patterns of postinstall filenames to additionally include"
|
12
12
|
method_option :postinstall_exclude, :type => :array, :default => [], :aliases => "-e", :desc => "patterns of postinstall filenames to exclude"
|
13
13
|
|
14
14
|
def build(definition_name,box_name=nil)
|
15
15
|
venv=Veewee::Environment.new(options)
|
16
16
|
venv.ui=env.ui
|
17
|
-
venv.config.builders["vmfusion"].build(definition_name,box_name,options)
|
17
|
+
venv.config.builders["vmfusion"].build(definition_name,box_name,options)
|
18
18
|
|
19
19
|
# venv.ui.info "#{box_name} was build succesfully. "
|
20
20
|
# venv.ui.info ""
|
@@ -59,7 +59,7 @@ module Veewee
|
|
59
59
|
end
|
60
60
|
|
61
61
|
desc "validate [NAME]", "Validates a box against vmfusion compliancy rules"
|
62
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
62
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
63
63
|
def validate(box_name)
|
64
64
|
venv=Veewee::Environment.new(options)
|
65
65
|
venv.ui=env.ui
|
@@ -68,7 +68,7 @@ module Veewee
|
|
68
68
|
|
69
69
|
|
70
70
|
desc "ostypes", "List the available Operating System types"
|
71
|
-
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
71
|
+
method_option :debug,:type => :boolean , :default => false, :aliases => "-d", :desc => "enable debugging"
|
72
72
|
def ostypes
|
73
73
|
venv=Veewee::Environment.new(options)
|
74
74
|
venv.ui=env.ui
|
data/lib/veewee/config.rb
CHANGED
@@ -30,7 +30,7 @@ module Veewee
|
|
30
30
|
yamlfile=File.join(File.dirname(__FILE__),"config","ostypes.yml")
|
31
31
|
env.logger.info "Reading ostype yamlfile #{yamlfile}"
|
32
32
|
@ostypes=YAML.load_file(yamlfile)
|
33
|
-
|
33
|
+
|
34
34
|
# Initialize with defaults
|
35
35
|
@veewee=::Veewee::Config::Veewee.new(self)
|
36
36
|
|
data/lib/veewee/version.rb
CHANGED
@@ -6,7 +6,7 @@ date > /etc/vagrant_box_build_time
|
|
6
6
|
|
7
7
|
# Create the user vagrant with password vagrant
|
8
8
|
|
9
|
-
useradd -G admin -p $(perl -e'print crypt("vagrant", "vagrant")') -m -N vagrant
|
9
|
+
useradd -G admin -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant
|
10
10
|
|
11
11
|
# Installing vagrant keys
|
12
12
|
mkdir /home/vagrant/.ssh
|
@@ -6,7 +6,7 @@ date > /etc/vagrant_box_build_time
|
|
6
6
|
|
7
7
|
# Create the user vagrant with password vagrant
|
8
8
|
|
9
|
-
useradd -G admin -p $(perl -e'print crypt("vagrant", "vagrant")') -m -N vagrant
|
9
|
+
useradd -G admin -p $(perl -e'print crypt("vagrant", "vagrant")') -m -s /bin/bash -N vagrant
|
10
10
|
|
11
11
|
# Installing vagrant keys
|
12
12
|
mkdir /home/vagrant/.ssh
|
metadata
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: veewee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: -
|
4
|
+
hash: -3702664342
|
5
5
|
prerelease: 6
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
9
|
- 0
|
10
10
|
- alpha
|
11
|
-
-
|
12
|
-
version: 0.3.0.
|
11
|
+
- 3
|
12
|
+
version: 0.3.0.alpha3
|
13
13
|
platform: ruby
|
14
14
|
authors:
|
15
15
|
- Patrick Debois
|