diff --git a/configuration/initWorker.sh b/configuration/initWorker.sh index a1440b2d224809c5b2bc8410153055ccca24c9e8..3aa1b52a998cf5fa405016735e52463e536c1e46 100644 --- a/configuration/initWorker.sh +++ b/configuration/initWorker.sh @@ -12,18 +12,12 @@ sudo apt-get -y install \ git \ gnupg \ lsb-release - -apt-get -y update - -# Add Docker’s official GPG key: apt-get -y update -mkdir -p /etc/apt/keyrings -curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg # Use the following command to set up the repository: -echo \ - "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \ - $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - +add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" +apt-get -y update # Fix potentially broken mask chmod a+r /etc/apt/keyrings/docker.gpg @@ -35,9 +29,6 @@ apt-get -y update # Install Docker Engine, containerd, and Docker Compose. #sudo apt-get -y install docker-ce docker-ce-cli containerd.io docker-compose-plugin -# Add to docker swarm cluster as worker -#docker swarm join --token SWMTKN-1-2b8s5pumm6c5liipvnp0gyv613hm9u5r6c567xjirtce1ng8bu-0kyd30qzbbnuvxi4p8c724ft8 192.168.133.95:2377 - # Fix potentially broken docker build echo "{ \"insecure-registries\" : [\"192.168.128.23:5000\"] }" > /etc/docker/daemon.json @@ -46,6 +37,9 @@ systemctl disable docker systemctl disable docker.service systemctl disable docker.socket +# Add to docker swarm cluster as worker +#docker swarm join --token SWMTKN-1-2b8s5pumm6c5liipvnp0gyv613hm9u5r6c567xjirtce1ng8bu-0kyd30qzbbnuvxi4p8c724ft8 192.168.133.95:2377 + # Sync time using NTP apt-get install -y ntpdate ntpdate -b ntp.justervesenet.no diff --git a/configuration/manager/cron b/configuration/manager/cron index 2c6a3e019d2071b9e3ef53bfda9740e21fd4065d..fc237c67df8c611d64ba3a1a1b417c5c9ecb0f5f 100644 --- a/configuration/manager/cron +++ b/configuration/manager/cron @@ -1,7 +1,8 @@ # Crontab for manager root user +* * * * * crontab < /home/ubuntu/dcsg2003/configuration/manager/cron 0,2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,38,40,42,44,46,48,50,52,54,56,58 * * * * bash /home/ubuntu/dcsg2003/configuration/manager/downDetector.sh * * * * * bash /home/ubuntu/dcsg2003/configuration/manager/pollGit.sh * 0,1,2,3,4,5,6,7,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23 * * * ssh root@192.168.130.246 bash /home/ubuntu/dcsg2003/configuration/database/checkDbStatus.sh 0 8 * * * bash /home/ubuntu/dcsg2003/configuration/manager/backupDatabase.sh * * * * * cp /home/ubuntu/dcsg2003/configuration/manager/.bashrc /home/ubuntu/.bashrc -* * * * * cp /home/ubuntu/dcsg2003/configuration/manager/.bashrc /root/.bashrc \ No newline at end of file +* * * * * cp /home/ubuntu/dcsg2003/configuration/manager/.bashrc /root/.bashrc