Skip to content

Instantly share code, notes, and snippets.

@phumpal
Last active January 27, 2020 15:09
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save phumpal/d0007d314a12ee9c015e to your computer and use it in GitHub Desktop.
Save phumpal/d0007d314a12ee9c015e to your computer and use it in GitHub Desktop.
Install CoreOS on Hetzner w/hardware RAID1

CoreOS on Hetzner w/hardware RADI1

The existing docs when attempting to install CoreOS on Hetzner are a bit incomplete. This caused a bit of frustration for me so I am putting this doc together in hopes that it will help someone else.

Pre-requisites

After ordering your server you will need to log into the Hetzner server console

Add a public key

  1. Select Key Management
  2. Select New Key
  3. Give it a name and paste your public key into the key data field
  4. Select Add Key

Rescue Mode

  1. Select Servers
  2. Select your server
  3. Select Rescue
  4. For the OS, select Linux. Select the appropriate Architecture and the Public key you added in the step above.
  5. Select Activate rescue system
  6. Select Rescue
  7. Select Execute a automatic hardware reset then click Send

You may need to wait 30s to a few minutes before the server boots into rescue mode.

Configure your RAID

Hetzner should have installed both SAS drives with an Adaptec controller to /dev/sg0 and /dev/sg1 respectively. You can inspect these using smartctl for more details.

Build the RAID1 by using the following commands

arcconf CREATE 1 LOGICALDRIVE MAX 1 0 0 0 1 noprompt

Check to see if the drives are recognized

arcconf GETCONFIG 1 PD

Ensure any metadata is cleared

arcconf TASK START 1 DEVICE 0 0 CLEAR

More info on creating a RAID on Hetzner can be found here

CoreOS

Ensure your private key is being forwarded and SSH to the server as root. You should enter a rescue console running Debian.

Now run

wget https://raw.githubusercontent.com/coreos/init/master/bin/coreos-install

Create a cloud-config file which will bootstrap the server. Then run

./coreos-install -d /dev/sda -C stable -c cloud-config

After a few minutes CoreOS will be installed to /dev/sda. Log back into the console and run another Execute a automatic hardware reset. Alternatively, run reboot from the rescue console.

When the system comes back up your first node in your CoreOS cluster should be available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment