Specifically made for the "Developing Scalable Apps in Python" course
There's a lot of info about doing this course on a linux machine, but I wanted to compile all the up to date info that I had about it in one place, for my reference and for yours.
1) Download the Google App Engine SDK for Linux / Python from this link: Download here!
2) You should check to make sure the download isn't corrupted or fraudulent.
This should give you an identical SHA1 Checksum as to the one you saw on the download page. As of Feb 28 2016, that value is
3) I created a folder called 'lib' in my home directory, and I put Google App Engine in it. In this tutorial we'll be doing the same.
Navigate to your home directory and create a folder called lib
Move the app engine zip file there:
mv /path/to/google_appengine_1.9.33.zip /lib
Unzip the file:
Delete the zip file
4) That's it, it's installed!
On Linux + Python, Google App Engine is used exclusively through the terminal by calling python files inside the Google App Engine folder we made inside lib.
You do this by running something like:
python <app_engine_file> <your_app_folder>
For a more concrete example:
python lib/google_appengine/dev_appserver.py Dev/fsnd/conference/Lesson_2/000_Hello_Endpoints/
That's a lot of of paths to type!
So instead of typing all that out every time let's setup an environment variable.
.bashrc file and add this line to the bottom:
<username> is your username (be sure to replace the <>)
Now instead of typing all those paths we can first navigate to the Lesson_2 folder:
Then simply run
python $GAE/dev_appserver.py 000_Hello_Endpoints
Ahh, much better...
You need to call different python files in the
$GAE folder to perform different functions that you see Karl perform using the Google App Engine GUI on his Mac.
Running your App on Localhost
python $GAE/dev_appserver.py /path/to/your/app/folder/
Pushing your App into Production
python $GAE/appcfg.py update /path/to/your/app/folder/
^^Make sure you get the
update in that one^^
Due to a recent update in the App Engine you have to launch chrome with some special arguments when launching the API Explorer
Unless you installed chrome in anything but the default way, go into the terminal and run:
/usr/bin/google-chrome-stable --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080
This will launch an instance of Chrome that you should only use for the API Explorer. It is safe to ignore the security warning that comes up when Chrome launches
Now you can navigate to http://localhost:8080/_ah/api/explorer
You can add the following line to your
.bashrc file to make a shortcut for launching chrome for the API Explorer
alias apichrome="/usr/bin/google-chrome-stable --user-data-dir=test --unsafely-treat-insecure-origin-as-secure=http://localhost:8080"
Then just type
apichrome into the terminal to launch chrome for the API Explorer
They will come as I proceed through the course.