Packer template to prepare Golang development environment
You can easily setup Golang development environment by the following procedure.
Create Vagrantfile:
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.define :node do |node|
node.vm.box = "tkak/centos-7.0-x86_64-golang"
end
end
Boot VM and SSH login:
$ vagrant up
$ vagrant ssh
Start Golang development:
i.g.)
$ zsh ## If you want to use zsh
Box | OS | Tools |
---|---|---|
centos-7.0-x86_64-golang | CentOS 7.0 x86_64 | golang, git, vim + vim-bootstrap, zsh + oh-my-zsh, ghq, peco |
- Virtual Box
- Vagrant
- Packer
Make a vagrant box image by using Packer:
$ git clone git@github.com:tkak/golang-box.git
$ cd packer
$ packer build centos-7.0-x86_64.json
$ vagrant box add centos-7.0-x86_64-golang ../builds/virtualbox/centos-7.0-x86_64-golang.box
$ vagrant box list
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Run style checks and RSpec tests (
bundle exec rake
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request