DevOps - Nomad on Hetzner
Log into server
$ ssh -i ~/.ssh/id_rsa root@dev1
Welcome to the Hetzner Rescue System.
This Rescue System is based on Debian 10 (buster) with a custom kernel. You can install software as in a normal system.
To install a new operating system from one of our prebuilt images, run âinstallimageâ and follow the instructions.
More information at https://docs.hetzner.com/
Rescue System up since 2021-08-14 08:40 +02:00
Hardware data:
CPU1: Intel(R) Core(TM) i7-4770 CPU @ 3.40GHz (Cores 8) Memory: 31983 MB Disk /dev/sda: 2000 GB (â 1863 GiB) doesnât contain a valid partition table Disk /dev/sdb: 2000 GB (â 1863 GiB) doesnât contain a valid partition table Total capacity 3726 GiB with 2 Disks
Network data: eth0 LINK: yes MAC: d4:3d:7e:f8:f2:b0 IP: 144.76.24.226 IPv6: 2a01:4f8:191:e1::2/64 RealTek RTL-8169 Gigabit Ethernet driver
Install OS
- Start installimage script
installimage
- Select OS (Ubuntu 20.04)
Edit configuration
- Change hostname
Confirm deleting disk partitions
Install in progress
Hetzner Online GmbH - installimage
Your server will be installed now, this will take some minutes
You can abort at any time with CTRL+C ...
: Reading configuration done
: Loading image file variables done
: Loading ubuntu specific functions done
1/16 : Deleting partitions done
2/16 : Test partition size done
3/16 : Creating partitions and /etc/fstab done
4/16 : Creating software RAID level 1 done
5/16 : Formatting partitions
: formatting /dev/md/0 with swap done
: formatting /dev/md/1 with ext3 done
: formatting /dev/md/2 with ext4 done
6/16 : Mounting partitions done
7/16 : Sync time via ntp done
: Importing public key for image validation done
8/16 : Validating image before starting extraction done
9/16 : Extracting image (local) done
10/16 : Setting up network config done
11/16 : Executing additional commands
: Setting hostname done
: Generating new SSH keys done
: Generating mdadm config done
: Generating ramdisk done
: Generating ntp config done
12/16 : Setting up miscellaneous files done
13/16 : Configuring authentication
: Fetching SSH keys done
: Disabling root password done
: Disabling SSH root login without password done
: Copying SSH keys done
14/16 : Installing bootloader grub done
15/16 : Running some ubuntu specific functions done
16/16 : Clearing log files done
INSTALLATION COMPLETE
You can now reboot and log in to your new system with the
same credentials that you used to log into the rescue system.
Reboot
reboot
Setup firewall through Hetzner site
Allow port 22 only for now
Log in again
Update base OS
apt-get update
apt-get upgrade
Install Nomad
As described here: https://learn.hashicorp.com/tutorials/nomad/get-started-install?in=nomad/get-started
Use setup-nomad.sh
script
Install Docker
Use setup-docker.sh
script
Install Tailscale
Use setup-tailscale.sh
script
Test Nomad via tutorial
https://learn.hashicorp.com/tutorials/nomad/get-started-run?in=nomad/get-started
ISSUES
-
de.ubuntu.com not reachable
-
Docker not reachable
curl https://registry-1.docker.io/v2/
doesnât return