Commit 1ffcaa11 authored by Yehoshua Talansky's avatar Yehoshua Talansky


parent 4880e374
if [ "$EUID" -ne 0 ]
then echo "Please run as root"
echo "This script is only meant for provisioning Coreos do not use for other os"
#give runner 3 secs to cancel
sleep 3 # Waits 3 seconds.
#add user called application
sudo useradd -p "*" -U -m application -G sudo
sudo -u application bash << EOF
#add key for gitlab runner
ssh-keygen -f ~/.ssh/id_rsa -N '' -t rsa -b 4096 -C "gitlab-runner"
#take key that was generated and add to authorized_keys
cat ~/.ssh/ >> ~/.ssh/authorized_keys
#take this key and add to runner so it can log in
cat ~/.ssh/id_rsa
echo "now add private key above for gitlab secret jobs so it can login to core user"
#allow application user to access docker
sudo usermod -aG docker application
#From restart docker on restart
systemctl enable docker.service
systemctl start docker.service
echo "Done"
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment