puppet-forge-server 1.5.3 → 1.6.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a723929299ba18110a14486fd3b1cbe7f03d87ce
4
- data.tar.gz: af3e08d28e54262825afec510df2ac1fc8bd7e70
3
+ metadata.gz: a171b2b28c33323c957641164b1a785700ea6372
4
+ data.tar.gz: 35cfa215febc8ccf95dbbfa0165ddfdc40a051cc
5
5
  SHA512:
6
- metadata.gz: 934f75a71637bf473d1d06aed921d6d9d4441ee294bba6a9d68e27bdb5b526b114ee9c31897d3734895dd7fb6082337369c03e05ecdf8470ad0de353aa7b7ceb
7
- data.tar.gz: a379ebd7356d498e71e72247bca25606841074bacef3d3b1d17ddba30d8da9195d30e5323fabbc4542ef389a9813ce8a06c953f60cd5e43f947e4334455bd0aa
6
+ metadata.gz: f94bc68aa70ab4cc0c294768bb8d94e4b1f7a9047b29499049b937f5c0d57e0be7b5972527a7afbb1edd69d81b59207640274a7264faab123dfc96dd270786e7
7
+ data.tar.gz: 2e329e028ae4385997e450ef9349e18a8431c9d673c8ecf59564de45e56599fe056ad158c73a6573f897fbb1e57d1a229a28b902fb59cd9e270a343ab5826b2f
data/README.md CHANGED
@@ -138,6 +138,46 @@ sudo -u forge puppet-forge-server -D -m /opt/forge/modules -x https://forgeapi.p
138
138
 
139
139
  You are done. Now go install some puppet modules.
140
140
 
141
+ ### Behind Apache (Passenger Support)
142
+
143
+ Apache virtualhost config:
144
+ ```
145
+ <VirtualHost *:80>
146
+ ServerName localhost
147
+ DocumentRoot /opt/forge/public
148
+ <Directory /opt/forge/public>
149
+ Allow from all
150
+ Options -MultiViews
151
+ Require all granted
152
+ </Directory>
153
+ </VirtualHost>
154
+ ```
155
+
156
+ Create a `config.ru` one folder down from the Apache DocumentRoot, eg: /opt/forge/config.ru:
157
+ ```
158
+ require 'rubygems'
159
+ require 'puppet_forge_server'
160
+
161
+ # Set base cache directory for proxy backends
162
+ cache_dir = '/opt/forge/cache' # default: File.join(Dir.tmpdir.to_s, 'puppet-forge-server', 'cache')
163
+
164
+ # Create backends
165
+ backends = [
166
+ PuppetForgeServer::Backends::Directory.new('/opt/forge/modules'),
167
+ # Add directory backend for serving cached modules in case proxy flips over
168
+ PuppetForgeServer::Backends::Directory.new(cache_dir),
169
+ PuppetForgeServer::Backends::ProxyV3.new('https://forgeapi.puppetlabs.com', cache_dir)
170
+ ]
171
+
172
+ # Disable access logging, log errors to STDERR
173
+ PuppetForgeServer::Logger.set({:server => STDERR, :access => File.open(File::NULL, "w")})
174
+
175
+ # Run
176
+ run PuppetForgeServer::Server.new.build(backends, PuppetForgeServer::Utils::OptionParser.class_eval('@@DEFAULT_WEBUI_ROOT'))
177
+ ```
178
+
179
+ You can now connect to http://localhost and see the web interface, start using and adding modules in the same way as you would running as a Daemon.
180
+
141
181
  ## Web UI
142
182
 
143
183
  Puppet forge server comes with built-in web UI looking very similar to the official puppet forge web page and providing a simple module search feature. Each view haml file corresponds to the request endpoint; for example **/** or index is formed by the index.haml located in the *views* directory and obviously combined with layout.haml that is being refered to during any request.
@@ -97,7 +97,11 @@ module PuppetForgeServer
97
97
  case type
98
98
  when 'Proxy'
99
99
  @log.info "Detecting API version for #{url}..."
100
- PuppetForgeServer::Backends.const_get("#{type}V#{get_api_version(url)}").new(url.chomp('/'), options[:cache_basedir])
100
+ [
101
+ PuppetForgeServer::Backends.const_get("#{type}V#{get_api_version(url)}").new(url.chomp('/'), options[:cache_basedir]),
102
+ # Add directory backend for serving cached modules in case proxy flips over
103
+ PuppetForgeServer::Backends.const_get('Directory').new(options[:cache_basedir])
104
+ ]
101
105
  else
102
106
  PuppetForgeServer::Backends.const_get(type).new(url)
103
107
  end
@@ -15,5 +15,5 @@
15
15
  # limitations under the License.
16
16
 
17
17
  module PuppetForgeServer
18
- VERSION = '1.5.3'
18
+ VERSION = '1.6.0'
19
19
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppet-forge-server
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.3
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilja Bobkevic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2015-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra