Deploy The Tornado Chat Demo On The Stackato PaaS Sandbox

stackato logo

ActiveState have recently released their Stackato PaaS (Platform-as-a-Service) which is based on VMware’s open-source PaaS, Cloud Foundry, and offers an enterprise PaaS solution that will run on any public cloud, private cloud, laptop or desktop.

In this blog post I’ll go through an example, in repeatable steps, of how to get up and running with the Tornado chat demo on ActiveState’s public sandbox for Stackato.

Tornado is an event-driven application framework written in Python. It is used by Quora, Summify, Facebook, Friendfeed and my own Stackato supports a multitude of languages and frameworks, so Tornado could be swapped out with one of the many other demos available, which include PHP, Perl, Ruby, Node.js, Java or Clojure. Although the JVM languages (Java and Clojure) are currently not supported due to their heavy resource requirements. This demo application also uses MongoDB as its backend datastore.

Get An ActiveState Account

Sign up for an ActiveState account

You get the usual verification email to confirm your email address.

Install The Stackato Client

The server software and various virtual machines, which contain the pre-installed server software, is available for download, we do not need them, since here we are using the ActiveState’s sandbox for all our server requirements.

Download Stackato Client (v0.18 at time of writing this).

chmod +x stackato-
mv stackato- /usr/local/bin/stackato

Note: Be sure /usr/local/bin is in your $PATH before continuing

Sandbox Terms and Services

I thought I’d include the limitations of what you can do with the Sandbox.

  • You can use the Sandbox at no charge for up to 45 days
  • It is not for production use
  • Applications launched will resolve to a * URL
  • Account resources is limited to 256Mb application memory, 10Gb disk-space and 50Gb bandwidth
  • Maximum of 2 applications (Python, Perl, Ruby, Node.Js, or other languages as supported in the Sandbox)
  • Maximum of 2 services which represent a given database, such as MySQL, MongoDB, Redis, or Postgres

You should read the full terms and services for more details.

Obtaining Stackato Sandbox Access

Request access to the Stackato Sandbox from the main Stackato page.

You can find your Sandbox username and password on your ActiveState account page.

Deploying The Demo Application

First inform the stackato client which Stackato installation your will be deploying to. ActiveState’s Stackato Sandbox is found at, so we run the following command.

$ stackato target

Successfully targeted to []

Next, login to Stackato using stackato login.

$ stackato login

Email: <your email>
Password: ****************
Successfully logged into []

Checkout the demo applications, from github, locally onto your machine.

$ cd ~/src
$ git clone

Cloning into stackato-samples...
remote: Counting objects: 2353, done.
remote: Compressing objects: 100% (1152/1152), done.
remote: Total 2353 (delta 1067), reused 2319 (delta 1033)
Receiving objects: 100% (2353/2353), 1.05 MiB | 275 KiB/s, done.
Resolving deltas: 100% (1067/1067), done.

Choose your demo application by simply cd’ing into that directory…

$ cd stackato-samples/python/tornado-chat-mongo

The first time I ran the deployment I just accepted all the defaults…

$ stackato push tornado-chat

Would you like to deploy from the current directory ?  [Yn]:
Application Deployed URL []:
Application Url:
Detected a Python Application, is this correct ?  [Yn]:
Memory Reservation [64M]:
Creating Application [tornado-chat]: Error 701: The URI: '' has already been taken or reserved

The default domain is already taken, so I’ll need to come up with another one.

Let’s run stackato push tornado-chat again, but this time use a custom sub-domain…

$ stackato push tornado-chat

Would you like to deploy from the current directory ?  [Yn]:
Application Deployed URL []:
Application Url:
Detected a Python Application, is this correct ?  [Yn]:
Memory Reservation [64M]:
Creating Application [tornado-chat]: OK
Creating mongodb Service [mongo-chat]: OK
Binding Service [mongo-chat]: OK
Uploading Application [tornado-chat]:
  Checking for available resources: OK
  Packing application: OK
  Uploading (7K): 100% OK
Push Status: OK
Staging Application [tornado-chat]: OK
Starting Application [tornado-chat]: OK

Our App In Action

$ stackato apps

| Application  | # | Health  | URLS                                     | Services   |
| tornado-chat | 1 | RUNNING | | mongo-chat |

On visiting my custom sub-domian, we encounter the Google OAuth login. is asking for some information from your Google Account

After clicking “Allow”, we’re taken to the rather basic chat interface that is the Tornado Chat demo.

We are logged in our as Google Accounts user and can start chatting!


Stop The Chatter

We can stop the application, if we intend to restart again.

$ stackato stop tornado-chat
$ stackato apps

| Application  | # | Health  | URLS                                     | Services   |
| tornado-chat | 1 | STOPPED | | mongo-chat |

Encase you are curious, this is what you’ve seen when you visit your sub-domain for this app…



No application is currently registered at this URL. If you are the site owner,
please make sure that your application is in RUNNING state by running the
`stackato stats 

Or we can simply delete it from the Sandbox.

$ stackato delete tornado-chat

Provisioned service [mongo-chat] detected would you like to delete it ?:  [yN]: y
Deleting application [tornado-chat]: OK
Deleting service [mongo-chat]: OK

$ stackato apps

No Applications


The Stackato sandbox gives you a great way to get a small taste of what Stackato is all about. When you graduate past using the sandbox, you will want to look at the “micro-cloud”. It’s free indefinitely for non-commercial use.



  1. jiaxiaolei

    hi, phil:

    I read your words about stackato in python-tornado groups, and according to your gudiance I finished a server in ~/src/stackato-samples/python of my own computer. you can find it in “”

    A couple advises may be provided as follows:

    1: when you try to login, the default url is “https://api.stackato.local”, so :

    $ stackato login
    Attempting login to [https://api.stackato.local]
    Email: [email protected]
    Password: ****************
    Cannot access target (couldn’t open socket: host is unreachable (Name or service not known)

    In my view, some description like below should be appeared in your blog, do you think so ? :D

    $ stackato target
    Successfully targeted to []

    2:Use the tornado-chat-mongo, I push my app in ActiveState. You can see in the url
    okay, compared with your blog, it’s ugly!
    so, can you tell me what did you do about the blog we were watching ?
    Any response will be welcome!