Hi, At work we have all of our deployment logic written in ansible and simply call an ansible playbook from jenkins (gitlab-ci in your case)
Here is a sample project using ansible https://github.com/fmpwizard/mrwilson/tree/master/ansible it has all the roles, code, etc needed to start with a fresh fedora server provided by digital ocean (so bare that it starts by installing python using the raw command and then continues to use regular ansible code) This file: https://github.com/fmpwizard/mrwilson/blob/master/ansible/all_roles.sh shows you the commands your ci would run, depending on what you need. this deploys the binary: ansible-playbook -i hosts/production playbooks/deploy.yml --ask-vault-pass -u root and after it is deployed, ansible-playbook -i hosts/production playbooks/site-state.yml --ask-vault-pass --extra-vars "app_state=restart" -u root restarts systemd No docker in this setup, Hope it helps. Diego On Saturday, August 19, 2017 at 3:03:07 PM UTC-4, Sankar wrote: > > Hi > > I have a golang HTTP server that I am deploying on an AWS EC2 VM, as a > systemd service. > > Right now, I am manually deploying the service as follows: > > 1) vm$ sudo systemctl stop <myservice> > 2) dev$ scp <cross-compiled-binary-from-dev-laptop> <vm> > 3)psql$ Apply migrations manually > 4) vm$ sudo stystemctl start <myserver> > 4) vm$ sudo stystemctl status <myserver> ;# Just to check > > > I maintain my sources in gitlab and my database is postgres. > > I am planning to use gitlab-ci for preparing cross-compiled systemd > binaries and also sqitch for postgres migrations. > > I wanted to ask if there are any advises (or links to > tools/blogposts/scripts) from existing gitlab (or even github+ci) + golang > users, who do continuous deployments already. I can have some downtime and > 100% uptime is not important for me. Also, one instance of my server is > enough and there is no need for HA, load-balancing, etc. as of now, as it > is just an internal low-traffic service. > > I also thought of preparing an ubuntu ppa repository internally, on the > lines of > https://about.gitlab.com/2016/10/12/automated-debian-package-build-with-gitlab-ci/ > > I am not using Docker (containers) because I do not want another layer > which may cause some unknown problems (performance, networking, etc.) which > I do not want to end up debugging. > > Any advises or suggestions or links that would help me ? Thanks. > > Sankar > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.