vagrant-vagga 0.1.2 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb33311710a15a1ff9f91acd2e05b19a99674fd9
4
- data.tar.gz: 9e146d6264154d9276d201b8bd217190a6367330
3
+ metadata.gz: 1ef48114719597d97cd52206f7a0722207f19404
4
+ data.tar.gz: e422a94443f7ccbd1522d5b544952d0df5203ccd
5
5
  SHA512:
6
- metadata.gz: 72134f56fc253c0b43e22c9fd93ae33d42673e88ab6b045b5cb110837b5abeac0d87ede3f85bd7d1d4978eefb5bd9476e3763ca5084ef099b700f8a153c8dcf4
7
- data.tar.gz: 4faf2c19f55d50429603e0bb3feec6e4627f51c6ad0a4a738e3add2fe96754cefc0f05c17951ef1f65ed78d038c9116c0e6258254e9116e4e585bf11e168eeb8
6
+ metadata.gz: 39d53670ec383ef2a54c2856637b50ff1dd9a6a77212c1222362ec5485f8fa078fbd7c09d594e940cebf2ffcfd26cce81bed44b77d7a6075a3dba800d4a1997b
7
+ data.tar.gz: d20830a5fbc5dd7f834da2a35ca31abfffbc4537955a33a7874563b749a7b79bfac707b40aa3a98c4331842038f73b4600e08ede15f4d9d4dd2522b829a7c7ff
data/.gitignore CHANGED
@@ -8,5 +8,5 @@
8
8
  /spec/reports/
9
9
  /tmp/
10
10
  /vendor
11
- /.vagrant
12
- /.vagga
11
+ .vagrant
12
+ .vagga
data/README.md CHANGED
@@ -1,38 +1,62 @@
1
1
  # Vagrant::Vagga
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/vagrant/vagga`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Vagrant plugin that simplifies installation and usage of [Vagga](http://vagga.readthedocs.org/).
4
+ It provides:
5
+ - Automatic Vagga installation into the vagrant box (only ubuntu/trusty64 was tested, open an issue if you have troubles with other boxes)
6
+ - `vagga` command for vagrant. Instead of SSH'ing into the machine you can use vagga like `vagrant vagga <vagga arguments>`
6
7
 
7
8
  ## Installation
8
9
 
9
- Add this line to your application's Gemfile:
10
-
11
- ```ruby
12
- gem 'vagrant-vagga'
13
- ```
10
+ Install gem to vagrant:
14
11
 
15
- And then execute:
12
+ $ vagrant plugin install vagrant-vagga
16
13
 
17
- $ bundle
14
+ ## Make your Vagga project support Windows or MacOS
18
15
 
19
- Or install it yourself as:
16
+ 1. Install Vagrant
17
+ 2. Add Vagrantfile with content like in Usage paragraph below
18
+ 3. Install vagrant-vagga plugin
19
+ 4. You're awesome!
20
20
 
21
- $ gem install vagrant-vagga
22
21
 
23
22
  ## Usage
24
23
 
25
- TODO: Write usage instructions here
24
+ Vagrantfile should contain provision line to install vagga on `vagrant up`.
25
+ Also you can add protection for users without this plugin to remind them install it.
26
26
 
27
- ## Development
27
+ ```ruby
28
+ unless Vagrant.has_plugin?("vagrant-vagga")
29
+ abort 'vagrant-vagga plugin is not installed! Do first # vagrant plugin install vagrant-vagga'
30
+ end
31
+
32
+ Vagrant.configure("2") do |config|
33
+ config.vm.box = "ubuntu/trusty64"
34
+ config.vm.provision :vagga
35
+ end
36
+ ```
37
+
38
+ Your working directory with Vagrantfile should also contain vagga.yaml, which is implied by plugin logic.
39
+
40
+ ```shell
41
+ $ vagrant up
42
+ ... # after it's done
43
+ $ vagrant vagga
44
+ Available commands:
45
+ run Run app
46
+ setup Setup application
47
+ test Run unit tests
28
48
 
29
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
49
+ $ vagrant vagga test
50
+ <...> # building images
51
+ ```
52
+
53
+ ## Development
30
54
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
55
+ http://docs.vagrantup.com/v2/plugins/development-basics.html
32
56
 
33
57
  ## Contributing
34
58
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/vagrant-vagga. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](contributor-covenant.org) code of conduct.
59
+ Bug reports and pull requests are welcome on GitHub at https://github.com/rrader/vagrant-vagga.
36
60
 
37
61
 
38
62
  ## License
@@ -0,0 +1,10 @@
1
+ unless Vagrant.has_plugin?("vagrant-vagga")
2
+ abort 'vagrant-vagga plugin is not installed! Do first # vagrant plugin install vagrant-vagga'
3
+ end
4
+
5
+ Vagrant.configure("2") do |config|
6
+ config.vm.box = "ubuntu/trusty64"
7
+ config.vm.provision :vagga
8
+
9
+ config.vm.network :forwarded_port, guest: 5000, host: 5000, auto_correct: false
10
+ end
data/example/hello.py ADDED
@@ -0,0 +1,9 @@
1
+ from flask import Flask
2
+ app = Flask(__name__)
3
+
4
+ @app.route("/")
5
+ def hello():
6
+ return "Hello World!"
7
+
8
+ if __name__ == "__main__":
9
+ app.run(host='0.0.0.0', port=5000)
@@ -0,0 +1,6 @@
1
+ Flask==0.10.1
2
+ itsdangerous==0.24
3
+ Jinja2==2.8
4
+ MarkupSafe==0.23
5
+ Werkzeug==0.10.4
6
+ wheel==0.24.0
@@ -0,0 +1,12 @@
1
+ containers:
2
+ flask:
3
+ setup:
4
+ - !Ubuntu trusty
5
+ - !Py3Requirements requirements.txt
6
+
7
+ commands:
8
+
9
+ run: !Command
10
+ description: Run test server
11
+ container: flask
12
+ run: python3 hello.py
@@ -10,7 +10,10 @@ module VagrantPlugins
10
10
 
11
11
  def execute
12
12
  args = @argv.join(' ')
13
- command = "cd /vagrant; vagga #{args}"
13
+ vagga_command = "vagga #{args}"
14
+ # Workaround for ERROR:vagga::wrapper: Error executing _build: Error symlinking storage: Permission denied (os error 13)
15
+ vagga_command = "sudo #{vagga_command}"
16
+ command = "cd /vagrant; #{vagga_command}"
14
17
 
15
18
  with_target_vms(nil, single_target: true) do |vm|
16
19
  @logger.info("Executing vagga command on remote machine: #{command}")
@@ -26,3 +26,6 @@ cat > ~vagrant/.vagga/settings.yaml << EOF
26
26
  storage-dir: "/home/vagrant/"
27
27
  EOF
28
28
 
29
+ chown -R vagrant:vagrant ~vagrant/.vagga
30
+
31
+ echo "Vagga installed successfully"
@@ -1,5 +1,5 @@
1
1
  module VagrantPlugins
2
2
  module Vagga
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: vagrant-vagga
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roman Rader
@@ -52,6 +52,10 @@ files:
52
52
  - README.md
53
53
  - Rakefile
54
54
  - Vagrantfile
55
+ - example/Vagrantfile
56
+ - example/hello.py
57
+ - example/requirements.txt
58
+ - example/vagga.yaml
55
59
  - lib/vagrant-vagga.rb
56
60
  - lib/vagrant-vagga/command.rb
57
61
  - lib/vagrant-vagga/config.rb