Add initial kosmos_zerotier cookbook
For now it only includes the firewall rule Refs #244
This commit is contained in:
parent
e6b7794e20
commit
ee7a117d63
22
site-cookbooks/kosmos_zerotier/.gitignore
vendored
Normal file
22
site-cookbooks/kosmos_zerotier/.gitignore
vendored
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
.vagrant
|
||||||
|
*~
|
||||||
|
*#
|
||||||
|
.#*
|
||||||
|
\#*#
|
||||||
|
.*.sw[a-z]
|
||||||
|
*.un~
|
||||||
|
|
||||||
|
# Bundler
|
||||||
|
Gemfile.lock
|
||||||
|
gems.locked
|
||||||
|
bin/*
|
||||||
|
.bundle/*
|
||||||
|
|
||||||
|
# test kitchen
|
||||||
|
.kitchen/
|
||||||
|
kitchen.local.yml
|
||||||
|
|
||||||
|
# Chef
|
||||||
|
Berksfile.lock
|
||||||
|
.zero-knife.rb
|
||||||
|
Policyfile.lock.json
|
7
site-cookbooks/kosmos_zerotier/CHANGELOG.md
Normal file
7
site-cookbooks/kosmos_zerotier/CHANGELOG.md
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
# kosmos_zerotier CHANGELOG
|
||||||
|
|
||||||
|
# 0.1.0
|
||||||
|
|
||||||
|
Initial release.
|
||||||
|
|
||||||
|
- For now this only contains the firewall rule
|
21
site-cookbooks/kosmos_zerotier/LICENSE
Normal file
21
site-cookbooks/kosmos_zerotier/LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
The MIT License (MIT)
|
||||||
|
|
||||||
|
Copyright (c) 2020 Kosmos Developers
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in
|
||||||
|
all copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
THE SOFTWARE.
|
4
site-cookbooks/kosmos_zerotier/README.md
Normal file
4
site-cookbooks/kosmos_zerotier/README.md
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
# kosmos_zerotier
|
||||||
|
|
||||||
|
TODO: Enter the cookbook description here.
|
||||||
|
|
1
site-cookbooks/kosmos_zerotier/attributes/default.rb
Normal file
1
site-cookbooks/kosmos_zerotier/attributes/default.rb
Normal file
@ -0,0 +1 @@
|
|||||||
|
node.default["kosmos_zerotier"]["server_port"] = 9993
|
110
site-cookbooks/kosmos_zerotier/chefignore
Normal file
110
site-cookbooks/kosmos_zerotier/chefignore
Normal file
@ -0,0 +1,110 @@
|
|||||||
|
# Put files/directories that should be ignored in this file when uploading
|
||||||
|
# to a Chef Infra Server or Supermarket.
|
||||||
|
# Lines that start with '# ' are comments.
|
||||||
|
|
||||||
|
# OS generated files #
|
||||||
|
######################
|
||||||
|
.DS_Store
|
||||||
|
ehthumbs.db
|
||||||
|
Icon?
|
||||||
|
nohup.out
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
|
# SASS #
|
||||||
|
########
|
||||||
|
.sass-cache
|
||||||
|
|
||||||
|
# EDITORS #
|
||||||
|
###########
|
||||||
|
.#*
|
||||||
|
.project
|
||||||
|
.settings
|
||||||
|
*_flymake
|
||||||
|
*_flymake.*
|
||||||
|
*.bak
|
||||||
|
*.sw[a-z]
|
||||||
|
*.tmproj
|
||||||
|
*~
|
||||||
|
\#*
|
||||||
|
mkmf.log
|
||||||
|
REVISION
|
||||||
|
TAGS*
|
||||||
|
tmtags
|
||||||
|
|
||||||
|
## COMPILED ##
|
||||||
|
##############
|
||||||
|
*.class
|
||||||
|
*.com
|
||||||
|
*.dll
|
||||||
|
*.exe
|
||||||
|
*.o
|
||||||
|
*.pyc
|
||||||
|
*.so
|
||||||
|
*/rdoc/
|
||||||
|
a.out
|
||||||
|
|
||||||
|
# Testing #
|
||||||
|
###########
|
||||||
|
.circleci/*
|
||||||
|
.codeclimate.yml
|
||||||
|
.foodcritic
|
||||||
|
.kitchen*
|
||||||
|
.rspec
|
||||||
|
.rubocop.yml
|
||||||
|
.travis.yml
|
||||||
|
.watchr
|
||||||
|
azure-pipelines.yml
|
||||||
|
examples/*
|
||||||
|
features/*
|
||||||
|
Guardfile
|
||||||
|
kitchen.yml*
|
||||||
|
Procfile
|
||||||
|
Rakefile
|
||||||
|
spec/*
|
||||||
|
spec/*
|
||||||
|
spec/fixtures/*
|
||||||
|
test/*
|
||||||
|
|
||||||
|
# SCM #
|
||||||
|
#######
|
||||||
|
.git
|
||||||
|
.gitattributes
|
||||||
|
.gitconfig
|
||||||
|
.github/*
|
||||||
|
.gitignore
|
||||||
|
.gitmodules
|
||||||
|
.svn
|
||||||
|
*/.bzr/*
|
||||||
|
*/.git
|
||||||
|
*/.hg/*
|
||||||
|
*/.svn/*
|
||||||
|
|
||||||
|
# Berkshelf #
|
||||||
|
#############
|
||||||
|
Berksfile
|
||||||
|
Berksfile.lock
|
||||||
|
cookbooks/*
|
||||||
|
tmp
|
||||||
|
|
||||||
|
# Bundler #
|
||||||
|
###########
|
||||||
|
vendor/*
|
||||||
|
Gemfile
|
||||||
|
Gemfile.lock
|
||||||
|
|
||||||
|
# Policyfile #
|
||||||
|
##############
|
||||||
|
Policyfile.rb
|
||||||
|
Policyfile.lock.json
|
||||||
|
|
||||||
|
# Cookbooks #
|
||||||
|
#############
|
||||||
|
CHANGELOG*
|
||||||
|
CONTRIBUTING*
|
||||||
|
TESTING*
|
||||||
|
CODE_OF_CONDUCT*
|
||||||
|
|
||||||
|
# Vagrant #
|
||||||
|
###########
|
||||||
|
.vagrant
|
||||||
|
Vagrantfile
|
32
site-cookbooks/kosmos_zerotier/kitchen.yml
Normal file
32
site-cookbooks/kosmos_zerotier/kitchen.yml
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
---
|
||||||
|
driver:
|
||||||
|
name: vagrant
|
||||||
|
|
||||||
|
## The forwarded_port port feature lets you connect to ports on the VM guest via
|
||||||
|
## localhost on the host.
|
||||||
|
## see also: https://www.vagrantup.com/docs/networking/forwarded_ports.html
|
||||||
|
|
||||||
|
# network:
|
||||||
|
# - ["forwarded_port", {guest: 80, host: 8080}]
|
||||||
|
|
||||||
|
provisioner:
|
||||||
|
name: chef_zero
|
||||||
|
|
||||||
|
## product_name and product_version specifies a specific Chef product and version to install.
|
||||||
|
## see the Chef documentation for more details: https://docs.chef.io/config_yml_kitchen.html
|
||||||
|
# product_name: chef
|
||||||
|
# product_version: 15
|
||||||
|
|
||||||
|
verifier:
|
||||||
|
name: inspec
|
||||||
|
|
||||||
|
platforms:
|
||||||
|
- name: ubuntu-18.04
|
||||||
|
- name: centos-7
|
||||||
|
|
||||||
|
suites:
|
||||||
|
- name: default
|
||||||
|
verifier:
|
||||||
|
inspec_tests:
|
||||||
|
- test/integration/default
|
||||||
|
attributes:
|
10
site-cookbooks/kosmos_zerotier/metadata.rb
Normal file
10
site-cookbooks/kosmos_zerotier/metadata.rb
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
name 'kosmos_zerotier'
|
||||||
|
maintainer 'Kosmos Developers'
|
||||||
|
maintainer_email 'mail@kosmos.org'
|
||||||
|
license 'MIT'
|
||||||
|
description 'Installs/Configures kosmos_zerotier'
|
||||||
|
long_description 'Installs/Configures kosmos_zerotier'
|
||||||
|
version '0.1.0'
|
||||||
|
chef_version '>= 14.0'
|
||||||
|
|
||||||
|
depends 'kosmos-base'
|
25
site-cookbooks/kosmos_zerotier/recipes/default.rb
Normal file
25
site-cookbooks/kosmos_zerotier/recipes/default.rb
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
#
|
||||||
|
# Cookbook:: kosmos_zerotier
|
||||||
|
# Recipe:: default
|
||||||
|
#
|
||||||
|
# The MIT License (MIT)
|
||||||
|
#
|
||||||
|
# Copyright:: 2020, Kosmos Developers
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
# THE SOFTWARE.
|
31
site-cookbooks/kosmos_zerotier/recipes/firewall.rb
Normal file
31
site-cookbooks/kosmos_zerotier/recipes/firewall.rb
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#
|
||||||
|
# Cookbook:: kosmos_zerotier
|
||||||
|
# Recipe:: firewall
|
||||||
|
#
|
||||||
|
# The MIT License (MIT)
|
||||||
|
#
|
||||||
|
# Copyright:: 2020, Kosmos Developers
|
||||||
|
#
|
||||||
|
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
# of this software and associated documentation files (the "Software"), to deal
|
||||||
|
# in the Software without restriction, including without limitation the rights
|
||||||
|
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
# copies of the Software, and to permit persons to whom the Software is
|
||||||
|
# furnished to do so, subject to the following conditions:
|
||||||
|
#
|
||||||
|
# The above copyright notice and this permission notice shall be included in
|
||||||
|
# all copies or substantial portions of the Software.
|
||||||
|
#
|
||||||
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||||
|
# THE SOFTWARE.
|
||||||
|
|
||||||
|
firewall_rule "zerotier" do
|
||||||
|
port node["kosmos_zerotier"]["server_port"]
|
||||||
|
protocol :tcp
|
||||||
|
command :allow
|
||||||
|
end
|
Loading…
x
Reference in New Issue
Block a user