Skip to content

Instantly share code, notes, and snippets.

@bbangert
Created April 20, 2015 19:18
Show Gist options
  • Save bbangert/e04108b9bb53f99ec6d3 to your computer and use it in GitHub Desktop.
Save bbangert/e04108b9bb53f99ec6d3 to your computer and use it in GitHub Desktop.
Running autopush
First, checkout the code:
$ git clone https://github.com/mozilla-services/autopush.git
$ git clone https://github.com/mozilla-services/simplepush_test.git
Setup the tester (assumes virtualenv is on the path):
$ cd simplepush_test
(simplepush_test/) $ make
Setup the autopush app:
$ cd autopush
-- Get pypy, extract it, and name it 'pypy'
(autopush/) $ make
Copy the boto file to make sure AWS calls go to local mock AWS (if you have a ~/.boto, save that elsewhere first):
(autopush/) $ cp automock/boto.cfg ~/.boto
Run the mock AWS server in the autopush dir:
(autopush/) $ ./pypy/bin/pip install moto
(autopush/) $ ./pypy/bin/moto_server dynamodb2 -p 5000
Run autoendpoint in the autopush dir:
(autopush/) $ ./pypy/bin/autoendpoint
Run autopush in the autopush dir:
(autopush/) $ ./pypy/bin/autopush --ssl_key keys/server.key --ssl_cert keys/server.crt
Now run some load against it with the tester:
(simplepush_test/) $ while (true) { PUSH_SERVER=wss://lmnt:8080/ ./bin/nosetests; }
@bbangert
Copy link
Author

Running a tester that leaks it faster:

docker run -i --env=NOTIFICATION_DELAY=1 --env=NOTIFICATION_COUNT=1 --env=RECONNECT_DELAY=1 bbangert/simpletest:0.9 MACHINEIP 8080 true 200 reconnecter localhost:8215

@arigo
Copy link

arigo commented May 1, 2015

The last command of the main txt should read:

(simplepush_test/) $ while (true) { PUSH_SERVER=wss://localhost:8080/ ./bin/nosetests; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment