travis_setup.sh 849 B

12345678910111213141516171819202122232425
  1. #!/usr/bin/env bash
  2. export DEBIAN_FRONTEND=noninteractive
  3. # Turn on command tracing
  4. set -x
  5. # Run as travis user (who already has passwordless sudo)
  6. ssh-keygen -f /home/travis/.ssh/id_rsa -N '' -t rsa
  7. cat /home/travis/.ssh/id_rsa.pub >> /home/travis/.ssh/authorized_keys
  8. chmod og-wx /home/travis/.ssh/authorized_keys
  9. echo "NoHostAuthenticationForLocalhost yes" | tee -a /home/travis/.ssh/config
  10. chmod 600 ~/.ssh/config
  11. # Set up the benchmark.cfg for travis user
  12. cp ./benchmark.cfg.example ./benchmark.cfg
  13. sed -i s/techempower/travis/g ./benchmark.cfg
  14. echo "travis ALL=(ALL:ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers
  15. echo 127.0.0.1 TFB-database | sudo tee --append /etc/hosts
  16. echo 127.0.0.1 TFB-client | sudo tee --append /etc/hosts
  17. echo 127.0.0.1 TFB-server | sudo tee --append /etc/hosts
  18. source ./toolset/setup/linux/prerequisites.sh