[Pkg-puppet-devel] Bug#832536: puppet-master - no upgrade path from 3.7
James Cowgill
jcowgill at debian.org
Wed Jan 11 11:15:32 UTC 2017
Hi,
If it helps, I've been running this glorious hack on my puppet server
for some time and it seems to work OK. I don't know how easy it would
be to convert it to something which can be distributed by Debian though.
This hard-codes the environment to "production" but that could be
worked around.
I mostly wrote it based on the contents of:
https://github.com/puppetlabs/puppetserver/tree/master/src/clj/puppetlabs/services/legacy_routes
# JCOWGILL: Hack to get puppet v3 agents working with puppet v4
# - can be removed once all puppet clients have upgraded to stretch (which has puppet v4)
RewriteEngine On
# Certificate API
RewriteRule ^/production/certificate(.*)/? /puppet-ca/v1/certificate$1?environment=production [PT,L,QSA]
# file_bucket_file, GET should always return text/plain to 3.0 clients
RewriteCond %{REQUEST_METHOD} =GET
RewriteRule ^/production/file_bucket_file/(.*)/? - [env=fbf_get:1]
RewriteCond %{REQUEST_METHOD} =GET
RewriteRule ^/production/file_content/(.*)/? - [env=fbf_get:1]
Header set Content-type text/plain env=fbf_get
RequestHeader set Accept binary env=fbf_get
# file_bucket_file, POST/PUT should use Content-Type: application/octet-stream
RewriteCond %{REQUEST_METHOD} =POST [OR]
RewriteCond %{REQUEST_METHOD} =PUT
RewriteRule ^/production/file_bucket_file/(.*)/? - [env=fbf_post:1]
RequestHeader set Content-Type application/octet-stream env=fbf_post
# Main HTTP API
RewriteRule ^/production/(.*)/? /puppet/v3/$1?environment=production [PT,L,QSA]
# JCOWGILL: end hack
Thanks,
James
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-puppet-devel/attachments/20170111/98ed6aa2/attachment.sig>
More information about the Pkg-puppet-devel
mailing list