environmate 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +11 -0
- data/README.md +7 -6
- data/environmate.gemspec +7 -1
- data/exe/environmate +1 -1
- data/lib/environmate/app.rb +1 -0
- data/lib/environmate/configuration.rb +5 -2
- data/lib/environmate/version.rb +1 -1
- metadata +9 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 98fb305001e05a7f76386aa35d5a72ab4b1171534b0489a90a924e10238d7d78
|
4
|
+
data.tar.gz: c004d95e8cb5f418ead0066a4644644761843c20c53ba08a1761076074b8b0a2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a4d5b97829cf4e74eb27c201fc4212aae576fb2047506aa0839bada14466ade54f5eed6b2f0fa96c8f3bfd49fd28c5c76d628335a276c6cba9adfc7befb3bab5
|
7
|
+
data.tar.gz: 472adb7f866ced6285d6ec336ba4c731fb52b6158465a8a01c5716d31df982fed642a79d347fc93d05c503f13b17f034ae1cf6222cbb9b11b9ae16020d095516
|
data/.gitignore
CHANGED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Change Log
|
2
|
+
All notable changes to Enviornmate will be documented in this file.
|
3
|
+
|
4
|
+
## [0.1.1] - 2018-02-12
|
5
|
+
### Fixed
|
6
|
+
- Sinatra environment handling
|
7
|
+
- Some small updates to the Documentation
|
8
|
+
|
9
|
+
## [0.1.0] - 2018-01-15
|
10
|
+
### Added
|
11
|
+
- Initial release of Environmate
|
data/README.md
CHANGED
@@ -19,7 +19,7 @@ your puppet master by running:
|
|
19
19
|
|
20
20
|
## Usage
|
21
21
|
|
22
|
-
Environmate comes with
|
22
|
+
Environmate comes with a webserver included and no additional setup
|
23
23
|
is required. Simply run environmate from the console:
|
24
24
|
|
25
25
|
$ /opt/puppetlabs/puppet/bin/environmate --help
|
@@ -105,14 +105,14 @@ It will use the first yaml file it finds:
|
|
105
105
|
Additionally you can provide a configuration file when starting the environmate
|
106
106
|
service:
|
107
107
|
|
108
|
-
$ /opt/puppetlabs/puppet/bin/environmate --config /path/to/my/conf.yml
|
108
|
+
$ /opt/puppetlabs/puppet/bin/environmate --config /path/to/my/conf.yml --rack_env production
|
109
109
|
|
110
110
|
Here is a complete example config:
|
111
111
|
|
112
112
|
production:
|
113
113
|
environment_path: '/etc/puppetlabs/code/environments'
|
114
114
|
|
115
|
-
lockfile_path: '/var/run/lock/
|
115
|
+
lockfile_path: '/var/run/lock/environmate_deploy'
|
116
116
|
lockfile_options:
|
117
117
|
timeout: 300
|
118
118
|
|
@@ -124,6 +124,7 @@ Here is a complete example config:
|
|
124
124
|
master_path: '/etc/puppetlabs/code/environmate_master'
|
125
125
|
|
126
126
|
dynamic_environments_prefix: 'env/'
|
127
|
+
install_modules_command: 'librarian-puppet install --destructive'
|
127
128
|
|
128
129
|
static_environments:
|
129
130
|
nonprod:
|
@@ -140,7 +141,7 @@ Here is a complete example config:
|
|
140
141
|
|
141
142
|
server_settings:
|
142
143
|
:Port: 4443
|
143
|
-
:
|
144
|
+
:Host: '0.0.0.0'
|
144
145
|
:SSLEnable: true
|
145
146
|
:SSLCertificate: '/path/to/your/cert.pem'
|
146
147
|
:SSLPrivateKey: '/path/to/your/key.pem'
|
@@ -166,11 +167,11 @@ revisions. If no good starting point can be evaluated it will default to the mas
|
|
166
167
|
To easily debug environmate you can start it manually with the foreground flag to get all
|
167
168
|
the log output to the console. This way you don't have to adjust the config:
|
168
169
|
|
169
|
-
$ /opt/puppetlabs/puppet/bin/environmate --foreground --verbosity DEBUG
|
170
|
+
$ /opt/puppetlabs/puppet/bin/environmate --foreground --verbosity DEBUG --rack_env production
|
170
171
|
|
171
172
|
If you want to see stacktraces add the trace flag:
|
172
173
|
|
173
|
-
$ /opt/puppetlabs/puppet/bin/environmate --foreground --verbosity DEBUG --trace
|
174
|
+
$ /opt/puppetlabs/puppet/bin/environmate --foreground --verbosity DEBUG --rack_env production --trace
|
174
175
|
|
175
176
|
## Contributing
|
176
177
|
|
data/environmate.gemspec
CHANGED
@@ -11,10 +11,16 @@ Gem::Specification.new do |spec|
|
|
11
11
|
|
12
12
|
spec.summary = 'Manage Puppet environments with a GIT workflow'
|
13
13
|
spec.description = 'Environmate is a Webhook receiver for various GIT '\
|
14
|
-
'web frontends for deloying Puppet environments to'\
|
14
|
+
'web frontends for deloying Puppet environments to '\
|
15
15
|
'the master/server'
|
16
16
|
spec.homepage = 'https://github.com/puzzle/environmate'
|
17
17
|
spec.license = 'GPL-3.0'
|
18
|
+
spec.metadata = {
|
19
|
+
'bug_tracker_uri' => 'https://github.com/puzzle/environmate/issues',
|
20
|
+
'changelog_uri' => 'https://github.com/puzzle/environmate/blob/master/CHANGELOG.md',
|
21
|
+
'documentation_uri' => 'https://github.com/puzzle/environmate/blob/master/README.md',
|
22
|
+
'source_code_uri' => 'https://github.com/puzzle/environmate',
|
23
|
+
}
|
18
24
|
|
19
25
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
20
26
|
f.match(%r{^(test|spec|features)/})
|
data/exe/environmate
CHANGED
@@ -18,7 +18,7 @@ parser = OptionParser.new do|opts|
|
|
18
18
|
options[:config_file] = config_file
|
19
19
|
end
|
20
20
|
|
21
|
-
opts.on('-e', '--rack_env
|
21
|
+
opts.on('-e', '--rack_env RACK_ENV', 'Rack environment') do |rack_env|
|
22
22
|
ENV['RACK_ENV'] = rack_env
|
23
23
|
end
|
24
24
|
|
data/lib/environmate/app.rb
CHANGED
@@ -9,6 +9,7 @@ module Environmate
|
|
9
9
|
class App < Sinatra::Base
|
10
10
|
|
11
11
|
def self.run!(options = {})
|
12
|
+
set :environment, ENV['RACK_ENV'] unless ENV['RACK_ENV'].nil?
|
12
13
|
Environmate.load_configuration(settings.environment.to_s, options[:config_file])
|
13
14
|
configuration = Environmate.configuration
|
14
15
|
|
@@ -13,8 +13,11 @@ module Environmate
|
|
13
13
|
unless File.exists?(config_file)
|
14
14
|
raise "Configuration file #{config_file} does not exist"
|
15
15
|
end
|
16
|
-
config = YAML.load_file(config_file)
|
17
|
-
|
16
|
+
config = YAML.load_file(config_file)
|
17
|
+
if config[environment].nil?
|
18
|
+
raise "No configuration for environment '#{environment}' found in file #{config_file}"
|
19
|
+
end
|
20
|
+
@configuration = config_defaults.merge(config[environment])
|
18
21
|
end
|
19
22
|
|
20
23
|
def self.configuration
|
data/lib/environmate/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: environmate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andreas Zuber
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sinatra
|
@@ -151,7 +151,7 @@ dependencies:
|
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0.51'
|
153
153
|
description: Environmate is a Webhook receiver for various GIT web frontends for deloying
|
154
|
-
Puppet environments
|
154
|
+
Puppet environments to the master/server
|
155
155
|
email:
|
156
156
|
- zuber@puzzle.ch
|
157
157
|
executables:
|
@@ -162,6 +162,7 @@ files:
|
|
162
162
|
- ".gitignore"
|
163
163
|
- ".rspec"
|
164
164
|
- ".travis.yml"
|
165
|
+
- CHANGELOG.md
|
165
166
|
- CODE_OF_CONDUCT.md
|
166
167
|
- Gemfile
|
167
168
|
- LICENSE.txt
|
@@ -187,7 +188,11 @@ files:
|
|
187
188
|
homepage: https://github.com/puzzle/environmate
|
188
189
|
licenses:
|
189
190
|
- GPL-3.0
|
190
|
-
metadata:
|
191
|
+
metadata:
|
192
|
+
bug_tracker_uri: https://github.com/puzzle/environmate/issues
|
193
|
+
changelog_uri: https://github.com/puzzle/environmate/blob/master/CHANGELOG.md
|
194
|
+
documentation_uri: https://github.com/puzzle/environmate/blob/master/README.md
|
195
|
+
source_code_uri: https://github.com/puzzle/environmate
|
191
196
|
post_install_message:
|
192
197
|
rdoc_options: []
|
193
198
|
require_paths:
|