Vizzuality/landgriffon

View on GitHub
infrastructure/base/templates/bastion_setup.sh.tpl

Summary

Maintainability
Test Coverage
#!/bin/bash

#
# Public keys for ssh
#
touch /home/"${user}"/.ssh/authorized_keys

${authorized_ssh_keys}

chown ${user}: /home/"${user}"/.ssh/authorized_keys
chmod 0600 /home/"${user}"/.ssh/authorized_keys

sudo apt-get update
sudo apt-get upgrade -y


#
# Set a hostname that identifies the cluster properly, so we avoid mistakes
#
hostnamectl set-hostname "${hostname}"


#
# AWS CLI
#
sudo apt-get install -y python2.7
curl -O https://bootstrap.pypa.io/get-pip.py
sudo python2.7 get-pip.py
sudo pip install awscli