Creating a Test Instance on App Engine

At some point, it is a good idea to test your code changes in a real App Engine environment. You may also need a test instance in order to test out the features of chirpradio/chirpradio-machine. Below you will find instructions for deploying and configuring a test instance that is completely separate from the production site.

  1. Go to the App Engine console and, from the top menu, select “Create project”.

  2. Name the project chirpradio-test and hit Create.

  3. Note the project ID. It will be something like chirpradio-test-123.

  4. Go to the directory where you cloned chirpradio/chirpradio.

  5. To upload the code to the new project, run this at the command line:

    appcfg.py -A <your project id> update .
    
  6. Go to http://<your project id>.appspot.com and verify that the site is up.

  7. Go to the API Manager credentials page.

  8. Select Create credentials > Service account key.

  9. Select App Engine default service account, choose JSON, and hit Create. The newly-generated key will be automatically downloaded to your computer.

  10. Connect to your remote datastore using the Remote API Shell:

    GOOGLE_APPLICATION_CREDENTIALS=/path/to/service_account_key.json remote_api_shell.py -s <your project id>.appspot.com
    
  11. To create a new user, run the following code in the shell:

    from auth.models import User
    user = User(email='first.last@email.com', first_name='First', last_name='Last', is_superuser=True)
    user.set_password('password')
    user.save()
    
  12. Go ahead and login using the email and password you set for your user in the Remote API Shell.