News for hackers. Stuff that matters.
Re:Building our first app in Go by thibaut_barrere on Thursday August 29, 2013 @04:54AM (#6294920)
Can anyone with experience on this share what are their preferred (http) Go deployment option?
Re:Building our first app in Go by pearkes on Thursday August 29, 2013 @08:19AM (#6295381)
If you're using Puppet and like upstart, check out geetarista's go deployment workflow, simple and straight forward.

Locally compile go binary for target platform, upload to S3 (with a makefile + s3cmd), puppet runs, downloads version from s3 with shell script, unpacks, puts in bin, upstart starts and keeps service running.

https://github.com/geetarista/go-boilerplate

https://github.com/geetarista/puppet-go-boilerplate

Re:Building our first app in Go by MindTwister on Thursday August 29, 2013 @05:22AM (#6294980)
So far, copy the binary to the server, add it as a service in upstart, and start the service.

When updating the application, copy the binary to the server and restart the service.

Re:Building our first app in Go by simonw on Thursday August 29, 2013 @05:34AM (#6295007)
Could you share an example upstart configuration?
Re:Building our first app in Go by realrocker on Thursday August 29, 2013 @05:39AM (#6295018)
Sorry for the self-plug: https://coderwall.com/p/iekaog. Too big to post here.
Re:Building our first app in Go by MindTwister on Thursday August 29, 2013 @07:42AM (#6295284)
Saves me the trouble ^^

I actually think i got the inspiration for mine from that post.

Re:Building our first app in Go by simonw on Thursday August 29, 2013 @06:36AM (#6295147)
Thanks, very handy.
Re:Building our first app in Go by borton on Thursday August 29, 2013 @10:01AM (#6295857)
See the upstart documentation for examples. There are no special requirements for running a Go program with upstart.
Re:Building our first app in Go by andreros on Thursday August 29, 2013 @05:42AM (#6295026)
I would recommend Supervisord (http://supervisord.org/).

To update app: Copy new binary, "supervisorctl restart myapp", done.

This will probably result in dropped requests if you aren't using a reverse proxy or load balancer in the middle.

Re:Building our first app in Go by flenter on Thursday August 29, 2013 @06:35AM (#6295144)
Another Go article currently also on the front page uses heroku as the deployment platform:

Build, test and deploy a Go application to Heroku (https://news.ycombinator.com/item?id=6294921)

Re:Building our first app in Go by patrickg on Thursday August 29, 2013 @10:18AM (#6295951)
I have a git repository on the server & push to that repository. On the server, I just pull, compile the binary and use upstart (service xyz restart) to restart the binary. Not nice, because I kill all connections. I'll switch to something more elaborate when I'll have more users on the web service.
Re:Building our first app in Go by jessevdk on Thursday August 29, 2013 @11:41AM (#6296421)
If you're interested in zero down time for a go service, then check out goagain [1], inspired by Unicorn. It uses simple fd passing to restart itself, passing the listening socket.

[1]: https://github.com/rcrowley/goagain

Re:Building our first app in Go by patrickg on Sunday September 01, 2013 @08:48AM (#6310151)
Thanks for the pointer! I remember seeing this, but I forgot about it. Glad to have it back.
Re:Building our first app in Go by silasb on Thursday August 29, 2013 @08:16AM (#6295371)
For simple stuff I've been doing `nohub ./go-binary &`
Re:Building our first app in Go by VeejayRampay on Thursday August 29, 2013 @09:07AM (#6295565)
Small typo, I guess it should read nohup.