From e683c9eb1941d83bf620fa0e9957a2a8b80b50f8 Mon Sep 17 00:00:00 2001 From: Joshua Hesketh Date: Sat, 5 Apr 2014 15:58:12 +1100 Subject: [PATCH] Configure swift credentials for workers to push to This change adds credentials as set up by fungi (2014-04-05T03:16:46) http://eavesdrop.openstack.org/irclogs/%23openstack-infra/%23openstack-infra.2014-04-05.log This allows zuul to send signed URL's for workers to push files to on a per-job basis. This change will require a zuul restart, not just a reload! Note this is unreverts the revert in c1b98eaff618b8c739cc02f089ef6fe6c02cbcc3 but is slightly edited hence the lack of a proper revert commit. The reason for the revert has been debugged and was due to rax identity service not providing a catalog entry for swift when a tenant name is provided. Change-Id: I04d3207002f7422b9851515ee88a74b19dd2f248 --- manifests/init.pp | 7 +++++++ templates/zuul.conf.erb | 18 ++++++++++++++++++ 2 files changed, 25 insertions(+) diff --git a/manifests/init.pp b/manifests/init.pp index 3bb13d9..754d7a0 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -34,6 +34,13 @@ class zuul ( $statsd_host = '', $git_email = '', $git_name = '', + $swift_authurl = '', + $swift_user = '', + $swift_key = '', + $swift_tenant_name = '', + $swift_region_name = '', + $swift_default_container = '', + $swift_default_logserver_prefix = '', ) { include apache include pip diff --git a/templates/zuul.conf.erb b/templates/zuul.conf.erb index fba83fb..15c8f40 100644 --- a/templates/zuul.conf.erb +++ b/templates/zuul.conf.erb @@ -30,3 +30,21 @@ git_user_email=<%= git_email %> <% if git_name != "" -%> git_user_name=<%= git_name %> <% end -%> + +<% if swift_authurl != "" -%> +[swift] +authurl=<%= swift_authurl %> +user=<%= swift_user %> +key=<%= swift_key %> +<% if swift_tenant_name != "" -%> +tenant_name=<%= swift_tenant_name %> +<% else -%> +# tenant_name is not provided here as some swift providers +# do not have identity servers that work when tenant_name +# is provided. You may set the tenant_name if necessary +# but otherwise it is unset to accomodate these providers. +<% end -%> +region_name=<%= swift_region_name %> +default_container=<%= swift_default_container %> +default_logserver_prefix=<%= swift_default_logserver_prefix %> +<% end -%>