wings/.dev/vagrant/provision.sh

37 lines
1.1 KiB
Bash
Raw Normal View History

2017-06-20 22:42:14 +00:00
#!/bin/bash
echo "Provisioning development environment for Pterodactyl go daemon."
cp /home/ubuntu/go/github.com/Pterodactyl/wings.go/.dev/vagrant/motd.txt /etc/motd
2017-06-20 22:42:14 +00:00
chown -R ubuntu:ubuntu /home/ubuntu/go
2017-10-01 18:39:59 +00:00
chown -R ubuntu:ubuntu /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
2017-10-01 18:39:59 +00:00
usermod -aG docker ubuntu
2017-06-20 22:42:14 +00:00
echo "Install go"
apt-get install -y golang-go
echo "export GOPATH=/home/ubuntu/go" >> /home/ubuntu/.profile
export GOPATH=/go
echo 'export PATH=$PATH:$GOPATH/bin' >> /home/ubuntu/.profile
echo "Install go dep"
sudo -H -u ubuntu bash -c 'go get -u github.com/golang/dep/cmd/dep'
2017-10-01 18:39:59 +00:00
echo "Install delve for debugging"
sudo -H -u ubuntu bash -c 'go get -u github.com/derekparker/delve/cmd/dlv'
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 " ------------"
echo "Gopath is /home/ubuntu/go"
echo "The project is mounted to /home/ubuntu/go/src/github.com/Pterodactyl/wings.go"
2017-06-20 22:42:14 +00:00
echo "Provisioning is completed."