Coder Social home page Coder Social logo

cloudfoundry-buildpack-go's Introduction

Cloudfoundry Buildpack: Go

This is an experimental Cloudfoundry buildpack for Go.

It is heavily based on existing Heroku Buildpack created by Keith Rarick. However it had to be modified to accomodate to the fact that the current CF v2 stack does not come with installed Python header files. Therefore Mercurial, as well as Bazaar, needs to be installed as a pure Python libs, i.e. without native C bindings.

In order to speed things up a bit the compile script caches Go binaries as well as the Mercurial and Bazaar sources.

Besides the actual source code, the following files must be present in the root folder of your application:

  • .godir - contains the desired name of the final binary
  • Procfile - specifies the type of the application and the actual command executed when the instance is started

##Example

$ git clone https://github.com/michaljemala/hello-go.git
$ cd hello-go/
$ cf push --buildpack https://github.com/michaljemala/cloudfoundry-buildpack-go.git --name <APP_NAME> --instances 1 --memory 64M --domain cfapps.io --host <SUBDOMAIN_NAME> --force
Creating <APP_NAME>... OK

Binding <SUBDOMAIN_NAME>.cfapps.io to <APP_NAME>... OK
Uploading <APP_NAME>... OK
Starting <APP_NAME>... OK
-----> Downloaded app package (4.0K)
Initialized empty Git repository in /tmp/buildpacks/cloudfoundry-buildpack-go.git/.git/
Installing cloudfoundry-buildpack-go.git.
-----> Installing Go 1.1.1... done in 47s
-----> Installing Virtualenv... done
-----> Downloading Mercurial sources... done in 19s
-----> Installing Mercurial... done
-----> Downloading Bazaar sources... done in 12s
-----> Installing Bazaar... done
-----> Running 'go get -tags cf ./...'... done in 31s
-----> Uploading staged droplet (1.4M)
-----> Uploaded droplet
Checking <APP_NAME>...
Staging in progress...
Staging in progress...
Staging in progress...
  0/1 instances: 1 starting
  1/1 instances: 1 running
OK
$ curl -I http://<SUBDOMAIN_NAME>.cfapps.io/
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Connection: keep-alive
Date: Wed, 19 Jun 2013 17:36:42 GMT
Server: XMS (724Solutions HTA XMP_40_M2_B083 20091027.165340)

cloudfoundry-buildpack-go's People

Contributors

michaljemala avatar

Watchers

James Cloos avatar Takeshi Morikawa avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.