Merge "Add new version template: yoga"
This commit is contained in:
		
							
								
								
									
										152
									
								
								templates/yoga/proxy-server.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										152
									
								
								templates/yoga/proxy-server.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,152 @@
 | 
			
		||||
# yoga
 | 
			
		||||
[DEFAULT]
 | 
			
		||||
bind_port = {{ bind_port }}
 | 
			
		||||
workers = {{ workers }}
 | 
			
		||||
user = swift
 | 
			
		||||
bind_ip = {{ bind_host }}
 | 
			
		||||
log_name = swift
 | 
			
		||||
log_facility = LOG_LOCAL0
 | 
			
		||||
log_level = {{ log_level }}
 | 
			
		||||
log_address = /dev/log
 | 
			
		||||
log_headers = {{ log_headers }}
 | 
			
		||||
 | 
			
		||||
{% if statsd_host %}
 | 
			
		||||
log_statsd_host = {{ statsd_host }}
 | 
			
		||||
log_statsd_port = {{ statsd_port }}
 | 
			
		||||
log_statsd_default_sample_rate = {{ statsd_sample_rate }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% if ssl %}
 | 
			
		||||
cert_file = {{ ssl_cert }}
 | 
			
		||||
key_file = {{ ssl_key }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% if auth_type == 'keystone' %}
 | 
			
		||||
[pipeline:main]
 | 
			
		||||
{% if transport_url %}
 | 
			
		||||
pipeline = ceilometer catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit formpost authtoken s3api s3token keystoneauth staticweb copy container-quotas account-quotas slo dlo versioned_writes symlink proxy-logging proxy-server
 | 
			
		||||
{% else %}
 | 
			
		||||
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl ratelimit formpost authtoken s3api s3token keystoneauth staticweb copy container-quotas account-quotas slo dlo versioned_writes symlink proxy-logging proxy-server
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% else %}
 | 
			
		||||
[pipeline:main]
 | 
			
		||||
pipeline = catch_errors gatekeeper healthcheck proxy-logging cache container_sync bulk tempurl slo dlo formpost {{ auth_type }} staticweb versioned_writes container-quotas account-quotas proxy-logging proxy-server
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
[app:proxy-server]
 | 
			
		||||
use = egg:swift#proxy
 | 
			
		||||
allow_account_management = true
 | 
			
		||||
{% if auth_type == 'keystone' %}account_autocreate = true{% endif %}
 | 
			
		||||
node_timeout = {{ node_timeout }}
 | 
			
		||||
recoverable_node_timeout = {{ recoverable_node_timeout }}
 | 
			
		||||
{% if enable_multi_region %}
 | 
			
		||||
sorting_method = affinity
 | 
			
		||||
{% if read_affinity %}
 | 
			
		||||
read_affinity = {{ read_affinity }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% if write_affinity %}
 | 
			
		||||
write_affinity = {{ write_affinity }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% if write_affinity_node_count %}
 | 
			
		||||
