pantry 0.0.0 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +9 -0
- data/.ruby-version +1 -0
- data/.travis.yml +19 -0
- data/Gemfile +15 -0
- data/Guardfile +16 -0
- data/LICENSE +20 -0
- data/README.md +53 -0
- data/Rakefile +18 -0
- data/Vagrantfile +86 -0
- data/bin/pantry +11 -0
- data/bin/pantry-client +38 -0
- data/bin/pantry-server +33 -0
- data/dist/client.yml +79 -0
- data/dist/server.yml +56 -0
- data/dist/upstart/pantry-client.conf +12 -0
- data/dist/upstart/pantry-server.conf +12 -0
- data/doc/message_packet.dot +19 -0
- data/doc/message_packet.dot.png +0 -0
- data/doc/network_topology.dot +42 -0
- data/doc/network_topology.dot.png +0 -0
- data/lib/celluloid_zmq_patches.rb +16 -0
- data/lib/opt_parse_plus.rb +184 -0
- data/lib/pantry.rb +197 -0
- data/lib/pantry/cli.rb +154 -0
- data/lib/pantry/client.rb +131 -0
- data/lib/pantry/client_info.rb +34 -0
- data/lib/pantry/client_registry.rb +104 -0
- data/lib/pantry/command.rb +194 -0
- data/lib/pantry/command_handler.rb +53 -0
- data/lib/pantry/command_line.rb +115 -0
- data/lib/pantry/commands/create_client.rb +30 -0
- data/lib/pantry/commands/download_directory.rb +35 -0
- data/lib/pantry/commands/echo.rb +32 -0
- data/lib/pantry/commands/edit_application.rb +60 -0
- data/lib/pantry/commands/register_client.rb +38 -0
- data/lib/pantry/commands/status.rb +78 -0
- data/lib/pantry/commands/sync_directory.rb +50 -0
- data/lib/pantry/commands/update_application.rb +45 -0
- data/lib/pantry/commands/upload_file.rb +68 -0
- data/lib/pantry/communication.rb +20 -0
- data/lib/pantry/communication/client.rb +75 -0
- data/lib/pantry/communication/client_filter.rb +117 -0
- data/lib/pantry/communication/file_service.rb +125 -0
- data/lib/pantry/communication/file_service/file_progress.rb +164 -0
- data/lib/pantry/communication/file_service/receive_file.rb +97 -0
- data/lib/pantry/communication/file_service/send_file.rb +74 -0
- data/lib/pantry/communication/publish_socket.rb +20 -0
- data/lib/pantry/communication/reading_socket.rb +89 -0
- data/lib/pantry/communication/receive_socket.rb +23 -0
- data/lib/pantry/communication/security.rb +44 -0
- data/lib/pantry/communication/security/authentication.rb +98 -0
- data/lib/pantry/communication/security/curve_key_store.rb +120 -0
- data/lib/pantry/communication/security/curve_security.rb +70 -0
- data/lib/pantry/communication/security/null_security.rb +32 -0
- data/lib/pantry/communication/send_socket.rb +19 -0
- data/lib/pantry/communication/serialize_message.rb +84 -0
- data/lib/pantry/communication/server.rb +97 -0
- data/lib/pantry/communication/subscribe_socket.rb +33 -0
- data/lib/pantry/communication/wait_list.rb +45 -0
- data/lib/pantry/communication/writing_socket.rb +46 -0
- data/lib/pantry/config.rb +182 -0
- data/lib/pantry/file_editor.rb +67 -0
- data/lib/pantry/logger.rb +78 -0
- data/lib/pantry/message.rb +134 -0
- data/lib/pantry/multi_command.rb +36 -0
- data/lib/pantry/server.rb +132 -0
- data/lib/pantry/test/acceptance.rb +83 -0
- data/lib/pantry/test/support/fake_fs.rb +31 -0
- data/lib/pantry/test/support/matchers.rb +13 -0
- data/lib/pantry/test/support/minitest.rb +13 -0
- data/lib/pantry/test/support/mock_ui.rb +23 -0
- data/lib/pantry/test/unit.rb +13 -0
- data/lib/pantry/ui.rb +68 -0
- data/lib/pantry/version.rb +3 -0
- data/pantry.gemspec +40 -0
- data/test/acceptance/cli/error_handling_test.rb +7 -0
- data/test/acceptance/cli/execute_command_on_clients_test.rb +32 -0
- data/test/acceptance/cli/request_info_from_server_test.rb +44 -0
- data/test/acceptance/communication/client_requests_info_from_server_test.rb +28 -0
- data/test/acceptance/communication/heartbeat_test.rb +19 -0
- data/test/acceptance/communication/pub_sub_communication_test.rb +53 -0
- data/test/acceptance/communication/security_test.rb +117 -0
- data/test/acceptance/communication/server_requests_info_from_client_test.rb +41 -0
- data/test/acceptance/test_helper.rb +25 -0
- data/test/fixtures/config.yml +22 -0
- data/test/fixtures/empty.yml +2 -0
- data/test/fixtures/file_to_upload +3 -0
- data/test/root_dir/.gitkeep +0 -0
- data/test/unit/cli_test.rb +173 -0
- data/test/unit/client_registry_test.rb +61 -0
- data/test/unit/client_test.rb +128 -0
- data/test/unit/command_handler_test.rb +79 -0
- data/test/unit/command_line_test.rb +5 -0
- data/test/unit/command_test.rb +206 -0
- data/test/unit/commands/create_client_test.rb +25 -0
- data/test/unit/commands/download_directory_test.rb +58 -0
- data/test/unit/commands/echo_test.rb +22 -0
- data/test/unit/commands/edit_application_test.rb +84 -0
- data/test/unit/commands/register_client_test.rb +41 -0
- data/test/unit/commands/status_test.rb +81 -0
- data/test/unit/commands/sync_directory_test.rb +75 -0
- data/test/unit/commands/update_application_test.rb +35 -0
- data/test/unit/commands/upload_file_test.rb +51 -0
- data/test/unit/communication/client_filter_test.rb +262 -0
- data/test/unit/communication/client_test.rb +99 -0
- data/test/unit/communication/file_service/receive_file_test.rb +214 -0
- data/test/unit/communication/file_service/send_file_test.rb +110 -0
- data/test/unit/communication/file_service_test.rb +56 -0
- data/test/unit/communication/publish_socket_test.rb +19 -0
- data/test/unit/communication/reading_socket_test.rb +110 -0
- data/test/unit/communication/receive_socket_test.rb +20 -0
- data/test/unit/communication/security/authentication_test.rb +97 -0
- data/test/unit/communication/security/curve_key_store_test.rb +110 -0
- data/test/unit/communication/security/curve_security_test.rb +44 -0
- data/test/unit/communication/security/null_security_test.rb +15 -0
- data/test/unit/communication/security_test.rb +49 -0
- data/test/unit/communication/send_socket_test.rb +19 -0
- data/test/unit/communication/serialize_message_test.rb +128 -0
- data/test/unit/communication/server_test.rb +106 -0
- data/test/unit/communication/subscribe_socket_test.rb +46 -0
- data/test/unit/communication/wait_list_test.rb +60 -0
- data/test/unit/communication/writing_socket_test.rb +46 -0
- data/test/unit/config_test.rb +150 -0
- data/test/unit/logger_test.rb +79 -0
- data/test/unit/message_test.rb +179 -0
- data/test/unit/multi_command_test.rb +45 -0
- data/test/unit/opt_parse_plus_test.rb +218 -0
- data/test/unit/pantry_test.rb +82 -0
- data/test/unit/server_test.rb +166 -0
- data/test/unit/test_helper.rb +25 -0
- data/test/unit/ui_test.rb +58 -0
- metadata +389 -13
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a228ac40bff03daa09bd516d18328aaffbbf67fa
|
4
|
+
data.tar.gz: 1cacb592d56d91bd569d21385b6d26252b72a52d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 95d810135477200db6bffc546591fd95ef491d6cedf69a1dd4f96f1ad7b919a868ea3b4a2ee6b6a13eb27ef96d376bd3ffa4a44edf74141963c4a54d8b9d2031
|
7
|
+
data.tar.gz: cd812382ac98f34cd72a9948c1846996a3b6da977d62b49d30f9a33917adbb456d0500a77284c7f402e820d3c531ed541a7977befb6348620d2a386da2764ed8
|
data/.gitignore
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.0.0
|
data/.travis.yml
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
before_install:
|
2
|
+
- travis_retry sudo apt-add-repository ppa:shnatsel/dnscrypt -y
|
3
|
+
- travis_retry sudo apt-add-repository ppa:bpaquet/zeromq4-precise -y
|
4
|
+
- travis_retry sudo apt-get update
|
5
|
+
- travis_retry sudo apt-get install libzmq-dev libsodium-dev -y
|
6
|
+
language: ruby
|
7
|
+
env:
|
8
|
+
- EDITOR=vim
|
9
|
+
rvm:
|
10
|
+
- 2.0.0
|
11
|
+
- 2.1.0
|
12
|
+
- ruby-head
|
13
|
+
cache:
|
14
|
+
- bundler
|
15
|
+
- apt
|
16
|
+
|
17
|
+
matrix:
|
18
|
+
allow_failures:
|
19
|
+
- rvm: ruby-head
|
data/Gemfile
ADDED
data/Guardfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
ignore %r{.swp$}
|
2
|
+
|
3
|
+
guard :bundler do
|
4
|
+
watch("Gemfile")
|
5
|
+
end
|
6
|
+
|
7
|
+
guard :shell do
|
8
|
+
watch(%r{^(doc/.+\.dot)$}) { |m| system("dot -O -Tpng #{m[1]}") }
|
9
|
+
end
|
10
|
+
|
11
|
+
guard :minitest, include: ["lib"] do
|
12
|
+
watch(%r{^test/(.*)\/?(.*)_test\.rb$})
|
13
|
+
watch(%r{^lib/pantry/(.*/)?([^/]+)\.rb$}) { |m| "test/unit/#{m[1]}#{m[2]}_test.rb" }
|
14
|
+
watch("test/unit/test_helper.rb") { 'test' }
|
15
|
+
watch("test/acceptance/test_helper.rb") { 'test' }
|
16
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright (c) 2014 Collective Idea
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
4
|
+
of this software and associated documentation files (the "Software"), to deal
|
5
|
+
in the Software without restriction, including without limitation the rights
|
6
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
7
|
+
copies of the Software, and to permit persons to whom the Software is
|
8
|
+
furnished to do so, subject to the following conditions:
|
9
|
+
|
10
|
+
The above copyright notice and this permission notice shall be included in
|
11
|
+
all copies or substantial portions of the Software.
|
12
|
+
|
13
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
14
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
15
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
16
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
17
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
18
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
19
|
+
THE SOFTWARE.
|
20
|
+
|
data/README.md
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
Pantry: Modern DevOps Automation
|
2
|
+
================================
|
3
|
+
|
4
|
+
[![Build Status](https://travis-ci.org/pantry/pantry.png)](https://travis-ci.org/pantry/pantry) [![Code Climate](https://codeclimate.com/github/pantry/pantry.png)](https://codeclimate.com/github/pantry/pantry)
|
5
|
+
|
6
|
+
Pantry takes the tedium out of setting up a DevOps stack by providing framework for storing, sharing, and running server provisioning and configuration. Whether your stack is Chef or Puppet, Docker or Packer, or any mix of tools, Pantry doesn't care!
|
7
|
+
|
8
|
+
## Installation
|
9
|
+
|
10
|
+
Install Pantry via Rubygems on all servers and local machines:
|
11
|
+
|
12
|
+
gem install pantry
|
13
|
+
|
14
|
+
## Requirements
|
15
|
+
|
16
|
+
Pantry depends on [Celluloid](http://celluloid.io) and [ZeroMQ](http://zeromq.org/). Pantry is built for Ruby 2.0 and later and requires Rubygems 2.1 and later.
|
17
|
+
|
18
|
+
## Usage
|
19
|
+
|
20
|
+
Pantry has three main aspects: the Server, a Client, and the CLI. Pantry provides command-line tools for all of these.
|
21
|
+
|
22
|
+
Starting the Server: `pantry-server -c /path/to/server.yml`
|
23
|
+
|
24
|
+
Starting a Client: `pantry-client -c /path/to/client.yml`
|
25
|
+
|
26
|
+
Running the CLI: `pantry --help`
|
27
|
+
|
28
|
+
For more information, see [Getting Started](http://pantryops.org/getting_started.html).
|
29
|
+
|
30
|
+
## Documentation
|
31
|
+
|
32
|
+
The Documentation for Pantry is available at http://pantryops.org and the RDoc is served up at [rdoc.info/pantry](http://rubydoc.info/github/pantry/pantry/master/frames).
|
33
|
+
|
34
|
+
## Available Plugins
|
35
|
+
|
36
|
+
* [Pantry Chef](https://github.com/pantry/pantry-chef) -- Configure Pantry Clients with Chef
|
37
|
+
|
38
|
+
## Project Details
|
39
|
+
|
40
|
+
* Built and Maintained by [Collective Idea](http://collectiveidea.com)
|
41
|
+
* Hosted on Github [pantry/pantry](https://github.com/pantry/pantry)
|
42
|
+
* File bug reports on the [Issue tracker](https://github.com/pantry/pantry/issues)
|
43
|
+
|
44
|
+
## Contributing
|
45
|
+
|
46
|
+
* Fork this repository on Github
|
47
|
+
* Make your changes and send us a Pull Request
|
48
|
+
* All Pull Requests must contain tests
|
49
|
+
* Pull Request tests must pass before being accepted
|
50
|
+
|
51
|
+
## License
|
52
|
+
|
53
|
+
Pantry is distributed under the MIT License. See LICENSE for more details.
|
data/Rakefile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'rake/testtask'
|
2
|
+
|
3
|
+
task :default => "test:all"
|
4
|
+
|
5
|
+
namespace :test do
|
6
|
+
desc "Run all test suites"
|
7
|
+
task :all => [:unit, :acceptance]
|
8
|
+
|
9
|
+
Rake::TestTask.new(:unit) do |t|
|
10
|
+
t.libs << "test" << "lib"
|
11
|
+
t.pattern = "#{File.dirname(__FILE__)}/test/unit/**/*_test.rb"
|
12
|
+
end
|
13
|
+
|
14
|
+
Rake::TestTask.new(:acceptance) do |t|
|
15
|
+
t.libs << "test" << "lib"
|
16
|
+
t.pattern = "#{File.dirname(__FILE__)}/test/acceptance/**/*_test.rb"
|
17
|
+
end
|
18
|
+
end
|
data/Vagrantfile
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
Vagrant::Environment.class_eval do
|
2
|
+
define_method :default_provider do
|
3
|
+
:vmware_fusion
|
4
|
+
end
|
5
|
+
end
|
6
|
+
|
7
|
+
# Set up a Vagrant box with pantry-server and one pantry-client,
|
8
|
+
# port forwarded directly so that you can connect to localhost:23001 and localhost:23002
|
9
|
+
# and run pantry CLI locally
|
10
|
+
#
|
11
|
+
# Defaults to VMWare but VirtualBox also supported
|
12
|
+
Vagrant::Config.run("2") do |config|
|
13
|
+
|
14
|
+
config.vm.provider :virtualbox do |vbox, config|
|
15
|
+
config.vm.box = "precise64"
|
16
|
+
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
|
17
|
+
end
|
18
|
+
|
19
|
+
config.vm.provider :vmware_fusion do |vmware, config|
|
20
|
+
config.vm.box = "precise64"
|
21
|
+
config.vm.box_url = "http://files.vagrantup.com/precise64_vmware_fusion.box"
|
22
|
+
end
|
23
|
+
|
24
|
+
# Expose Server ports outside of the VM for local pantry cli usage
|
25
|
+
config.vm.network "forwarded_port", guest: 23001, host: 23001, autocorrect: true
|
26
|
+
config.vm.network "forwarded_port", guest: 23002, host: 23002, autocorrect: true
|
27
|
+
|
28
|
+
# Install the current pantry.gem
|
29
|
+
config.vm.provision :shell do |shell|
|
30
|
+
shell.inline = <<-EOF.gsub(/^ +/, "")
|
31
|
+
# Make sure vagrant always has sudo access
|
32
|
+
( cat << 'EOP'
|
33
|
+
Defaults exempt_group=vagrant
|
34
|
+
%vagrant ALL=NOPASSWD:ALL
|
35
|
+
EOP
|
36
|
+
) > /etc/sudoers.d/vagrant
|
37
|
+
chmod 0440 /etc/sudoers.d/vagrant
|
38
|
+
|
39
|
+
# Remove vagrant default Ruby
|
40
|
+
if [ -d /opt/ruby ]; then
|
41
|
+
rm -rf /opt/ruby
|
42
|
+
fi
|
43
|
+
|
44
|
+
# Install Ruby 2.0
|
45
|
+
if [ ! -f /usr/bin/ruby ]; then
|
46
|
+
apt-get update
|
47
|
+
apt-get install -y python-software-properties
|
48
|
+
apt-add-repository -y ppa:brightbox/ruby-ng-experimental
|
49
|
+
apt-get update
|
50
|
+
apt-get install -y ruby2.0 ruby2.0-dev
|
51
|
+
fi
|
52
|
+
|
53
|
+
# Install ZeroMQ 3
|
54
|
+
if [ ! -f /usr/lib/x86_64-linux-gnu/libzmq3.so ]; then
|
55
|
+
apt-add-repository ppa:chris-lea/zeromq
|
56
|
+
apt-get update
|
57
|
+
apt-get install -y libzmq3 libzmq3-dev
|
58
|
+
fi
|
59
|
+
|
60
|
+
# Install latest version of the gem
|
61
|
+
cd /vagrant
|
62
|
+
gem build pantry.gemspec
|
63
|
+
gem install /vagrant/pantry*.gem
|
64
|
+
|
65
|
+
# Copy configs in place
|
66
|
+
mkdir -p /etc/pantry
|
67
|
+
|
68
|
+
if [ ! -f /etc/pantry/client.yml ]; then
|
69
|
+
cp /vagrant/dist/client.yml /etc/pantry/client.yml
|
70
|
+
fi
|
71
|
+
|
72
|
+
if [ ! -f /etc/pantry/server.yml ]; then
|
73
|
+
cp /vagrant/dist/server.yml /etc/pantry/server.yml
|
74
|
+
fi
|
75
|
+
|
76
|
+
cp /vagrant/dist/upstart/pantry-client.conf /etc/init/pantry-client.conf
|
77
|
+
cp /vagrant/dist/upstart/pantry-server.conf /etc/init/pantry-server.conf
|
78
|
+
|
79
|
+
# Restart pantry services
|
80
|
+
restart pantry-server || start pantry-server
|
81
|
+
restart pantry-client || start pantry-client
|
82
|
+
EOF
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
# vi: set ft=ruby
|
data/bin/pantry
ADDED
data/bin/pantry-client
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# The Pantry Client
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
7
|
+
require 'pantry'
|
8
|
+
require 'optparse'
|
9
|
+
|
10
|
+
options = {}
|
11
|
+
OptionParser.new do |opts|
|
12
|
+
opts.banner = "Usage: pantry-client [options]"
|
13
|
+
|
14
|
+
opts.on("-c", "--config CONFIG_FILE",
|
15
|
+
"Configure Pantry Client from the CONFIG_FILE") do |config_file|
|
16
|
+
options[:config_file] = config_file
|
17
|
+
end
|
18
|
+
|
19
|
+
opts.on_tail("-h", "--help", "Show this message") do
|
20
|
+
puts opts
|
21
|
+
exit
|
22
|
+
end
|
23
|
+
end.parse!
|
24
|
+
|
25
|
+
if options[:config_file]
|
26
|
+
Pantry.config.load_file(options[:config_file])
|
27
|
+
end
|
28
|
+
|
29
|
+
client_supervisor = Pantry::Client.supervise(
|
30
|
+
identity: Pantry.config.client_identity,
|
31
|
+
application: Pantry.config.client_application,
|
32
|
+
environment: Pantry.config.client_environment,
|
33
|
+
roles: Pantry.config.client_roles
|
34
|
+
)
|
35
|
+
client = client_supervisor.actors.first
|
36
|
+
client.run
|
37
|
+
|
38
|
+
sleep
|
data/bin/pantry-server
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
# The Pantry Server
|
4
|
+
|
5
|
+
require 'rubygems'
|
6
|
+
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
7
|
+
require 'pantry'
|
8
|
+
require 'optparse'
|
9
|
+
|
10
|
+
options = {}
|
11
|
+
OptionParser.new do |opts|
|
12
|
+
opts.banner = "Usage: pantry-server [options]"
|
13
|
+
|
14
|
+
opts.on("-c", "--config CONFIG_FILE",
|
15
|
+
"Configure Pantry Server from the CONFIG_FILE") do |config_file|
|
16
|
+
options[:config_file] = config_file
|
17
|
+
end
|
18
|
+
|
19
|
+
opts.on_tail("-h", "--help", "Show this message") do
|
20
|
+
puts opts
|
21
|
+
exit
|
22
|
+
end
|
23
|
+
end.parse!
|
24
|
+
|
25
|
+
if options[:config_file]
|
26
|
+
Pantry.config.load_file(options[:config_file])
|
27
|
+
end
|
28
|
+
|
29
|
+
server_supervisor = Pantry::Server.supervise
|
30
|
+
server = server_supervisor.actors.first
|
31
|
+
server.run
|
32
|
+
|
33
|
+
sleep
|
data/dist/client.yml
ADDED
@@ -0,0 +1,79 @@
|
|
1
|
+
---
|
2
|
+
# Configure where to send Pantry logs.
|
3
|
+
# Can be one of three values:
|
4
|
+
#
|
5
|
+
# - stdout / nil -- Send to STDOUT
|
6
|
+
# - syslog -- Send to the local syslog daemon.
|
7
|
+
# - [file path] -- Write logs to the given file
|
8
|
+
log_to: /var/log/pantry-client.log
|
9
|
+
|
10
|
+
# Minimum log output.
|
11
|
+
# Levels are defined as:
|
12
|
+
#
|
13
|
+
# - fatal
|
14
|
+
# - error
|
15
|
+
# - warn
|
16
|
+
# - info
|
17
|
+
# - debug
|
18
|
+
#
|
19
|
+
# Each level includes all levels above it.
|
20
|
+
# log_level: info
|
21
|
+
|
22
|
+
# Specify the Syslog program name
|
23
|
+
# In the case that log_to is set to 'syslog' you can set the program name
|
24
|
+
# for filtering messages.
|
25
|
+
# syslog_program_name: pantry
|
26
|
+
|
27
|
+
# Location on the file system where all persistent files are stored.
|
28
|
+
# This directory is available in code as Pantry.root
|
29
|
+
# Must be read and writable by the user running pantry-client
|
30
|
+
root_dir: /var/lib/pantry
|
31
|
+
|
32
|
+
networking:
|
33
|
+
# IP address or Domain hosting the Pantry Server we connect to
|
34
|
+
# server_host: 127.0.0.1
|
35
|
+
|
36
|
+
# Port over which Server publishes messages
|
37
|
+
# pub_sub_port: 23001
|
38
|
+
|
39
|
+
# Port over which the Client sends messages to the Server
|
40
|
+
# receive_port: 23002
|
41
|
+
|
42
|
+
# Port over which File data is passed between Client and Server
|
43
|
+
# file_service_port: 23003
|
44
|
+
|
45
|
+
# Security strategy to use in communication
|
46
|
+
#
|
47
|
+
# Defaults to nil, meaning no built-in security.
|
48
|
+
# Also available is "curve" which turns on ZeroMQ's Curve encryption
|
49
|
+
# as seen here: http://api.zeromq.org/4-0:zmq-curve
|
50
|
+
# This is not the default because Curve has not yet been fully vetted by
|
51
|
+
# the crypto community.
|
52
|
+
#
|
53
|
+
# If the Server is configured for curve the so must the Client and the Client
|
54
|
+
# must be given the Server's public encryption key.
|
55
|
+
# security:
|
56
|
+
|
57
|
+
client:
|
58
|
+
# Set the unique identity of this Client. The default is the current
|
59
|
+
# hostname of the server. This name should be unique across the entire
|
60
|
+
# set of Clients talking to a given Server
|
61
|
+
# identity: "pantry-test-1"
|
62
|
+
|
63
|
+
# [Optional] A Client can be configured to manage a specific application.
|
64
|
+
# Use this if the Pantry network manages multiple applications.
|
65
|
+
# application: "pantry"
|
66
|
+
|
67
|
+
# [Optional] A Client can be configured to manage a certain environment of
|
68
|
+
# an application.
|
69
|
+
# environment: "test"
|
70
|
+
|
71
|
+
# [Optional] A Client can be configured as managing a certain set of roles
|
72
|
+
# for the given application. This must be an array
|
73
|
+
# roles:
|
74
|
+
# - database
|
75
|
+
# - application
|
76
|
+
|
77
|
+
# How often, in seconds, does this client ping the Server
|
78
|
+
# to ensure the Server knows about this Client?
|
79
|
+
# heartbeat_interval: 300
|
data/dist/server.yml
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
---
|
2
|
+
# Configure where to send Pantry logs.
|
3
|
+
# Can be one of three values:
|
4
|
+
#
|
5
|
+
# - stdout / nil -- Send to STDOUT
|
6
|
+
# - syslog -- Send to the local syslog daemon.
|
7
|
+
# - [file path] -- Write logs to the given file
|
8
|
+
log_to: /var/log/pantry-server.log
|
9
|
+
|
10
|
+
# Minimum log output.
|
11
|
+
# Levels are defined as:
|
12
|
+
#
|
13
|
+
# - fatal
|
14
|
+
# - error
|
15
|
+
# - warn
|
16
|
+
# - info
|
17
|
+
# - debug
|
18
|
+
#
|
19
|
+
# Each level includes all levels above it.
|
20
|
+
# log_level: info
|
21
|
+
|
22
|
+
# Specify the Syslog program name
|
23
|
+
# In the case that log_to is set to 'syslog' you can set the program name
|
24
|
+
# for filtering messages.
|
25
|
+
# syslog_program_name: pantry
|
26
|
+
|
27
|
+
# Location on the file system where all persistent files are stored.
|
28
|
+
# This directory is available in code as Pantry.root
|
29
|
+
# Must be read and writable by the user running pantry-server
|
30
|
+
root_dir: /var/lib/pantry
|
31
|
+
|
32
|
+
networking:
|
33
|
+
# IP address or Domain the Pantry Server binds to
|
34
|
+
server_host: 0.0.0.0
|
35
|
+
|
36
|
+
# Port over which this Server publishes messages to Clients
|
37
|
+
# pub_sub_port: 23001
|
38
|
+
|
39
|
+
# Port over which Clients communicate back to this Server
|
40
|
+
# receive_port: 23002
|
41
|
+
|
42
|
+
# Port over which File data is passed between Client and Server
|
43
|
+
# file_service_port: 23003
|
44
|
+
|
45
|
+
# Security strategy to use in communication
|
46
|
+
#
|
47
|
+
# Defaults to nil, meaning no built-in security.
|
48
|
+
# Also available is "curve" which turns on ZeroMQ's Curve encryption
|
49
|
+
# as seen here: http://api.zeromq.org/4-0:zmq-curve
|
50
|
+
# This is not the default because Curve has not yet been fully vetted by
|
51
|
+
# the crypto community
|
52
|
+
#
|
53
|
+
# If this Server is configured for curve security then all connecting
|
54
|
+
# Clients must also be configured for curve and be given this Server's
|
55
|
+
# public encryption key.
|
56
|
+
# security:
|