corrected Readme file and conf files

This commit is contained in:
amitgandhinz 2014-02-13 09:36:07 -05:00
parent b548e54273
commit b8642144dc
4 changed files with 65 additions and 30 deletions

View File

@ -18,8 +18,8 @@ installed and running.
2. Copy the CDN config files to the directory ``~/.cdn``::
$ cp cdn/etc/cdn.conf-sample ~/.cdn/cdn.conf
$ cp cdn/etc/logging.conf-sample ~/.cdn/logging.conf
$ cp cdn/etc/cdn.conf ~/.cdn/cdn.conf
$ cp cdn/etc/logging.conf ~/.cdn/logging.conf
3. Find the ``[drivers:storage:mongodb]`` section in
``~/.cdn/cdn.conf`` and modify the URI to point
@ -47,16 +47,17 @@ installed and running.
8. Test out that CDN is working by requesting the home doc::
$ curl -i -X GET http://127.0.0.1:8888/v1/
$ curl -i -X GET http://0.0.0.0:8888/v1
You should get an **HTTP 201** along with some headers that will look
You should get an **HTTP 200** along with some headers that will look
similar to this::
HTTP/1.0 201 Created
Date: Fri, 25 Oct 2013 15:34:37 GMT
HTTP/1.0 200 OK
Date: Thu, 13 Feb 2014 14:34:21 GMT
Server: WSGIServer/0.1 Python/2.7.3
Content-Length: 0
Location: /v1/queues/samplequeue
Content-Length: 464
Content-Type: application/json-home
Cache-Control: max-age=86400
.. _`OpenStack` : http://openstack.org/

View File

@ -22,8 +22,9 @@ import six
import cdn.openstack.common.log as logging
from cdn import transport
import v1, hosts
from cdn.transport.falcon import (
v1, hosts
)
_WSGI_OPTIONS = [

View File

@ -14,12 +14,6 @@ log_file = /var/log/cdn/cdn.log
;auth_strategy =
# Set to True to enable sharding across multiple storage backends
;sharding = False
# Set to True to activate endpoints to manage the shard registry
;admin_mode = False
# ================= Syslog Options ============================
# Send logs to syslog (/dev/log) instead of to file specified
@ -32,23 +26,13 @@ log_file = /var/log/cdn/cdn.log
# ================= Driver Options ============================
[drivers]
# Transport driver module (e.g., wsgi, zmq)
# Transport driver module (e.g., falcon, pecan)
transport = falcon
# Storage driver module (e.g., mongodb, sqlite)
# Storage driver module (e.g., mongodb, sqlite, cassandra)
storage = mongodb
[drivers:transport:falcon]
;bind = 0.0.0.0
;port = 8888
;[drivers:transport:pecan]
;bind = 0.0.0.0
;port = 8888
[drivers:storage:mongodb]
uri = mongodb://db1.example.net,db2.example.net:2500/?replicaSet=test&ssl=true&w=majority
database = cdn
bind = 0.0.0.0
port = 8888

49
etc/logging.conf Normal file
View File

@ -0,0 +1,49 @@
[loggers]
keys=root,server,combined
[formatters]
keys=normal,normal_with_name,debug
[handlers]
keys=production,file,devel
[logger_root]
level=NOTSET
handlers=devel
[logger_server]
level=DEBUG
handlers=devel
qualname=cdn-server
[logger_combined]
level=DEBUG
handlers=devel
qualname=cdn-combined
[handler_production]
class=handlers.SysLogHandler
level=ERROR
formatter=normal_with_name
args=(('localhost', handlers.SYSLOG_UDP_PORT), handlers.SysLogHandler.LOG_USER)
[handler_file]
class=FileHandler
level=DEBUG
formatter=normal_with_name
args=('cdn.log', 'w')
[handler_devel]
class=StreamHandler
level=NOTSET
formatter=debug
args=(sys.stdout,)
[formatter_normal]
format=%(asctime)s %(levelname)s %(message)s
[formatter_normal_with_name]
format=(%(name)s): %(asctime)s %(levelname)s %(message)s
[formatter_debug]
format=(%(name)s): %(asctime)s %(levelname)s %(module)s %(funcName)s %(message)s