Skip to content
This repository has been archived by the owner on Feb 17, 2024. It is now read-only.

gostones/goboot-starter

Repository files navigation

goboot-starter is a micro service app built upon goboot core packages written in the Go open source programming language. You should be able to install and run this app locally and deploy to General Electric's Predix Cloud Platform to jump start your project in no time.

Watch video: https://youtu.be/q6kKJY2Ho98

Preparation:

You should have git and go installed on your machine before you start. You will also need cf installed and have signed up with Predix (free) if you plan to deploy to Predix Cloud Platform.

To verify, open a terminal and run the following commands:

$go version go version go1.7.5 darwin/amd64

$git --version git version 2.10.0

$cf version cf version 6.21.1+6fd3c9f-2016-08-10

If you see console output similar to the above, you are ready to build and deploy.

If you need to install the tools, please follow the flowing links:

go: https://golang.org/dl/ (choose stable version 1.7.5 only, there are some issues with 1.8.x) git: https://git-scm.com/ cf: https://github.com/cloudfoundry/cli/releases

  1. Build

If you are new to Go and want to learn, you may start here:

https://golang.org/doc/code.html

https://golang.org/

To run goboot-starter locally after you have installed Go:

git clone https://github.com/gostones/goboot-starter.git [my_project]

cd [my_project]

where [my_project] is your prefered directory name (as well as your app name), it will default to goboot-starter if not specified.

To start the app:

sh run.sh

which will execute vendor.sh, build.sh, and start up a simple server.

Open a browser and enter http://localhost:8080, you should see something similar to the following:

{"server":"basic","name":"","version":"","build":"","timestamp":1487367204214}

  1. Deploy

To deploy to GE Predix/Cloud Foundry:

Sign up for a free Predix account at: https://www.predix.io/registration/

cf login -a [predix_endpoint] -u [email] -p [password]

You should have got your password after signing up, to find your predix_endpoint, follow the instructions at: https://www.predix.io/docs/?b=#hOTKiBl-Uva9INX3

For Predix US-West: https://api.system.aws-usw02-pr.ice.predix.io

To deploy to Predix:

sh deploy.sh

You should see APP_URL at the end of the console message if successful.

Congratulations! You have built and run the starter microservice locally and deployed the app to GE Predix platform.

This project is sponsored by GE Aviation

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published