Last active
June 29, 2018 21:54
-
-
Save pquerner/e902f5f8018653ee3e815f8dd46aec52 to your computer and use it in GitHub Desktop.
Ubuntu PS4 SDK Build Slave
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Vagrant.configure("2") do |config| | |
# Ubuntu 14.04 LTS x64 official cloud image | |
config.vm.box = "ubuntu/trusty64" | |
config.vm.box_check_update = false | |
config.vm.network "public_network", ip: "192.168.178.99" | |
# VirtualBox | |
config.vm.provider "virtualbox" do |vb| | |
vb.name = "PS4 Build Slave" # friendly name that shows up in Oracle VM VirtualBox Manager | |
vb.memory = 2048 # memory in megabytes | |
vb.cpus = 4 # cpu cores, can't be more than the host actually has! | |
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] # fixes slow dns lookups | |
end | |
# use local ubuntu mirror | |
config.vm.provision :shell, inline: "sed -i 's/archive.ubuntu.com/lv.archive.ubuntu.com/g' /etc/apt/sources.list" | |
# add swap | |
config.vm.provision :shell, inline: "fallocate -l 4G /swapfile && chmod 0600 /swapfile && mkswap /swapfile && swapon /swapfile && echo '/swapfile none swap sw 0 0' >> /etc/fstab" | |
config.vm.provision :shell, inline: "echo vm.swappiness = 10 >> /etc/sysctl.conf && echo vm.vfs_cache_pressure = 50 >> /etc/sysctl.conf && sysctl -p" | |
# build tools | |
config.vm.provision :shell, inline: "apt-get update" | |
config.vm.provision :shell, inline: "apt-get install build-essential libboost-all-dev git -y" | |
config.vm.provision :shell, inline: "wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key | apt-key add -" | |
config.vm.provision :shell, inline: "echo 'deb http://llvm.org/apt/trusty/ llvm-toolchain-trusty-3.8 main' | sudo tee --append /etc/apt/sources.list > /dev/null" | |
config.vm.provision :shell, inline: "apt-get update" | |
config.vm.provision :shell, inline: "apt-get install clang-3.8 llvm-3.8-dev -y" | |
# zsh | |
config.vm.provision :shell, inline: "apt-get install zsh -y" | |
config.vm.provision :shell, inline: "apt-get install git-core -y" | |
config.vm.provision :shell, inline: "curl -L http://install.ohmyz.sh | sh" | |
config.vm.provision :shell, inline: "sudo chsh -s $(which zsh)" | |
# node | |
config.vm.provision :shell, inline: "apt-get install build-essential libssl-dev -y" | |
config.vm.provision :shell, inline: "curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -" | |
config.vm.provision :shell, inline: "sudo apt-get install -y nodejs" | |
# PS4SDK env | |
config.vm.provision :shell, inline: "echo export PS4SDK='/home/vagrant/ps4sdk/' | tee --append /home/vagrant/.profile > /dev/null" | |
#fix clang | |
config.vm.provision :shell, inline: "sudo ln -s /usr/bin/clang-3.8 /usr/bin/clang" | |
#put ps4sdk here | |
config.vm.synced_folder "sync/", "/home/vagrant", type: "nfs" | |
#this will take some time, but cannot be run from provision | |
#"export PS4SDK=/home/vagrant/ps4sdk" | |
#"cd /home/vagrant/ps4sdk && make clean && make" | |
# enable logging in via ssh with a password | |
config.ssh.username = "vagrant" | |
config.ssh.password = "vagrant" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment