Permalink
Browse files

Make swift proxy-server.conf honor the use_swauth variable and set up…

… swauth appropriately
  • Loading branch information...
1 parent f2bab51 commit 1f000d50a84bdb3e9be43ca4642d093b15eaa0a0 @rpedde rpedde committed Jul 7, 2011
Showing with 18 additions and 11 deletions.
  1. +4 −0 modules/swift-proxy/manifests/init.pp
  2. +11 −10 modules/swift-proxy/templates/proxy-server.conf.erb
  3. +3 −1 test.yaml.sample
@@ -1,3 +1,7 @@
class swift-proxy {
+ if $use_swauth {
+ require "swift-swauth"
+ }
+
include swift-proxy::install, swift-proxy::config, swift-proxy::service
}
@@ -15,11 +15,19 @@ pipeline = healthcheck cache tempauth proxy-server
use = egg:swift#proxy
allow_account_management = <%= swauth_allow_account_management %>
+<% if use_swauth %>
[filter:swauth]
-use = egg:swift#swauth
-default_swift_cluster = local#http://192.168.254.11:8080/v1
-# Highly recommended to change this key to something else!
+use = egg:swauth#swauth
+default_swift_cluster = local#<%= swauth_endpoint %>
super_admin_key = <%= swauth_super_admin_key %>
+<% else %>
+[filter:tempauth]
+use = egg:swift#tempauth
+user_admin_admin = admin .admin .reseller_admin
+user_test_tester = testing .admin
+user_test2_tester2 = testing2 .admin
+user_test_tester3 = testing3
+<% end %>
[filter:healthcheck]
use = egg:swift#healthcheck
@@ -28,10 +36,3 @@ use = egg:swift#healthcheck
use = egg:swift#memcache
# multi-proxy config not supported
memcache_servers = localhost:11211
-
-[filter:tempauth]
-use = egg:swift#tempauth
-user_admin_admin = admin .admin .reseller_admin
-user_test_tester = testing .admin
-user_test2_tester2 = testing2 .admin
-user_test_tester3 = testing3
View
@@ -16,9 +16,11 @@
"root_password": "changeme",
"root_authorized_keys": "ssh-dss AAAAV <snip> iwJD== foo@foo.bar.com",
+ "use_swauth": true,
"swift_hash_suffix": "changeme",
"swauth_allow_account_management": "false",
- "swauth_super_admin_key": "changeme"
+ "swauth_super_admin_key": "changeme",
+ "swauth_endpoint": "http://#{swift-proxy-node}:8080/v1",
"mysql_vip": "#{nova-infra}",
"api_vip": "#{nova-infra}",

0 comments on commit 1f000d5

Please sign in to comment.