-
Notifications
You must be signed in to change notification settings - Fork 4
/
README.txt
51 lines (43 loc) · 1.67 KB
/
README.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
This is Facebooks's Tornado Chat demo app,
https://github.com/facebook/tornado/tree/master/demos/chat
which is adapted to use MongoDB for persistence.
Development
===========
# install mongodb,tornado,pymongo,pycurl
python app.py
# visit http://localhost:8888/
Deployment (CloudFoundry)
=========================
First, prepare the CF server:
1. Install ActivePython to /opt/ActivePython-2.7
2. Install dependencies for this application (which should be
automated as part of 'vmc push' in future)::
$ sudo /opt/ActivePython-2.7/bin/pypm -g install tornado pymongo
$ sudo /opt/ActivePython-2.7/bin/pip install pycurl
Then, push using ActiveState's fork of vmc; here's a sample session
(pay attention to 'Application Type' selection and service binding):
$ ~/as/vmc/bin/vmc push activechat
Would you like to deploy from the current directory? [Yn]:
Application Deployed URL: 'activechat.vcap.me'?
Detected a Unknown Application Type, is this correct? [Yn]: n
Select Application Type: (..., Sinatra, Node or Python) Python
Selected Generic Python Application
Memory Reservation [Default:64M] (64M, 128M, 256M, 512M or 1G)
Creating Application: OK
Would you like to bind any services to 'activechat'? [yN]: y
The following system services are available::
1. mongodb
2. mysql
3. redis
Please select one you wish to provision: 1
Specify the name of the service [mongodb-dafcc]:
Creating Service: OK
Binding Service: OK
Uploading Application:
Checking for available resources: OK
Packing application: OK
Uploading (6K): OK
Push Status: OK
Staging Application: OK
Starting Application: OK
$