write_affinity_node_count = {{ write_affinity_node_count }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
[filter:tempauth]
 | 
			
		||||
use = egg:swift#tempauth
 | 
			
		||||
user_system_root = testpass .admin https://{{ proxy_ip }}:8080/v1/AUTH_system
 | 
			
		||||
 | 
			
		||||
[filter:healthcheck]
 | 
			
		||||
use = egg:swift#healthcheck
 | 
			
		||||
 | 
			
		||||
[filter:cache]
 | 
			
		||||
use = egg:swift#memcache
 | 
			
		||||
memcache_servers = {{ memcached_ip }}:11211
 | 
			
		||||
 | 
			
		||||
[filter:account-quotas]
 | 
			
		||||
use = egg:swift#account_quotas
 | 
			
		||||
 | 
			
		||||
[filter:container-quotas]
 | 
			
		||||
use = egg:swift#container_quotas
 | 
			
		||||
 | 
			
		||||
[filter:proxy-logging]
 | 
			
		||||
use = egg:swift#proxy_logging
 | 
			
		||||
 | 
			
		||||
[filter:staticweb]
 | 
			
		||||
use = egg:swift#staticweb
 | 
			
		||||
 | 
			
		||||
[filter:bulk]
 | 
			
		||||
use = egg:swift#bulk
 | 
			
		||||
 | 
			
		||||
[filter:slo]
 | 
			
		||||
use = egg:swift#slo
 | 
			
		||||
{% if static_large_object_segments and static_large_object_segments > 0 %}
 | 
			
		||||
max_manifest_size = 536870912
 | 
			
		||||
max_manifest_segments = {{ static_large_object_segments }}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
[filter:dlo]
 | 
			
		||||
use = egg:swift#dlo
 | 
			
		||||
 | 
			
		||||
[filter:formpost]
 | 
			
		||||
use = egg:swift#formpost
 | 
			
		||||
 | 
			
		||||
[filter:tempurl]
 | 
			
		||||
use = egg:swift#tempurl
 | 
			
		||||
 | 
			
		||||
[filter:catch_errors]
 | 
			
		||||
use = egg:swift#catch_errors
 | 
			
		||||
 | 
			
		||||
[filter:versioned_writes]
 | 
			
		||||
use = egg:swift#versioned_writes
 | 
			
		||||
 | 
			
		||||
[filter:container_sync]
 | 
			
		||||
use = egg:swift#container_sync
 | 
			
		||||
 | 
			
		||||
[filter:gatekeeper]
 | 
			
		||||
use = egg:swift#gatekeeper
 | 
			
		||||
 | 
			
		||||
[filter:ratelimit]
 | 
			
		||||
use = egg:swift#ratelimit
 | 
			
		||||
 | 
			
		||||
[filter:copy]
 | 
			
		||||
use = egg:swift#copy
 | 
			
		||||
 | 
			
		||||
[filter:symlink]
 | 
			
		||||
use = egg:swift#symlink
 | 
			
		||||
 | 
			
		||||
{% if auth_type == 'keystone' %}
 | 
			
		||||
[filter:keystoneauth]
 | 
			
		||||
use = egg:swift#keystoneauth
 | 
			
		||||
operator_roles = {{ operator_roles }}
 | 
			
		||||
 | 
			
		||||
[filter:authtoken]
 | 
			
		||||
paste.filter_factory = keystonemiddleware.auth_token:filter_factory
 | 
			
		||||
www_authenticate_uri= {{ service_protocol }}://{{ service_host }}:{{ service_port }}/v3
 | 
			
		||||
auth_url = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}/v3
 | 
			
		||||
auth_plugin = password
 | 
			
		||||
username = {{ service_user }}
 | 
			
		||||
password = {{ service_password }}
 | 
			
		||||
cache = swift.cache
 | 
			
		||||
include_service_catalog = False
 | 
			
		||||
delay_auth_decision = {{ delay_auth_decision|lower }}
 | 
			
		||||
 | 
			
		||||
[filter:s3token]
 | 
			
		||||
use = egg:swift#s3token
 | 
			
		||||
auth_uri = {{ auth_protocol }}://{{ keystone_host }}:{{ auth_port }}/v3
 | 
			
		||||
 | 
			
		||||
[filter:s3api]
 | 
			
		||||
use = egg:swift#s3api
 | 
			
		||||
{% if location -%}
 | 
			
		||||
location = {{ location }}
 | 
			
		||||
{% endif -%}
 | 
			
		||||
{% endif %}
 | 
			
		||||
 | 
			
		||||
{% if transport_url -%}
 | 
			
		||||
[filter:ceilometer]
 | 
			
		||||
paste.filter_factory = ceilometermiddleware.swift:filter_factory
 | 
			
		||||
url = {{ transport_url }}
 | 
			
		||||
driver = messagingv2
 | 
			
		||||
topic = notifications
 | 
			
		||||
log_level = WARN
 | 
			
		||||
{% endif -%}
 | 
			
		||||
@@ -45,3 +45,15 @@ class ProxyServerTemplateTestCase(unittest.TestCase):
 | 
			
		||||
            self.assertFalse("log_statsd_host" in result)
 | 
			
		||||
            self.assertFalse("log_statsd_port" in result)
 | 
			
		||||
            self.assertFalse("log_statsd_default_sample_rate" in result)
 | 
			
		||||
 | 
			
		||||
    def test_keystonemiddleware_config_for_newer_release(self):
 | 
			
		||||
        """Test template should follow newer keystone middleware config."""
 | 
			
		||||
        release = 'yoga'
 | 
			
		||||
        template = self.get_template_for_release(release)
 | 
			
		||||
        result = template.render(auth_type='keystone')
 | 
			
		||||
        self.assertFalse('signing_dir' in result)
 | 
			
		||||
        self.assertFalse('hash_algorithms' in result)
 | 
			
		||||
 | 
			
		||||
        self.assertTrue('filter:authtoken' in result)
 | 
			
		||||
        self.assertTrue('www_authenticate_uri' in result)
 | 
			
		||||
        self.assertTrue('auth_url' in result)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user