vagrant-chakraos-host 0.1.0
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 +7 -0
- data/.editorconfig +13 -0
- data/.gitignore +12 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +12 -0
- data/README.md +25 -0
- data/Rakefile +2 -0
- data/Vagrantfile +73 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/vagrant/chakraos/host.rb +2 -0
- data/lib/vagrant/chakraos/host/cap/nfs.rb +23 -0
- data/lib/vagrant/chakraos/host/host.rb +11 -0
- data/lib/vagrant/chakraos/host/plugin.rb +36 -0
- data/lib/vagrant/chakraos/host/version.rb +7 -0
- data/vagrant-chakraos-host.gemspec +31 -0
- metadata +86 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 9edd1374cd97dc9c726f93f919a3eb1313005ba5
|
4
|
+
data.tar.gz: 0cfdc7d6e18e93fb6874bfcce2442f2f1860f84b
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c61964705ca088ac6511084cc262789fde59a97463caf5e55b8db01ea4065e35d3f01edf36c2b6a25f25edee08ac465a67fdc56ee08cdabd936396bc5f1fcf66
|
7
|
+
data.tar.gz: c6641bfd9f74f3945f2b10907dc1ce87488f2425d30d57e20c074b40ad3f6a9f61a5633799d9d177362594da0ddf24c6e18272597115503ccc5181560f5721a2
|
data/.editorconfig
ADDED
data/.gitignore
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at TODO: Write your email address. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
|
3
|
+
# Specify your gem's dependencies in vagrant-chakraos-host.gemspec
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
group :development do
|
7
|
+
gem "vagrant", git: "https://github.com/mitchellh/vagrant.git"
|
8
|
+
end
|
9
|
+
|
10
|
+
group :plugins do
|
11
|
+
gem "vagrant-chakraos-host", path: "."
|
12
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# Vagrant::Chakraos::Host
|
2
|
+
|
3
|
+
This is a vagrant plugin that add host capabilities if you use [Chakraos](https://chakralinux.org/).
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Install it yourself as:
|
8
|
+
|
9
|
+
$ vagrant plugin install vagrant-chakraos-host
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
There's nothing else to do than install it :D
|
14
|
+
|
15
|
+
## Development
|
16
|
+
|
17
|
+
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.
|
18
|
+
|
19
|
+
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).
|
20
|
+
|
21
|
+
## Contributing
|
22
|
+
|
23
|
+
Bug reports and pull requests are welcome [here] on GitHub. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
24
|
+
|
25
|
+
[here]: https://github.com/deogracia/vagrant-chakraos-host
|
data/Rakefile
ADDED
data/Vagrantfile
ADDED
@@ -0,0 +1,73 @@
|
|
1
|
+
# -*- mode: ruby -*-
|
2
|
+
# vi: set ft=ruby :
|
3
|
+
|
4
|
+
# All Vagrant configuration is done below. The "2" in Vagrant.configure
|
5
|
+
# configures the configuration version (we support older styles for
|
6
|
+
# backwards compatibility). Please don't change it unless you know what
|
7
|
+
# you're doing.
|
8
|
+
Vagrant.configure("2") do |config|
|
9
|
+
# The most common configuration options are documented and commented below.
|
10
|
+
# For a complete reference, please see the online documentation at
|
11
|
+
# https://docs.vagrantup.com.
|
12
|
+
|
13
|
+
# Every Vagrant development environment requires a box. You can search for
|
14
|
+
# boxes at https://atlas.hashicorp.com/search.
|
15
|
+
config.vm.box = "bento/debian-8.2"
|
16
|
+
|
17
|
+
# Disable automatic box update checking. If you disable this, then
|
18
|
+
# boxes will only be checked for updates when the user runs
|
19
|
+
# `vagrant box outdated`. This is not recommended.
|
20
|
+
# config.vm.box_check_update = false
|
21
|
+
|
22
|
+
# Create a forwarded port mapping which allows access to a specific port
|
23
|
+
# within the machine from a port on the host machine. In the example below,
|
24
|
+
# accessing "localhost:8080" will access port 80 on the guest machine.
|
25
|
+
# config.vm.network "forwarded_port", guest: 80, host: 8080
|
26
|
+
|
27
|
+
# Create a private network, which allows host-only access to the machine
|
28
|
+
# using a specific IP.
|
29
|
+
# config.vm.network "private_network", ip: "192.168.33.10"
|
30
|
+
config.vm.network "private_network", type: "dhcp"
|
31
|
+
|
32
|
+
# Create a public network, which generally matched to bridged network.
|
33
|
+
# Bridged networks make the machine appear as another physical device on
|
34
|
+
# your network.
|
35
|
+
# config.vm.network "public_network"
|
36
|
+
|
37
|
+
# Share an additional folder to the guest VM. The first argument is
|
38
|
+
# the path on the host to the actual folder. The second argument is
|
39
|
+
# the path on the guest to mount the folder. And the optional third
|
40
|
+
# argument is a set of non-required options.
|
41
|
+
config.vm.synced_folder "..", "/vagrant_data", type: "nfs"
|
42
|
+
|
43
|
+
# Provider-specific configuration so you can fine-tune various
|
44
|
+
# backing providers for Vagrant. These expose provider-specific options.
|
45
|
+
# Example for VirtualBox:
|
46
|
+
#
|
47
|
+
config.vm.provider "virtualbox" do |vb|
|
48
|
+
# # Display the VirtualBox GUI when booting the machine
|
49
|
+
# vb.gui = true
|
50
|
+
#
|
51
|
+
# # Customize the amount of memory on the VM:
|
52
|
+
# vb.memory = "1024"
|
53
|
+
vb.name = "vagrant-chakraos-host's test box"
|
54
|
+
end
|
55
|
+
#
|
56
|
+
# View the documentation for the provider you are using for more
|
57
|
+
# information on available options.
|
58
|
+
|
59
|
+
# Define a Vagrant Push strategy for pushing to Atlas. Other push strategies
|
60
|
+
# such as FTP and Heroku are also available. See the documentation at
|
61
|
+
# https://docs.vagrantup.com/v2/push/atlas.html for more information.
|
62
|
+
# config.push.define "atlas" do |push|
|
63
|
+
# push.app = "YOUR_ATLAS_USERNAME/YOUR_APPLICATION_NAME"
|
64
|
+
# end
|
65
|
+
|
66
|
+
# Enable provisioning with a shell script. Additional provisioners such as
|
67
|
+
# Puppet, Chef, Ansible, Salt, and Docker are also available. Please see the
|
68
|
+
# documentation for more information about their specific syntax and use.
|
69
|
+
config.vm.provision "shell", inline: <<-SHELL
|
70
|
+
apt-get update
|
71
|
+
apt-get dist-upgrade -y
|
72
|
+
SHELL
|
73
|
+
end
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "vagrant/chakraos/host"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
module Vagrant
|
2
|
+
module Chakraos
|
3
|
+
module Host
|
4
|
+
module Cap
|
5
|
+
SYSTEMCTL_PATH="/usr/bin"
|
6
|
+
|
7
|
+
class NFS
|
8
|
+
def self.nfs_check_command(env)
|
9
|
+
return "#{Vagrant::Chakraos::Host::Cap::SYSTEMCTL_PATH}/systemctl status --no-pager nfs-server.service"
|
10
|
+
end
|
11
|
+
|
12
|
+
def self.nfs_start_command(env)
|
13
|
+
return "#{Vagrant::Chakraos::Host::Cap::SYSTEMCTL_PATH}/systemctl start nfs-server.service"
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.nfs_installed(env)
|
17
|
+
Kernel.system("#{Vagrant::Chakraos::Host::Cap::SYSTEMCTL_PATH}/systemctl --no-pager --no-legend --plain list-unit-files --all --type=service | grep --fixed-strings --quiet nfs-server.service")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
begin
|
2
|
+
require 'vagrant'
|
3
|
+
rescue LoadError
|
4
|
+
raise "The Vagrant Chakraos-host plugin must be run within Vagrant."
|
5
|
+
end
|
6
|
+
|
7
|
+
module Vagrant
|
8
|
+
module Chakraos
|
9
|
+
module Host
|
10
|
+
class Plugin < Vagrant.plugin("2")
|
11
|
+
name "Chakraos Host"
|
12
|
+
description "Chakraos Host support"
|
13
|
+
|
14
|
+
host("chakraos", "arch") do
|
15
|
+
require_relative "host"
|
16
|
+
Host
|
17
|
+
end
|
18
|
+
|
19
|
+
host_capability("chakraos", "nfs_installed") do
|
20
|
+
require_relative "cap/nfs"
|
21
|
+
Cap::NFS
|
22
|
+
end
|
23
|
+
|
24
|
+
host_capability("chakraos", "nfs_check_command") do
|
25
|
+
require_relative "cap/nfs"
|
26
|
+
Cap::NFS
|
27
|
+
end
|
28
|
+
|
29
|
+
host_capability("chakraos", "nfs_start_command") do
|
30
|
+
require_relative "cap/nfs"
|
31
|
+
Cap::NFS
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'vagrant/chakraos/host/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "vagrant-chakraos-host"
|
8
|
+
spec.version = Vagrant::Chakraos::Host::VERSION
|
9
|
+
spec.authors = ["Lionel Félicité"]
|
10
|
+
spec.email = ["deogracia@free.fr"]
|
11
|
+
|
12
|
+
spec.summary = %q{Host capabilities for Chakraos}
|
13
|
+
spec.description = %q{Add chakraos host & guest capabilities to vagrant.}
|
14
|
+
spec.homepage = "https://github.com/deogracia/vagrant-chakraos-host"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
# if spec.respond_to?(:metadata)
|
19
|
+
# spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
|
20
|
+
# else
|
21
|
+
# raise "RubyGems 2.0 or newer is required to protect against public gem pushes."
|
22
|
+
# end
|
23
|
+
|
24
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
25
|
+
spec.bindir = "exe"
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
+
spec.require_paths = ["lib"]
|
28
|
+
|
29
|
+
spec.add_development_dependency "bundler", "~> 1.12"
|
30
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: vagrant-chakraos-host
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Lionel Félicité
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-09-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.12'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.12'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
description: Add chakraos host & guest capabilities to vagrant.
|
42
|
+
email:
|
43
|
+
- deogracia@free.fr
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".editorconfig"
|
49
|
+
- ".gitignore"
|
50
|
+
- CODE_OF_CONDUCT.md
|
51
|
+
- Gemfile
|
52
|
+
- README.md
|
53
|
+
- Rakefile
|
54
|
+
- Vagrantfile
|
55
|
+
- bin/console
|
56
|
+
- bin/setup
|
57
|
+
- lib/vagrant/chakraos/host.rb
|
58
|
+
- lib/vagrant/chakraos/host/cap/nfs.rb
|
59
|
+
- lib/vagrant/chakraos/host/host.rb
|
60
|
+
- lib/vagrant/chakraos/host/plugin.rb
|
61
|
+
- lib/vagrant/chakraos/host/version.rb
|
62
|
+
- vagrant-chakraos-host.gemspec
|
63
|
+
homepage: https://github.com/deogracia/vagrant-chakraos-host
|
64
|
+
licenses: []
|
65
|
+
metadata: {}
|
66
|
+
post_install_message:
|
67
|
+
rdoc_options: []
|
68
|
+
require_paths:
|
69
|
+
- lib
|
70
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
76
|
+
requirements:
|
77
|
+
- - ">="
|
78
|
+
- !ruby/object:Gem::Version
|
79
|
+
version: '0'
|
80
|
+
requirements: []
|
81
|
+
rubyforge_project:
|
82
|
+
rubygems_version: 2.5.1
|
83
|
+
signing_key:
|
84
|
+
specification_version: 4
|
85
|
+
summary: Host capabilities for Chakraos
|
86
|
+
test_files: []
|