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
# Copyright (c) 2018 Genome Research Limited | |
# | |
# Permission is hereby granted, free of charge, to any person obtaining a | |
# copy of this software and associated documentation files (the | |
# "Software"), to deal in the Software without restriction, including | |
# without limitation the rights to use, copy, modify, merge, publish, | |
# distribute, sublicense, and/or sell copies of the Software, and to | |
# permit persons to whom the Software is furnished to do so, subject to | |
# the following conditions: | |
# |
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
#!/bin/bash | |
set -euf -o pipefail | |
# Note: jitter is not removed | |
PERIOD_IN_SECONDS=3600 | |
while true | |
do | |
# To install `speedtest`: `pip install speedtest-cli` |
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
apt-get update \ | |
&& apt-get install -y --no-install-recommends \ | |
less \ | |
git | |
git clone --depth=1 --branch=0.3.1 https://github.com/ingydotnet/git-subrepo.git /tmp/git-subrepo \ | |
&& cd /tmp/git-subrepo \ | |
&& make install \ | |
&& cd - \ | |
&& rm -rf /tmp/git-subrepo |
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
docker-machine ls -q | while read machineName; do | |
docker-machine rm -f "$machineName" | |
done |
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
# In Debian-world, cron.daily runs at a random time. This is an ansible task to | |
# change it to run at an hour specified by `cron_daily_time`. | |
- name: Change cron.daily to run at a specified time | |
become: yes | |
replace: | |
path: /etc/crontab | |
regexp: '(\S*[ \t])(\S*)([ \t].*cron\.daily)' | |
replace: '\g<1>{{ cron_daily_time }}\g<3>' |
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
# Install pip | |
apt-get install -y python-pip | |
# Install dependencies for cryptography (dependency of ansible) | |
apt-get install -y build-essential libssl-dev libffi-dev python-dev | |
# Install/Update Ansible | |
pip install -U ansible |
NewerOlder