diff options
| author | termie <github@anarkystic.com> | 2011-03-25 00:17:09 +0000 |
|---|---|---|
| committer | Tarmac <> | 2011-03-25 00:17:09 +0000 |
| commit | fcae955c1521910ade1175a99c7def85e4df36b2 (patch) | |
| tree | bfbf67c99a9cbf1cf1f9d3b322658ed3e95e9da2 /bin | |
| parent | 3d17bd5e44d0bb020e3ff819f401a8498e022418 (diff) | |
| parent | e3dfae1bba0e4f9ff5d64ff5fadb43485e494453 (diff) | |
| download | nova-fcae955c1521910ade1175a99c7def85e4df36b2.tar.gz nova-fcae955c1521910ade1175a99c7def85e4df36b2.tar.xz nova-fcae955c1521910ade1175a99c7def85e4df36b2.zip | |
Ports the Tornado version of an S3 server to eventlet and wsgi, first step in deprecating the twistd-based objectstore.
This is a trivial implementation, never meant for production, it exists to provide an s3-look-alike objectstore for use when developing/testing things related to the amazon APIs (eucatools, etc), any production deployment would be expected to use Swift + an S3 interface.
In later patches I expect to be able to remove the old objectstore code entirely.
Diffstat (limited to 'bin')
| -rwxr-xr-x | bin/nova-objectstore | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/bin/nova-objectstore b/bin/nova-objectstore index 94ef2a8d5..6ef841b85 100755 --- a/bin/nova-objectstore +++ b/bin/nova-objectstore @@ -36,9 +36,10 @@ if os.path.exists(os.path.join(possible_topdir, 'nova', '__init__.py')): gettext.install('nova', unicode=1) from nova import flags +from nova import log as logging from nova import utils -from nova import twistd -from nova.objectstore import handler +from nova import wsgi +from nova.objectstore import s3server FLAGS = flags.FLAGS @@ -46,7 +47,9 @@ FLAGS = flags.FLAGS if __name__ == '__main__': utils.default_flagfile() - twistd.serve(__file__) - -if __name__ == '__builtin__': - application = handler.get_application() # pylint: disable=C0103 + FLAGS(sys.argv) + logging.setup() + router = s3server.S3Application(FLAGS.buckets_path) + server = wsgi.Server() + server.start(router, FLAGS.s3_port, host=FLAGS.s3_host) + server.wait() |
