A modular, vendor-neutral API, that wraps provisioning instructions for all CDN vendors that support it.
Go to file
amitgandhinz 054b6934b8 fixing references 2014-02-12 16:57:33 -05:00
cdn fixing references 2014-02-12 16:57:33 -05:00
etc Initial Commit 2014-02-12 11:33:37 -05:00
.gitignore renamed readme.md to readme.rst 2014-02-12 11:47:28 -05:00
AUTHORS.rst Initial Commit 2014-02-12 11:33:37 -05:00
HACKING.rst fixing references 2014-02-12 16:57:33 -05:00
LICENSE Initial commit 2014-02-12 08:30:06 -08:00
MANIFEST.in Initial Commit 2014-02-12 11:33:37 -05:00
README.rst fixing references 2014-02-12 16:57:33 -05:00
requirements.txt Initial Commit 2014-02-12 11:33:37 -05:00
setup.cfg Initial Commit 2014-02-12 11:33:37 -05:00
setup.py Initial Commit 2014-02-12 11:33:37 -05:00
test-requirements.txt Initial Commit 2014-02-12 11:33:37 -05:00
tox.ini fixing references 2014-02-12 16:57:33 -05:00

README.rst

CDN

CDN Service

Running a local CDN server with MongoDB

Note: These instructions are for running a local instance of CDN and not all of these steps are required. It is assumed you have MongoDB installed and running.

  1. From your home folder create the ~/.cdn folder and clone the repo:

    $ cd
    $ mkdir .cdn
    $ git clone https://github.com/rackerlabs/cdn.git
  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
  3. Find the [drivers:storage:mongodb] section in ~/.cdn/cdn.conf and modify the URI to point to your local mongod instance:

    uri = mongodb://$MONGODB_HOST:$MONGODB_PORT
  4. For logging, find the [DEFAULT] section in ~/.cdn/cdn.conf and modify as desired:

    log_file = server.log
  5. Change directories back to your local copy of the repo:

    $ cd cdn
  6. Run the following so you can see the results of any changes you make to the code without having to reinstall the package each time:

    $ pip install -e .
  7. Start the CDN server:

    $ cdn-server
  8. Test out that CDN is working by requesting the home doc:

    $ curl -i -X GET http://127.0.0.1:8888/v1/

You should get an HTTP 201 along with some headers that will look similar to this:

HTTP/1.0 201 Created
Date: Fri, 25 Oct 2013 15:34:37 GMT
Server: WSGIServer/0.1 Python/2.7.3
Content-Length: 0
Location: /v1/queues/samplequeue