Permalink
Fetching contributors…
Cannot retrieve contributors at this time
103 lines (69 sloc) 2.61 KB
.. _dotcloud:
========
dotCloud
========
.. default-domain:: mongodb
.. contents:: On this page
:local:
:backlinks: none
:depth: 1
:class: twocols
MongoDB can run on the `dotCloud platform <http://www.dotcloud.com/>`_. It supports
replica sets, and has alpha support for sharding.
The whole point of dotCloud is to run your apps and your databases in
the same place, to optimize for latency and reliability. However, you
can also deploy MongoDB on dotCloud and use it to power an app running
anywhere else.
If You Don't Have a dotCloud Account Yet
----------------------------------------
Well, what are you waiting for? :-)
Go ahead and `create one <https://www.dotcloud.com/accounts/register/>`_ (it's free!) and
install the CLI:
.. code-block:: sh
sudo easy_install pip; sudo pip install dotcloud
If you need help to get the CLI running, check the
`dotCloud install docs <https://docs.dotcloudapp.com/firststeps/install/>`_ and don't
hesitate to `ask for help <http://answers.dotcloud.com/questions/>`_.
With a dotCloud Account
-----------------------
The following snippet will deploy MongoDB on dotCloud for you in no
time:
.. code-block:: sh
mkdir mongodb-on-dotcloud
cat >mongodb-on-dotcloud/dotcloud.yml <<EOF
db:
type: mongodb
EOF
dotcloud push mongorocks mongodb-on-dotcloud
dotcloud info mongorocks.db
The last command will show you the host, port, and credentials to be
used to connect to your database.
Scaling
-------
Assuming you followed the instructions of the previous section, if you
want to get a replica sets of 3 servers:
.. code-block:: sh
dotcloud scale mongorocks db=3
Advanced Use
------------
If you want to have a closer look at your MongoDB server, nothing beats
SSH access:
.. code-block:: sh
dotcloud ssh mongorocks.db
More Docs
---------
- `dotCloud documentation for the MongoDB service <http://docs.dotcloud.com/services/mongodb/>`_
- `generic introduction to dotCloud <http://docs.dotcloud.com/>`_ (in
case you want to run not only MongoDB, but also Node.js, Python,
Ruby, Perl, Java, RabbitMQ, Redis, MySQL, PostgreSQL, CouchDB, Riak,
Erlang, or something else, on dotCloud)
Ready-to-use Apps
-----------------
All you need to do to run them is a ``git clone`` and a ``dotcloud push``:
- `Django setup using MongoDB to store objects <https://github.com/jpetazzo/django-and-mongodb-on-dotcloud>`_
- `MongoDB + Node.js sample app <https://github.com/jpetazzo/MongoPop>`_
Getting help
------------
dotCloud has a `Q&A site <http://answers.dotcloud.com/questions/>`_,
and the dotCloud team can be reached through the FreeNode IRC network
on hash tag "dotcloud".