2017-06-20 22:42:14 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo "Provisioning development environment for Pterodactyl go daemon."
|
2018-02-20 20:16:50 +00:00
|
|
|
cp /home/vagrant/go/github.com/pterodactyl/wings.go/.dev/vagrant/motd.txt /etc/motd
|
2017-06-20 22:42:14 +00:00
|
|
|
|
2018-02-20 22:38:47 +00:00
|
|
|
chown -R vagrant:vagrant /home/vagrant/go
|
|
|
|
chown -R vagrant:vagrant /srv
|
2017-06-20 22:42:14 +00:00
|
|
|
|
|
|
|
echo "Update apt repositories"
|
|
|
|
sudo add-apt-repository ppa:longsleep/golang-backports
|
|
|
|
apt-get update > /dev/null
|
|
|
|
|
|
|
|
echo "Install docker"
|
|
|
|
curl -sSL https://get.docker.com/ | sh
|
|
|
|
systemctl enable docker
|
2018-02-20 22:38:47 +00:00
|
|
|
usermod -aG docker vagrant
|
2017-06-20 22:42:14 +00:00
|
|
|
|
|
|
|
echo "Install go"
|
|
|
|
apt-get install -y golang-go
|
2018-02-20 20:16:50 +00:00
|
|
|
echo "export GOPATH=/home/vagrant/go" >> /home/vagrant/.profile
|
2017-06-20 22:42:14 +00:00
|
|
|
export GOPATH=/go
|
2018-02-20 20:16:50 +00:00
|
|
|
echo 'export PATH=$PATH:$GOPATH/bin' >> /home/vagrant/.profile
|
2017-06-20 22:42:14 +00:00
|
|
|
|
|
|
|
echo "Install go dep"
|
2018-02-20 20:16:50 +00:00
|
|
|
sudo -H -u vagrant bash -c 'go get -u github.com/golang/dep/cmd/dep'
|
2017-06-20 22:42:14 +00:00
|
|
|
|
2017-10-01 18:39:59 +00:00
|
|
|
echo "Install delve for debugging"
|
2018-02-20 20:16:50 +00:00
|
|
|
sudo -H -u vagrant bash -c 'go get -u github.com/derekparker/delve/cmd/dlv'
|
2017-10-01 18:39:59 +00:00
|
|
|
|
2017-06-20 22:42:14 +00:00
|
|
|
echo "Install additional dependencies"
|
|
|
|
apt-get -y install mercurial #tar unzip make gcc g++ python > /dev/null
|
|
|
|
|
|
|
|
echo " ------------"
|
2018-02-20 20:16:50 +00:00
|
|
|
echo "Gopath is /home/vagrant/go"
|
|
|
|
echo "The project is mounted to /home/vagrant/go/src/github.com/pterodactyl/wings"
|
2017-06-20 22:42:14 +00:00
|
|
|
echo "Provisioning is completed."
|