Skip to content
nricciar edited this page Sep 14, 2010 · 12 revisions

Park Place, An Amazon S3 Clone

Getting Started, Install Checklist

Before running Park Place we need to make sure we have all the necessary gems installed on our system.

1) Do you have Camping and Rack installed?

gem install camping rack —include-dependancies

2) You need a webserver, any will do (mongrel, webrick, thin, etc)

gem install mongrel

3) Do you have SQLite3 installed? (If you don’t want to mess with the
database driver.)

gem install sqlite3-ruby

4) For additional functionality you can install some optional gems.

Metadata

  • exifr – used to extract metadata for jpeg images

Master/Slave Replication

  • rfuzz – replacement for net/http
  • curb – replacement for net/http

S3 Versioning Support

  • ruby-git – for S3 Versioning (http://doc.s3.amazonaws.com/betadesign/Versioning.html)

Ajax Upload Progress

  • mongrel_upload_progress for nice ajax upload status for large files

Quick Start

Now that you have everything installed to run Park Place it’s time to get your server up and running. You can use any web server that rack supports by supplying the -s option at startup. By default Park Place will attempt to use mongrel.

./bin/parkplace -s mongrel 127.0.0.1 3002

To run Park Park Place in the background simply use the -D startup option. You can set a custom pid file location by supplying the -P option.

./bin/parkplace -D -P /var/run/parkplace.pid 127.0.0.1 3002

Common options:

    -s, --server SERVER              serve using SERVER (defaults to 'mongrel')
        --rackup FILE                specify rack config location (defaults to 'config.ru')
    -d, --directory DIRECTORY        Park Place directory (defaults to ~/.parkplace)
        --[no-]x-sendfile            X-Sendfile support (default enabled)
    -D, --daemonize                  run daemonized in the background
    -P, --pid FILE                   file to store PID (default: parkplace.pid)
    -v, --verbose                    Run verbosely
    -u, --debug                      Debug Mode

Slave replication options

    -r, --replicate HOSTNAME         Mirror master server
        --replicate-secret KEY       secret key for replication
        --replicate-user USERNAME    for authentication (defaults to 'admin')

Specific options

    -h, --help                       Show this message
        --version                    Show version
Clone this wiki locally