vagrant-serverkit-mock 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/Gemfile +11 -0
- data/README.md +51 -0
- data/Rakefile +1 -0
- data/example/Vagrantfile +11 -0
- data/example/recipe.yml.erb +5 -0
- data/example/variables.yml +1 -0
- data/lib/vagrant-serverkit.rb +1 -0
- data/lib/vagrant-serverkit/config.rb +21 -0
- data/lib/vagrant-serverkit/plugin.rb +19 -0
- data/lib/vagrant-serverkit/provisioner.rb +22 -0
- data/lib/vagrant-serverkit/version.rb +5 -0
- data/vagrant-serverkit-mock.gemspec +22 -0
- metadata +97 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 79ec64fc0511185a7f40633232826748f7ad18c6
|
4
|
+
data.tar.gz: 1685d6363e64088ff42a57ab0410cbcc97768916
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c7dce04e67d3571b0755493e422bd449ebdc5ea9b68990ce146b6117f60969d97a6b7cc68bdb63e2032a49ab1be176fcf75f21b3db5138c0c5ef0ce9af7c2fe7
|
7
|
+
data.tar.gz: e2aa5d7a4f33bd810451c9565570cc5aee65c9a101bcb37bfd17b9bbf9823911f893cca9ea9b2ba96fa38a7121e5f86c40f589b5887814e1a9ea781eb2f5b068
|
data/.gitignore
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
@@ -0,0 +1,51 @@
|
|
1
|
+
# vagrant-serverkit (Mock)
|
2
|
+
|
3
|
+
vagrant-serverkit is a vagrant plugin for [Serverkit](https://github.com/r7kamura/serverkit/).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
**NOTE**: This plugin is nothing but a mock. Reserve `vagrant-serverkit` namespace for serverkit's official plugin.
|
8
|
+
|
9
|
+
```
|
10
|
+
$ vagrant plugin install vagrant-serverkit-mock
|
11
|
+
```
|
12
|
+
|
13
|
+
## Usage
|
14
|
+
|
15
|
+
Set up `~/.ssh/config`:
|
16
|
+
|
17
|
+
```
|
18
|
+
$ vagrant up --no-provision
|
19
|
+
$ vagrant ssh-config --host host_name >> ~/.ssh/config
|
20
|
+
```
|
21
|
+
|
22
|
+
Configure `Vagrantfile`:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
Vagrant.configure(2) do |config|
|
26
|
+
config.vm.provision :serverkit do |config|
|
27
|
+
# Host name set in ~/.ssh/confg
|
28
|
+
config.host = 'host_name'
|
29
|
+
|
30
|
+
# Path to the recipe file
|
31
|
+
config.recipe = 'recipe.yml'
|
32
|
+
|
33
|
+
# Path to the variables file (Optional)
|
34
|
+
config.variables = 'variables.yml'
|
35
|
+
end
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
Run:
|
40
|
+
|
41
|
+
```
|
42
|
+
$ vagrant provision
|
43
|
+
```
|
44
|
+
|
45
|
+
## Contributing
|
46
|
+
|
47
|
+
1. Fork it ( https://github.com/kami30k/vagrant-serverkit/fork )
|
48
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
49
|
+
3. Commit your changes (`git commit -am 'Add some feature'`)
|
50
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
51
|
+
5. Create a new Pull Request
|
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
data/example/Vagrantfile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
path: /home/vagrant/serverkit
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'vagrant-serverkit/plugin'
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Serverkit
|
3
|
+
class Config < Vagrant.plugin('2', :config)
|
4
|
+
attr_accessor :host
|
5
|
+
attr_accessor :recipe
|
6
|
+
attr_accessor :variables
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@host = UNSET_VALUE
|
10
|
+
@recipe = UNSET_VALUE
|
11
|
+
@variables = UNSET_VALUE
|
12
|
+
end
|
13
|
+
|
14
|
+
def finalize!
|
15
|
+
@host = nil if @host == UNSET_VALUE
|
16
|
+
@recipe = nil if @recipe == UNSET_VALUE
|
17
|
+
@variables = nil if @variables == UNSET_VALUE
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module VagrantPlugins
|
2
|
+
module Serverkit
|
3
|
+
class Plugin < Vagrant.plugin('2')
|
4
|
+
name 'Serverkit'
|
5
|
+
|
6
|
+
provisioner :serverkit do
|
7
|
+
require_relative 'provisioner'
|
8
|
+
|
9
|
+
Provisioner
|
10
|
+
end
|
11
|
+
|
12
|
+
config :serverkit, :provisioner do
|
13
|
+
require_relative 'config'
|
14
|
+
|
15
|
+
Config
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require 'serverkit'
|
2
|
+
|
3
|
+
module VagrantPlugins
|
4
|
+
module Serverkit
|
5
|
+
class Provisioner < Vagrant.plugin('2', :provisioner)
|
6
|
+
def provision
|
7
|
+
::Serverkit::Command.new(options).call
|
8
|
+
end
|
9
|
+
|
10
|
+
private
|
11
|
+
|
12
|
+
def options
|
13
|
+
[
|
14
|
+
'apply',
|
15
|
+
config.recipe,
|
16
|
+
"--variables=#{config.variables}",
|
17
|
+
"--hosts=#{config.host}"
|
18
|
+
]
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
$:.unshift File.expand_path('../lib', __FILE__)
|
2
|
+
|
3
|
+
require 'vagrant-serverkit/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = 'vagrant-serverkit-mock'
|
7
|
+
s.version = VagrantPlugins::Serverkit::VERSION
|
8
|
+
s.authors = 'kami'
|
9
|
+
s.email = 'kami30k@gmail.com'
|
10
|
+
|
11
|
+
s.summary = 'Vagrant plugin for Serverkit.'
|
12
|
+
s.description = 'Vagrant plugin for Serverkit.'
|
13
|
+
s.homepage = 'https://github.com/kami30k/vagrant-serverkit'
|
14
|
+
|
15
|
+
s.files = `git ls-files -z`.split("\x0")
|
16
|
+
s.require_path = 'lib'
|
17
|
+
|
18
|
+
s.add_dependency 'serverkit'
|
19
|
+
|
20
|
+
s.add_development_dependency 'bundler'
|
21
|
+
s.add_development_dependency 'rake'
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,97 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-serverkit-mock
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- kami
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-04-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: serverkit
|
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
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Vagrant plugin for Serverkit.
|
56
|
+
email: kami30k@gmail.com
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- ".gitignore"
|
62
|
+
- Gemfile
|
63
|
+
- README.md
|
64
|
+
- Rakefile
|
65
|
+
- example/Vagrantfile
|
66
|
+
- example/recipe.yml.erb
|
67
|
+
- example/variables.yml
|
68
|
+
- lib/vagrant-serverkit.rb
|
69
|
+
- lib/vagrant-serverkit/config.rb
|
70
|
+
- lib/vagrant-serverkit/plugin.rb
|
71
|
+
- lib/vagrant-serverkit/provisioner.rb
|
72
|
+
- lib/vagrant-serverkit/version.rb
|
73
|
+
- vagrant-serverkit-mock.gemspec
|
74
|
+
homepage: https://github.com/kami30k/vagrant-serverkit
|
75
|
+
licenses: []
|
76
|
+
metadata: {}
|
77
|
+
post_install_message:
|
78
|
+
rdoc_options: []
|
79
|
+
require_paths:
|
80
|
+
- lib
|
81
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
89
|
+
- !ruby/object:Gem::Version
|
90
|
+
version: '0'
|
91
|
+
requirements: []
|
92
|
+
rubyforge_project:
|
93
|
+
rubygems_version: 2.4.6
|
94
|
+
signing_key:
|
95
|
+
specification_version: 4
|
96
|
+
summary: Vagrant plugin for Serverkit.
|
97
|
+
test_files: []
|