Posts Tagged google application engine
Before use the settings below, make sure that you uploaded and assigned appropriate SSL certificate to your app project.
Forcing GAE to use https is very easy, just need to mention the option “secure” with value “always” in “app.yaml” file (other options are “optional” for using both http & https (default behavior) and “never” for using http only), the example below in for golang app, the same approach is used for other languages.
application: your-app-here version: 1 runtime: go api_version: go1 - url: /.* script: _go_app secure: always
- Go to Google Developer console and open the project where you want to have an access to storage bucket of another project
- Open menu “Permissions” and go to the tab “Service accounts”
- Copy the account ID marked as “App Engine default service account” (should be something like email@example.com)
- Switch in the console to the project with storage bucket
- Go to the menu “Storage” and call the menu on the bucket you want to share (3 dots on the right side) and select “Edit bucket permissions”
- Add new item with “User” as entity putting there the copied above account ID, select appropriate permission (read, write, owner)
This tutorial will show how to create simple webservice application using GO on Google Application Engine (GAE), I’m going to cover the following topics:
- Creating project in GAE
- Creating and testing application locally
- Using martini package to simplify service development
- Deployment of the services to GAE
First of all, go to Google Developer Console and create new project:
Select project name and open advanced options, make sure that you are selecting the proper region you want to use, it is important as if we are going to add SQL Cloud later to our project and the region of the project & SQL Cloud should be the same to work together.
Give some minutes to Google and you should see the picture as shown below with your project ready to be developed. Copy Project ID (in my case it is tutorial-golang, you will defenitely have different name) to you favourite text editor on your computer, we will need it later when we prepare our first deploy of the application
Sometimes easy things are not so obvious as they really are. If you are using GO language together with Sublime Text and want to have in place such features as code completion, you obviously will start using GoSublime plugin. If you are using GO in GAE (Google Application Engine) for your developments than you need small tuning to make it work.
- First of all, make sure GOROOT and GOPATH are set in your environment (or in Sublime Text settings) and pointing to the GAE version of GO
- Go to GOROOT/bin folder and make a symlink for “goapp” naming it “go”
- Go to GOROOT/pkg folder and make a symlink for “darwin_amd64_appengine” naming it “darwin_amd64”