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.
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.
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.
15 comments
[ 4.0 ms ] story [ 28.3 ms ] threadWhen updating the application, copy the binary to the server and restart the service.
I actually think i got the inspiration for mine from that post.
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.
Build, test and deploy a Go application to Heroku (https://news.ycombinator.com/item?id=6294921)
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
[1]: https://github.com/rcrowley/goagain