中科院云平台架构师,专注于数字化、智能化,技术方向:云、Linux内核、AI、MES/ERP/CRM/OA、物联网、传感器、大数据、ML、微服务。
分类: 云计算
2015-02-27 11:09:04
[DEFAULT] bind_port = 8080 bind_ip = 192.168.4.87 user = swift log_level = DEBUG log_facility = LOG_LOCAL3 [pipeline:main] pipeline = healthcheck cache authtoken keystone proxy-server [app:proxy-server] use = egg:swift#proxy all_account_management = true account_autocreate = true [filter:keystone] paste.filter_factory = keystone.middleware.swift_auth:filter_factory operator_roles = admin, swiftoperator [filter:authtoken] paste.filter_factory = keystone.middleware.auth_token:filter_factory delay_auth_decision =1 auth_port = 35357 auth_host = 192.168.4.87 auth_protocol = http admin_token = zhoubing [filter:healthcheck] use = egg:swift#healthcheck [filter:cache] use = egg:swift#memcache memcache_servers = 192.168.4.87:11211
其服务启动顺序 会根据 pipeline 逆序启动,但是当请求来的时候,会调用按照顺序调用filter,例如:
pipeline = filter1 filter2 filter2 myapp
这样会先调用 filter1.__call__(env, start_response)然后是filter2._call__(env,
start_response),依次下去最后是myapp.__call__(env,start_response)。
对于Swift来说,主要的流程在于请求来了->auth_token->swift_auth->handle_request,其
中每个filter对请求做相应的处理 然后返回。
时间比较仓促,还有一些不对的地方。(针对juno4debian)未完待续...