Pages

Saturday, 11 May 2024

walkaround

 

Getting and running the code

Supported environments: * Linux with Java, Ant, Subversion, Zip, GCC, and Git installed. On Ubuntu, you can install these packages by running sudo apt-get install openjdk-6-jdk ant subversion zip build-essential git-core . * Mac OS X with MacPorts and a few extra packages that you can install by running sudo port install md5sha1sum apache-ant subversion .

Steps to run walkaround: git clone https://code.google.com/p/walkaround/ cd walkaround ./get-third-party-deps cp runant.sample runant chmod +x runant ./runant run

(If ./get-third-party-deps warns you that the certificate for https://svn.apache.org:443 is not trusted, check that the fingerprint is bc:5f:40:92:fd:6a:49:aa:f8:b8:35:0d:ed:27:5e:a6:64:c1:7a:1b (from https://www.apache.org/dev/version-control.html) and enter p to accept permanently.)

The above steps allow you to test walkaround locally by going to http://localhost:8080/ in your browser. You'll see a "New wave" button after going through App Engine's fake login screen. Running walkaround locally is only for testing; for proper persistence, user authentication and access control, and scalability, you have to deploy it to App Engine (see below).


Optionally, if you want to allow walkaround to show participant avatars and import waves from wave.google.com, you should get an OAuth application id:

  • Go to https://code.google.com/apis/console/. All of the settings you are about to make are easy to change later, so don't worry about them too much.
  • Create a new project.
  • Click on "API Access" on the left, then "Create an OAuth2.0 client id".
  • Enter a product name (like MyWalkaround). You can leave the logo empty. Click "Next".
  • Application type: Web application. Next to "Your site or hostname", click on "more options".
  • Authorized redirect URIs: Replace the text in here with http://localhost:8080/authenticate. If you have an application id on App Engine, add a second line https://<your-app-id>.appspot.com/authenticate.
  • Authorized JavaScript origins: Delete the text in here.
  • Click "Create client ID". (I've seen the page say "An unexpected error has occurred. We're looking into it" even though the client ID was created just fine; if you get this message, reload the page a few times to check if the client ID appears.)
  • Copy and paste the client ID and client secret into your runant script.


To deploy walkaround to App Engine:

  • Create an application ID at https://appengine.google.com. Use the default High Replication storage, not Master/Slave.
  • Edit your runant script to put your application id in the app-id parameter.
  • ./deploy Once you've entered your credentials, they will be stored for a day, and you can use ./deploy to re-build and re-deploy.


Optionally, for better responsiveness if you have many users:

  • Enable backends. This is easy but currently not documented; ask on the mailing list how to do this.


To update and re-deploy walkaround:

git pull
./runant war
third_party/appengine-sdk/sdk/bin/appcfg.sh update_indexes build/war

After this, go to the Admin Console and click "Datastore Indexes". Wait until all indexes show status "Serving". Finally, run:

third_party/appengine-sdk/sdk/bin/appcfg.sh update build/war


If ./runant gives you compilation errors, try

rm -rf third_party third_party_src
./get-third-party-deps

and repeat.

from https://code.google.com/archive/p/walkaround/wikis/RunningTheCode.wiki

No comments:

Post a Comment