vagrant-faster 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/.travis.yml +12 -0
- data/README.md +16 -16
- data/Rakefile +2 -0
- data/Vagrantfile +15 -1
- data/lib/vagrant/faster/action.rb +3 -0
- data/provisioning/dev.yml +38 -0
- data/vagrant-faster.gemspec +1 -1
- metadata +12 -12
- data/.ruby-gemset +0 -1
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
MmVkMGU1NzgzMTkzYmNhYWYzYmRiYTQ2ZjgzYjY0YjBhMDE5NjA4Ng==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
M2MxMDM5Y2FmNzc3ODgwNGE1NzcwNDI3NDllZDZkMmIyMTFmOWNlNA==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
YTQ0MzI4YzZmNmZjZGYxNjI3MzkzNzE5MjhhYmZjZTJhMjgyYTc5N2IxMGFl
|
10
|
+
NTVjOWEwYzZiZDk5ZmZmMDM5MmRmZDNmOGI5YzI2NWMwMDFlZDU3YTY5ZTZj
|
11
|
+
MThkMTNiMzlkZmM0Y2JiZTVlNDE2ZDIyMGEwMDNlYzExNTZkNTM=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
ZGVjZTI5Y2U1ZGVlMjZhYjc2Y2EwMmFhYWExOWIyOWNjMWE4YmM5MjgzM2Jj
|
14
|
+
N2RiZGQ4NjViOTdmMmFjMWNiZmM0ZTk4ZTcyNTZmYTcwYWVjMmJkY2I0NWFi
|
15
|
+
YTMwNDI4MzUyNGY5YjZiYzFhZjM3NWJkMzUyMjFjOTQyZGEwNGI=
|
data/.travis.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
---
|
2
|
+
language: ruby
|
3
|
+
sudo: false
|
4
|
+
cache: bundler
|
5
|
+
deploy:
|
6
|
+
provider: rubygems
|
7
|
+
api_key:
|
8
|
+
secure: bb8ndwqNOqoDJg7oTipEBYpmF9Eg7A7eb5KhP8aG+J1qaaMv+xDksJ4J5ldTZUxsFBeVC9RIAiTHuK7gRElL7bwnRtQzLfDYLSuby2MzNLCu90QKN8ovmcvnytCyRyvL7GiSw0Uc0Q5o/ve040/i6YccUTxw12TJMcWaSHZA95o=
|
9
|
+
on:
|
10
|
+
tags: true
|
11
|
+
notifications:
|
12
|
+
email: false
|
data/README.md
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
# Vagrant::Faster
|
2
2
|
|
3
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/vagrant-faster.svg)](http://badge.fury.io/rb/vagrant-faster)
|
4
|
+
[![Build Status](https://travis-ci.org/rdsubhas/vagrant-faster.svg?branch=master)](https://travis-ci.org/rdsubhas/vagrant-faster)
|
4
5
|
|
5
|
-
|
6
|
+
Tired of Vagrant VMs running slow? This plugin automatically allocates more Memory/CPU based on your machine's capacity.
|
6
7
|
|
7
|
-
|
8
|
+
To install:
|
8
9
|
|
9
|
-
|
10
|
+
vagrant plugin install vagrant-faster
|
10
11
|
|
11
|
-
And
|
12
|
+
And that's it. All VMs started from now will be made faster.
|
12
13
|
|
13
|
-
|
14
|
+
## How much does it allocate?
|
14
15
|
|
15
|
-
|
16
|
+
* 1/4th of memory, if you have more than 2GB RAM
|
17
|
+
* 1/2 of the available CPU cores, if you have more than 1 CPU.
|
18
|
+
* For machines with less than 2GB RAM or single-CPU, it will simply leave the machine defaults as it is
|
16
19
|
|
17
|
-
|
20
|
+
**NOTE**: These were rudimentary values I picked based on usage. Please feel free to suggest better.
|
18
21
|
|
19
|
-
##
|
22
|
+
## Known Issues
|
20
23
|
|
21
|
-
|
24
|
+
* Presently supports only VirtualBox
|
25
|
+
* No option to disable this for specific VMs for now.
|
22
26
|
|
23
|
-
|
27
|
+
Please open an issue if you feel any of this are nagging you.
|
24
28
|
|
25
|
-
|
26
|
-
2. Create your feature branch (`git checkout -b my-new-feature`)
|
27
|
-
3. Commit your changes (`git commit -am 'Add some feature'`)
|
28
|
-
4. Push to the branch (`git push origin my-new-feature`)
|
29
|
-
5. Create a new Pull Request
|
29
|
+
**Contributions Welcome**
|
data/Rakefile
CHANGED
data/Vagrantfile
CHANGED
@@ -5,5 +5,19 @@
|
|
5
5
|
VAGRANTFILE_API_VERSION = "2"
|
6
6
|
|
7
7
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
8
|
-
config.vm.box = "
|
8
|
+
config.vm.box = "ubuntu/trusty64"
|
9
|
+
|
10
|
+
if Vagrant.has_plugin?('vagrant-cachier')
|
11
|
+
config.cache.scope = :box
|
12
|
+
else
|
13
|
+
puts "Run `vagrant plugin install vagrant-cachier` to reduce caffeine intake when provisioning"
|
14
|
+
end
|
15
|
+
|
16
|
+
config.vm.define "dev", primary: true do |dev|
|
17
|
+
dev.vm.provision "ansible" do |ansible|
|
18
|
+
ansible.playbook = 'provisioning/dev.yml'
|
19
|
+
ansible.verbose = 'vvv'
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
9
23
|
end
|
@@ -33,6 +33,9 @@ module Vagrant
|
|
33
33
|
elsif host =~ /linux/
|
34
34
|
cpus = `nproc`.to_i
|
35
35
|
mem = `grep 'MemTotal' /proc/meminfo | sed -e 's/MemTotal://' -e 's/ kB//'`.to_i / 1024
|
36
|
+
elsif host =~ /mswin|mingw|cygwin/
|
37
|
+
cpus = `wmic cpu Get NumberOfCores`.split[1].to_i
|
38
|
+
mem = `wmic computersystem Get TotalPhysicalMemory`.split[1].to_i / 1024 / 1024
|
36
39
|
end
|
37
40
|
|
38
41
|
# Give VM 1/4 system memory & access to half of cpu cores on the host
|
@@ -0,0 +1,38 @@
|
|
1
|
+
---
|
2
|
+
- hosts: all
|
3
|
+
gather_facts: yes
|
4
|
+
sudo: yes
|
5
|
+
|
6
|
+
tasks:
|
7
|
+
- name: Add Ruby repository
|
8
|
+
apt_repository: repo='ppa:brightbox/ruby-ng'
|
9
|
+
|
10
|
+
- name: Install packages
|
11
|
+
apt: name={{ item }} state=present
|
12
|
+
with_items:
|
13
|
+
- build-essential
|
14
|
+
- git
|
15
|
+
- libxml2-dev
|
16
|
+
- libxslt1-dev
|
17
|
+
- zlib1g-dev
|
18
|
+
- ruby2.2
|
19
|
+
- ruby2.2-dev
|
20
|
+
- ruby-switch
|
21
|
+
- curl
|
22
|
+
- wget
|
23
|
+
|
24
|
+
- name: Dont install gem docs
|
25
|
+
lineinfile: "dest=/etc/gemrc line='gem: --no-ri --no-rdoc' create=yes"
|
26
|
+
|
27
|
+
- name: Check bundler
|
28
|
+
shell: bundle -v
|
29
|
+
register: bundler_present
|
30
|
+
ignore_errors: True
|
31
|
+
|
32
|
+
- name: Install bundler
|
33
|
+
shell: gem install bundler -v '~> 1.7.0'
|
34
|
+
when: bundler_present|failed
|
35
|
+
|
36
|
+
- name: Install gems
|
37
|
+
shell: bundle install -j4 chdir=/vagrant
|
38
|
+
sudo_user: vagrant
|
data/vagrant-faster.gemspec
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-faster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- rdsubhas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ~>
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.6'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ~>
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.6'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- -
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: A Vagrant Plugin that makes your VirtualBox VMs faster by allocating
|
@@ -46,9 +46,8 @@ executables: []
|
|
46
46
|
extensions: []
|
47
47
|
extra_rdoc_files: []
|
48
48
|
files:
|
49
|
-
-
|
50
|
-
-
|
51
|
-
- ".ruby-version"
|
49
|
+
- .gitignore
|
50
|
+
- .travis.yml
|
52
51
|
- Gemfile
|
53
52
|
- LICENSE.txt
|
54
53
|
- README.md
|
@@ -57,6 +56,7 @@ files:
|
|
57
56
|
- lib/vagrant/faster.rb
|
58
57
|
- lib/vagrant/faster/action.rb
|
59
58
|
- lib/vagrant/faster/plugin.rb
|
59
|
+
- provisioning/dev.yml
|
60
60
|
- vagrant-faster.gemspec
|
61
61
|
homepage: http://github.com/rdsubhas/vagrant-faster
|
62
62
|
licenses:
|
@@ -68,17 +68,17 @@ require_paths:
|
|
68
68
|
- lib
|
69
69
|
required_ruby_version: !ruby/object:Gem::Requirement
|
70
70
|
requirements:
|
71
|
-
- -
|
71
|
+
- - ! '>='
|
72
72
|
- !ruby/object:Gem::Version
|
73
73
|
version: '0'
|
74
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- -
|
76
|
+
- - ! '>='
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
requirements: []
|
80
80
|
rubyforge_project:
|
81
|
-
rubygems_version: 2.
|
81
|
+
rubygems_version: 2.4.5
|
82
82
|
signing_key:
|
83
83
|
specification_version: 4
|
84
84
|
summary: A Vagrant Plugin that makes your VirtualBox VMs faster by allocating more
|
data/.ruby-gemset
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
vagrant-faster
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.1.2
|