{"id":13753417,"url":"https://github.com/samuell/devbox-golang","last_synced_at":"2026-03-05T14:31:07.870Z","repository":{"id":27943858,"uuid":"31436469","full_name":"samuell/devbox-golang","owner":"samuell","description":"A Vagrant box with Ansible provisioning for setting up a vim-based Go(lang) development environment","archived":false,"fork":false,"pushed_at":"2018-10-22T08:07:43.000Z","size":175,"stargazers_count":85,"open_issues_count":1,"forks_count":23,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-30T07:07:07.114Z","etag":null,"topics":["ansible","golang","vagrant","vagrant-boxes","vagrant-machine","virtualbox"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/samuell.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-02-27T19:54:55.000Z","updated_at":"2023-03-28T04:36:04.000Z","dependencies_parsed_at":"2022-09-04T05:53:44.336Z","dependency_job_id":null,"html_url":"https://github.com/samuell/devbox-golang","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/samuell/devbox-golang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuell%2Fdevbox-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuell%2Fdevbox-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuell%2Fdevbox-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuell%2Fdevbox-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/samuell","download_url":"https://codeload.github.com/samuell/devbox-golang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/samuell%2Fdevbox-golang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30130303,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-05T12:40:50.676Z","status":"ssl_error","status_checked_at":"2026-03-05T12:39:32.209Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","golang","vagrant","vagrant-boxes","vagrant-machine","virtualbox"],"created_at":"2024-08-03T09:01:21.782Z","updated_at":"2026-03-05T14:31:07.833Z","avatar_url":"https://github.com/samuell.png","language":"Shell","readme":"# DevBox-Golong\n*Vagrant box backed by Docker or Virtualbox, with Ansible provisioning*\n\nA Vagrant box (Virtualbox or Docker as providers) with Ansible provisioning\nfor setting up a Vim-based Golang development environment.\n\n![Screenshot](golang-vagrant-ansible.png)\n\n### Note: There are currently problems with the docker version of the script, so please use the virtualbox version until this is solved!\n\n## Ingredients\n\n- [Ubuntu 16.04 \"xenial\" LTS 64bit base image](http://www.ubuntu.com/)\n- [Go(lang) 1.6.2](http://golang.org/)\n- [Vim](http://www.vim.org/)\n- [Fatih's vim-go plugin](https://github.com/fatih/vim-go), providing syntax highlight, gocode integration for autocompletion, and more.\n    - See the [vim-go](https://github.com/fatih/vim-go) README for more info on how you can easily enable additional included features.\n- [GoCode Go completion engine](https://github.com/nsf/gocode)\n- [Git](http://git-scm.com/)\n- [Tig - text mode interface to git](http://jonas.nitro.dk/tig/)\n- [gdb - the GNU debugger](http://www.gnu.org/software/gdb)\n- [cgdb - Curses based user interface to gdb](https://cgdb.github.io)\n\n## Optional ingredients\n\n*Uncomment roles in playbook.yml to enable these.*\n\n- [Valloric's YouCompleteMe](https://github.com/Valloric/YouCompleteMe) for as-you-type completion (NB: Requires uncommenting the YouCompleteMe role in playbook.yml!)).\n- [Apache Mesos](http://mesos.apache.org) - An open source computer cluster manager. (UI on [localhost:5050](http://localhost:5050)).\n\n## Prerequisites\n\n- [Vagrant](https://www.vagrantup.com/)\n- [Ansible](http://www.ansible.com/)\n- [VirtualBox](https://www.virtualbox.org/) (Not required if you use Docker as provider!)\n- [Docker](https://www.docker.com) (Not required if you use Virtualbox as provider!)\n\n### Installing the requirements in Ubuntu (tested with 14.04)\n\n1. Install Virtualbox:\n\t```bash\n\tsudo apt-get install virtualbox\n\t```\n\n2. Install Docker:\n\t```bash\n\tsudo apt-get install docker.io\n\t```\n\n3. Install a recent version of ansible:\n   ```bash\n   sudo apt-get install ansible/trusty-backports\n   ```\n\n   *(if you ubuntu version is \"trusty\", otherwise, replace it with your appropriate version)*\n4. Install Vagrant, by first downloadng the proper .deb file from [vagrantup.com](https://www.vagrantup.com/downloads.html)\n\n5. ... and then installing it with:\n\t```bash\n\tsudo dpkg -i \u003cdeb-file\u003e\n\t```\n\n## Setup and Usage\n\n#### Clone the github repository:\n\n```bash\ngit clone git@github.com:samuell/devbox-golang\ncd devbox-golang\n```\n\n#### Bring up the VM\n\nWith docker provider (Expect it to take at least ~8m):\n\n```bash\nvagrant up docker\n```\n\nWith VirtualBox provider (Expect it to take at least ~20m):\n\n```bash\nvagrant up virtualbox\n```\n\n#### Log in to the VM\n\nWith docker provider:\n\n```bash\nvagrant ssh docker\n```\n\nWith VirtualBox provider:\n\n```bash\nvagrant ssh virtualbox\n```\n\n#### Create a repository for uploading to github:\n\n```bash\nmkcd ~/code/go/src/github/\u003cuser\u003e/\u003crepo\u003e\ngit init .\n```\n\n#### Now, start coding!\n\n```bash\nvim main.go\n```\n\n#### A tip on how you can upload your existing git ssh keys to the new vm:\n\nWith the following command you can get the info you need to run scp\nagainst the machine:\n\n```bash\nvagrant ssh-config [docker | virtualbox]\n```\n\nNote the hostname and port number (and identity file, if you with),\nand run, for example:\n\n```bash\nscp -i \u003cidentity-file-path\u003e -P \u003cportno\u003e \\\n\t~/.ssh/id_rsa_\u003cwhateveryounamedit\u003e \\\n\tvagrant@\u003chostname\u003e:/home/vagrant/.ssh/\n```\n\nThen, sometimes, in order to get the new key activated in your shell\nafter logging in to the vm, you might need to do:\n\n```bash\nssh-agent bash -l\nssh-add ~/.ssh/id_rsa_\u003cwhateveryounamedit\u003e\n```\n\n- Autocompletion will happen automatically\n- If you have turned off the YouCompleteMe role, you will get autocompletion with `\u003cC-x\u003e\u003cC-o\u003e`\n\n## Known issues\n\n- GDB Breakpoints don't take, unless you follow the advice given [here](https://github.com/docker/docker/issues/7276#issuecomment-50436671).\n  That is, in short, do this on your **Host machine**, if you run Ubuntu:\n\n  ```bash\n  sudo apt-get install apparmor-utils\n  sudo echo 'aa-complain /etc/apparmor.d/docker' \u003e\u003e /etc/rc.local\n  sudo aa-complain /etc/apparmor.d/docker\n  ```\n\n  The problem seems to be that `ptrace` is not given access to the process otherwise.\n- There are some really red message from the docker daemon when running `vagrant halt`.\n  Everything seems to work as expected though (including the shutdown)\n- There are some red message on vagrant up, but they are nothing serious, and can be ignored for now.\n- When building Go 1.5 dev, the build will end with a lot of error messages, but that is from the\n  tests after the build. The build itself seems to work, largely.\n\n## References\n\n- [Vagrant \u0026 Ansible Quickstart Tutorial](http://adamcod.es/2014/09/23/vagrant-ansible-quickstart-tutorial.html)\n","funding_links":[],"categories":["virtualbox"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuell%2Fdevbox-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsamuell%2Fdevbox-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsamuell%2Fdevbox-golang/lists"}