coral_vagrant 0.2.2 → 0.2.3
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.
- data/VERSION +1 -1
- data/coral_vagrant.gemspec +3 -2
- data/{Vagrantfile → example/Vagrantfile} +4 -4
- data/example/cloud.json +50 -0
- data/lib/plugin.rb +15 -2
- metadata +19 -18
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.3
|
data/coral_vagrant.gemspec
CHANGED
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "coral_vagrant"
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.3"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Adrian Webb"]
|
@@ -25,9 +25,10 @@ Gem::Specification.new do |s|
|
|
25
25
|
"README.rdoc",
|
26
26
|
"Rakefile",
|
27
27
|
"VERSION",
|
28
|
-
"Vagrantfile",
|
29
28
|
"bin/coral",
|
30
29
|
"coral_vagrant.gemspec",
|
30
|
+
"example/Vagrantfile",
|
31
|
+
"example/cloud.json",
|
31
32
|
"lib/coral_vagrant.rb",
|
32
33
|
"lib/coral_vagrant/commands/coral/add.rb",
|
33
34
|
"lib/coral_vagrant/commands/coral/config.rb",
|
@@ -10,7 +10,7 @@
|
|
10
10
|
|
11
11
|
require 'coral_vagrant'
|
12
12
|
|
13
|
-
Vagrant
|
13
|
+
Vagrant.configure("2") do |config|
|
14
14
|
|
15
15
|
#-----------------------------------------------------------------------------
|
16
16
|
# Server definitions (managed by ./config/cloud.json)
|
@@ -22,11 +22,11 @@ Vagrant::Config.run do |config|
|
|
22
22
|
# Basic server settings
|
23
23
|
machine.vm.host_name = server.hostname
|
24
24
|
|
25
|
-
machine.vm.box = cloud.
|
26
|
-
machine.vm.box_url = cloud.
|
25
|
+
machine.vm.box = cloud.search(server_name, 'vm_box')
|
26
|
+
machine.vm.box_url = cloud.search(server_name, 'vm_box_url')
|
27
27
|
|
28
28
|
# Network interfaces
|
29
|
-
if cloud.
|
29
|
+
if cloud.search(server_name, 'vm_network_bridged', false, :test)
|
30
30
|
machine.vm.network :bridged
|
31
31
|
else
|
32
32
|
machine.vm.network :hostonly, server.public_ip
|
data/example/cloud.json
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
{
|
2
|
+
"repositories" : {
|
3
|
+
"." : "cluster.git"
|
4
|
+
},
|
5
|
+
"puppet_manifest_path" : "puppet",
|
6
|
+
"puppet_manifest_file" : "site.pp",
|
7
|
+
"puppet_module_path" : [ "modules" ],
|
8
|
+
"settings" : {
|
9
|
+
"core" : {
|
10
|
+
"virtual_ip" : "172.4.4.4",
|
11
|
+
"virtual_hostname" : "base.loc"
|
12
|
+
},
|
13
|
+
"vagrant" : {
|
14
|
+
"vm_network_bridged" : "false",
|
15
|
+
"vm_box" : "precise64",
|
16
|
+
"vm_box_url" : "http://files.vagrantup.com/precise64.box",
|
17
|
+
"vm_cpus" : "1",
|
18
|
+
"vm_memory" : "512",
|
19
|
+
"facts" : {
|
20
|
+
"server_location" : "vagrant",
|
21
|
+
"server_environment" : "development"
|
22
|
+
},
|
23
|
+
"shares" : [ "puppet_reports", "puppet_graphs", "coral_properties" ]
|
24
|
+
},
|
25
|
+
"debug" : {
|
26
|
+
"puppet_options" : [ "--debug", "--verbose" ]
|
27
|
+
}
|
28
|
+
},
|
29
|
+
"shares" : {
|
30
|
+
"puppet_reports" : {
|
31
|
+
"local_dir" : "share/log/puppet",
|
32
|
+
"remote_dir" : "/var/log/puppet/reports"
|
33
|
+
},
|
34
|
+
"puppet_graphs" : {
|
35
|
+
"local_dir" : "share/log/puppet/graphs",
|
36
|
+
"remote_dir" : "/var/lib/puppet/state/graphs"
|
37
|
+
},
|
38
|
+
"coral_properties" : {
|
39
|
+
"local_dir" : "share/log/coral",
|
40
|
+
"remote_dir" : "/var/log/coral"
|
41
|
+
}
|
42
|
+
},
|
43
|
+
"servers" : {
|
44
|
+
"core" : {
|
45
|
+
"hostname" : "server.loc",
|
46
|
+
"public_ip" : "172.0.0.10",
|
47
|
+
"settings" : [ "core", "vagrant" ]
|
48
|
+
}
|
49
|
+
}
|
50
|
+
}
|
data/lib/plugin.rb
CHANGED
@@ -1,11 +1,24 @@
|
|
1
|
+
|
2
|
+
begin
|
3
|
+
require "vagrant"
|
4
|
+
rescue LoadError
|
5
|
+
raise "The Vagrant Coral plugin must be run within Vagrant."
|
6
|
+
end
|
7
|
+
|
8
|
+
# This is a sanity check to make sure no one is attempting to install
|
9
|
+
# this into an early Vagrant version.
|
10
|
+
if Vagrant::VERSION < "1.2.0"
|
11
|
+
raise "The Vagrant Coral plugin is only compatible with Vagrant 1.2+"
|
12
|
+
end
|
13
|
+
|
1
14
|
module VagrantPlugins
|
2
15
|
module Coral
|
3
|
-
class Plugin < Vagrant.plugin('2')
|
16
|
+
class Plugin < ::Vagrant.plugin('2')
|
4
17
|
name 'coral plugins'
|
5
18
|
description 'The `coral` plugin provides an easy way to manage and sync coral clusters locally and on the cloud from within Vagrant.'
|
6
19
|
|
7
20
|
command('coral') do
|
8
|
-
Coral::Vagrant::Command::CoralBase
|
21
|
+
::Coral::Vagrant::Command::CoralBase
|
9
22
|
end
|
10
23
|
end
|
11
24
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coral_vagrant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-05-24 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: coral_plan
|
16
|
-
requirement: &
|
16
|
+
requirement: &9896120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0.1'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *9896120
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: coral_cloud
|
27
|
-
requirement: &
|
27
|
+
requirement: &9895060 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0.1'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *9895060
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: bundler
|
38
|
-
requirement: &
|
38
|
+
requirement: &9893900 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '1.2'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *9893900
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: jeweler
|
49
|
-
requirement: &
|
49
|
+
requirement: &9892940 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '1.8'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *9892940
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: rspec
|
60
|
-
requirement: &
|
60
|
+
requirement: &9892220 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '2.10'
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *9892220
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rdoc
|
71
|
-
requirement: &
|
71
|
+
requirement: &9891680 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '3.12'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *9891680
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: yard
|
82
|
-
requirement: &
|
82
|
+
requirement: &9891020 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0.8'
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *9891020
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: vagrant
|
93
|
-
requirement: &
|
93
|
+
requirement: &9890460 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,7 +98,7 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *9890460
|
102
102
|
description: ! "= coral_vagrant\n\nThis library contains various commands and exposes
|
103
103
|
a data model to Vagrant\nthat allows for tightly integrated management of Virtual
|
104
104
|
machines that are\nlinked to remote servers. \n\nThis also allows for custom execution
|
@@ -129,9 +129,10 @@ files:
|
|
129
129
|
- README.rdoc
|
130
130
|
- Rakefile
|
131
131
|
- VERSION
|
132
|
-
- Vagrantfile
|
133
132
|
- bin/coral
|
134
133
|
- coral_vagrant.gemspec
|
134
|
+
- example/Vagrantfile
|
135
|
+
- example/cloud.json
|
135
136
|
- lib/coral_vagrant.rb
|
136
137
|
- lib/coral_vagrant/commands/coral/add.rb
|
137
138
|
- lib/coral_vagrant/commands/coral/config.rb
|