vagrant-dotvm 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/README.md +1 -29
- data/examples/.gitignore +1 -0
- data/examples/config/projects/playground/Puppetfile +6 -0
- data/examples/config/projects/playground/bootstrap.sh +11 -1
- data/examples/config/projects/playground/config.ini +0 -0
- data/examples/config/projects/playground/default.pp +9 -0
- data/examples/config/projects/playground/main.yaml +30 -4
- data/examples/config/projects/playground/modules/.gitkeep +0 -0
- data/lib/vagrant-dotvm/configinjecter.rb +3 -1
- data/lib/vagrant-dotvm/configparser.rb +1 -0
- data/lib/vagrant-dotvm/version.rb +1 -1
- metadata +6 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 48da5ae40935aab0b20cb682da883e4a47789297
|
4
|
+
data.tar.gz: f35a30c07db80def6746151e3402fe8e7ee97167
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60644d8db7e1ebd44ebd79108fc24f62743e421e42f616fd7da65d27e867771195fd6bc5216ecbcdf986b54c1a433085016d6cf3a00fb4939cd8be00e10baa64
|
7
|
+
data.tar.gz: 925b895413c55f0322c12d67548860a04a6fd688991e9abe9a1f80867f6fa873b95571dac234deb0fa132d0af15e81285bd07d3ff068e7f5ce6987ca0e600c61
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -38,35 +38,7 @@ You need to create folder named after your project in `config/projects`.
|
|
38
38
|
In this folder you can create as many YAML files as you want.
|
39
39
|
In each one you are able to define multiple machines.
|
40
40
|
|
41
|
-
|
42
|
-
Example YAML configuration:
|
43
|
-
```yaml
|
44
|
-
machines:
|
45
|
-
- nick: example
|
46
|
-
name: machine1.example
|
47
|
-
box: chef/centos-7.0
|
48
|
-
networks:
|
49
|
-
- net: private_network
|
50
|
-
ip: 192.168.56.100
|
51
|
-
mask: 255.255.255.0
|
52
|
-
- net: forwarded_port
|
53
|
-
guest: 80
|
54
|
-
host: 1080
|
55
|
-
protocol: tcp
|
56
|
-
authorized_keys:
|
57
|
-
- type: file
|
58
|
-
path: "~/.ssh/id_rsa.pub"
|
59
|
-
- type: static
|
60
|
-
key: "ssh-rsa fakeSSHpubKEY km@laptop"
|
61
|
-
provision:
|
62
|
-
- type: shell
|
63
|
-
path: "%project.host%/bootstrap.sh"
|
64
|
-
args:
|
65
|
-
- "%project.guest%"
|
66
|
-
shared_folders:
|
67
|
-
- host: /Volumes/Repos
|
68
|
-
guest: /srv/www
|
69
|
-
```
|
41
|
+
Please refer to [example](/examples) to see possible options.
|
70
42
|
|
71
43
|
## Available variables
|
72
44
|
You can use variables inside of config values.
|
data/examples/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
.vagrant/
|
@@ -1,5 +1,15 @@
|
|
1
1
|
# Go to %project.guest% directory, so relative pathes will work here.
|
2
2
|
cd "$1"
|
3
3
|
|
4
|
-
#
|
4
|
+
# Ruby gems binaries go there.
|
5
|
+
PATH="/usr/local/bin:$PATH"
|
5
6
|
|
7
|
+
# Install puppet from EPEL repository
|
8
|
+
rpm --force -Uvh http://dl.fedoraproject.org/pub/epel/7/x86_64/e/epel-release-7-5.noarch.rpm
|
9
|
+
yum install -y puppet
|
10
|
+
|
11
|
+
# Install r10k - puppet module manager
|
12
|
+
gem install r10k
|
13
|
+
|
14
|
+
# Install required puppet modules
|
15
|
+
r10k puppetfile install
|
File without changes
|
@@ -1,14 +1,30 @@
|
|
1
1
|
machines:
|
2
|
-
- nick:
|
3
|
-
name: machine1.example
|
2
|
+
- nick: machine1
|
3
|
+
name: machine1.example.com
|
4
4
|
box: chef/centos-7.0
|
5
|
+
memory: 1024
|
6
|
+
cpus: 1
|
7
|
+
cpucap: 100
|
8
|
+
primary: true
|
9
|
+
natnet: 192.168.22.0/24
|
10
|
+
boot_timeout: 300
|
11
|
+
box_check_update: true
|
12
|
+
box_version: ">= 0"
|
13
|
+
graceful_halt_timeout: 60
|
14
|
+
post_up_message: "hello!"
|
15
|
+
autostart: true
|
5
16
|
networks:
|
6
17
|
- net: private_network
|
18
|
+
type: static
|
7
19
|
ip: 192.168.56.100
|
8
20
|
mask: 255.255.255.0
|
21
|
+
interface: "intnet0"
|
22
|
+
- net: public_network
|
23
|
+
type: dhcp
|
24
|
+
bridge: "en0: Wi-Fi (AirPort)"
|
9
25
|
- net: forwarded_port
|
10
26
|
guest: 80
|
11
|
-
host:
|
27
|
+
host: 54321
|
12
28
|
protocol: tcp
|
13
29
|
authorized_keys:
|
14
30
|
- type: file
|
@@ -16,10 +32,20 @@ machines:
|
|
16
32
|
- type: static
|
17
33
|
key: "ssh-rsa fakeSSHpubKEY km@laptop"
|
18
34
|
provision:
|
35
|
+
- type: file
|
36
|
+
source: "%project.host%/config.ini"
|
37
|
+
destination: "~/config.ini"
|
19
38
|
- type: shell
|
20
39
|
path: "%project.host%/bootstrap.sh"
|
21
40
|
args:
|
22
41
|
- "%project.guest%"
|
42
|
+
- type: puppet
|
43
|
+
manifests_path: "%project.host%"
|
44
|
+
manifest_file: "default.pp"
|
45
|
+
module_path: "%project.host%/modules"
|
23
46
|
shared_folders:
|
24
|
-
- host:
|
47
|
+
- host: ~/projects
|
25
48
|
guest: /srv/www
|
49
|
+
disabled: false
|
50
|
+
create: false
|
51
|
+
type: null
|
File without changes
|
@@ -7,7 +7,9 @@ module VagrantPlugins
|
|
7
7
|
vc.ssh.forward_x11 = true
|
8
8
|
|
9
9
|
config[:machines].each do |machine_cfg|
|
10
|
-
vc.vm.define machine_cfg[:nick],
|
10
|
+
vc.vm.define machine_cfg[:nick],
|
11
|
+
primary: machine_cfg[:primary],
|
12
|
+
autostart: machine_cfg[:autostart] do |machine|
|
11
13
|
machine.vm.box = machine_cfg[:box]
|
12
14
|
machine.vm.hostname = machine_cfg[:name]
|
13
15
|
machine.vm.boot_timeout = machine_cfg[:boot_timeout]
|
@@ -71,6 +71,7 @@ module VagrantPlugins
|
|
71
71
|
:box_version => self.coalesce(machine['box_version'], DEFAULT_BOX_VERSION),
|
72
72
|
:graceful_halt_timeout => self.coalesce(machine['graceful_halt_timeout'], DEFAULT_GRACEFUL_HALT_TIMEOUT),
|
73
73
|
:post_up_message => machine['post_up_message'],
|
74
|
+
:autostart => self.coalesce(machine['autostart'], true),
|
74
75
|
}
|
75
76
|
end
|
76
77
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-dotvm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Krzysztof Magosa
|
@@ -51,9 +51,14 @@ files:
|
|
51
51
|
- LICENSE.txt
|
52
52
|
- README.md
|
53
53
|
- Rakefile
|
54
|
+
- examples/.gitignore
|
54
55
|
- examples/Vagrantfile
|
56
|
+
- examples/config/projects/playground/Puppetfile
|
55
57
|
- examples/config/projects/playground/bootstrap.sh
|
58
|
+
- examples/config/projects/playground/config.ini
|
59
|
+
- examples/config/projects/playground/default.pp
|
56
60
|
- examples/config/projects/playground/main.yaml
|
61
|
+
- examples/config/projects/playground/modules/.gitkeep
|
57
62
|
- lib/vagrant-dotvm.rb
|
58
63
|
- lib/vagrant-dotvm/configinjecter.rb
|
59
64
|
- lib/vagrant-dotvm/configparser.rb
|