update Vagrant to use bento/ubuntu and lowercase github namespace

This commit is contained in:
Jakob Schrettenbrunner 2018-02-20 21:16:50 +01:00
parent 72ac95267b
commit 0b3fb72a97
2 changed files with 10 additions and 10 deletions

View File

@ -1,9 +1,9 @@
#!/bin/bash #!/bin/bash
echo "Provisioning development environment for Pterodactyl go daemon." echo "Provisioning development environment for Pterodactyl go daemon."
cp /home/ubuntu/go/github.com/Pterodactyl/wings.go/.dev/vagrant/motd.txt /etc/motd cp /home/vagrant/go/github.com/pterodactyl/wings.go/.dev/vagrant/motd.txt /etc/motd
chown -R ubuntu:ubuntu /home/ubuntu/go chown -R ubuntu:ubuntu /home/vagrant/go
chown -R ubuntu:ubuntu /srv chown -R ubuntu:ubuntu /srv
echo "Update apt repositories" echo "Update apt repositories"
@ -17,20 +17,20 @@ usermod -aG docker ubuntu
echo "Install go" echo "Install go"
apt-get install -y golang-go apt-get install -y golang-go
echo "export GOPATH=/home/ubuntu/go" >> /home/ubuntu/.profile echo "export GOPATH=/home/vagrant/go" >> /home/vagrant/.profile
export GOPATH=/go export GOPATH=/go
echo 'export PATH=$PATH:$GOPATH/bin' >> /home/ubuntu/.profile echo 'export PATH=$PATH:$GOPATH/bin' >> /home/vagrant/.profile
echo "Install go dep" echo "Install go dep"
sudo -H -u ubuntu bash -c 'go get -u github.com/golang/dep/cmd/dep' sudo -H -u vagrant bash -c 'go get -u github.com/golang/dep/cmd/dep'
echo "Install delve for debugging" echo "Install delve for debugging"
sudo -H -u ubuntu bash -c 'go get -u github.com/derekparker/delve/cmd/dlv' sudo -H -u vagrant bash -c 'go get -u github.com/derekparker/delve/cmd/dlv'
echo "Install additional dependencies" echo "Install additional dependencies"
apt-get -y install mercurial #tar unzip make gcc g++ python > /dev/null apt-get -y install mercurial #tar unzip make gcc g++ python > /dev/null
echo " ------------" echo " ------------"
echo "Gopath is /home/ubuntu/go" echo "Gopath is /home/vagrant/go"
echo "The project is mounted to /home/ubuntu/go/src/github.com/Pterodactyl/wings.go" echo "The project is mounted to /home/vagrant/go/src/github.com/pterodactyl/wings"
echo "Provisioning is completed." echo "Provisioning is completed."

4
Vagrantfile vendored
View File

@ -1,7 +1,7 @@
Vagrant.configure("2") do |cfg| Vagrant.configure("2") do |cfg|
cfg.vm.box = "ubuntu/xenial64" cfg.vm.box = "bento/ubuntu-16.04"
cfg.vm.synced_folder "./", "/home/ubuntu/go/src/github.com/Pterodactyl/wings" cfg.vm.synced_folder "./", "/home/vagrant/go/src/github.com/pterodactyl/wings"
cfg.vm.provision :shell, path: ".dev/vagrant/provision.sh" cfg.vm.provision :shell, path: ".dev/vagrant/provision.sh"