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.
Go to the App Engine console and, from the top menu, select “Create project”.
Name the project chirpradio-test and hit Create.
Note the project ID. It will be something like chirpradio-test-123.
Go to the directory where you cloned chirpradio/chirpradio.
To upload the code to the new project, run this at the command line:
appcfg.py -A <your project id> update .
http://<your project id>.appspot.comand verify that the site is up.
Go to the API Manager credentials page.
Select Create credentials > Service account key.
Select App Engine default service account, choose JSON, and hit Create. The newly-generated key will be automatically downloaded to your computer.
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
To create a new user, run the following code in the shell:
from auth.models import User user = User(email@example.com', first_name='First', last_name='Last', is_superuser=True) user.set_password('password') user.save()
Go ahead and login using the email and password you set for your user in the Remote API Shell.