Skip to content

Deployments

Cheikh Seck edited this page Dec 23, 2018 · 8 revisions

Deployments

samb currently supports direct deployments to Google app engine. samb aims to support other cloud providers in the future.

Deploying to Google app engine

Download and install the following command to generate the source code needed to deploy your samb project to app engine.

go get github.com/cheikhshift/samb/cmd/samb-engine

Run the following command to generate the source needed for app engine.

samb-engine -file=<ENTRY POINT FILE, RELATIVE TO PROJECT> -project=<PATH TO PROJECT>

Once the source is generated, change your terminal's working directory to <PATH TO PROJECT>/cmd/appengine. Then run the following command to create your project, if you haven't already : The following command used is provided by Google. You can learn more about it here

gcloud app create

Deploy to app engine with command :

gcloud app deploy

Troubleshooting : If your deployment fails, trying to find package : google.golang.org/appengine, vendor in your dependencies. While in the appengine directory, run dep -init (if you haven't). Within the vendor directory, remove the copy of the project you are working on to have the latest version of your code deployed. You may also run dep in your top level package and skip modifying the vendor folder.

Deploy tool

The samb package also features a command to deploy your project, with one invocation.

Download

Run the following command to download and install the program.

go get github.com/cheikhshift/samb/cmd/samb-deploy-gcp
Run the following command to display the program's options.
samb-deploy-gcp -h