Update cloud-init.sh

This commit is contained in:
Jeffrey Paul 2018-03-06 18:15:51 -05:00 committed by GitHub
parent 905c10593f
commit f159d7745f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 13 additions and 0 deletions

View File

@ -6,6 +6,19 @@
#runcmd: #runcmd:
# - curl -fsSL https://raw.githubusercontent.com/sneak/hacks/master/provision.workbox/cloud-init.sh | bash # - curl -fsSL https://raw.githubusercontent.com/sneak/hacks/master/provision.workbox/cloud-init.sh | bash
# make sure we don't OOM
if [[ ! -e /var/swapfile ]]; then
fallocate -l 2G /var/swapfile
chmod 600 /var/swapfile
mkswap /var/swapfile
echo '/var/swapfile none swap sw 0 0' | tee -a /etc/fstab
fi
swapon /var/swapfile
echo 'vm.swappiness=80' >> /etc/sysctl.conf
echo 'vm.vfs_cache_pressure=50' >> /etc/sysctl.conf
sysctl -p
export DEBIAN_FRONTEND=noninteractive export DEBIAN_FRONTEND=noninteractive
apt-get update apt-get update
apt-get -y install git apt-get -y install git