Coder Social home page Coder Social logo

hetzner-bootstrap-coreos's Introduction

hetzner-bootstrap-coreos

This gem allows to bootstrap CoreOS on a Hetzner root server.

Gem Version

What it does:

In our case we are running a large CoreOS cluster and which uses bare metal servers hosted at Hetzner. This Ruby gem helps to fully automate the provisioning of CoreOS on a Hetzner root server.

Warning: All existing data on the system will be lost!

Requirements:

First of all retrieve your API login credentials from the Hetzner admin interface at https://robot.your-server.de. Additionally you need the IP address of the shipped system.

Implemented steps:

  1. Enable Rescue Mode (using Hetzner's webservice)
  2. Resetting the System to boot into rescue mode (using Hetzner's webservice)
  3. Log into the rescue system, write your cloud config file and launch the installation
  4. Reboot
  5. Verify installation (very basic check but can be overwritten)
  6. Copy your local ssh public-key into root's .authorized_keys
  7. Adds the generated server key into your $HOME/.ssh/known_hosts file
  8. Execute post_install hooks (optional)

Example:

See example.rb file for usage.

Warning: All existing data on the target system will be lost!

#!/usr/bin/env ruby
require "rubygems"
require "hetzner-bootstrap-coreos"

# Retrieve your API login credentials from the Hetzner admin interface
# at https://robot.your-server.de and assign the appropriate environment
# variables ENV['ROBOT_USER'] and ENV['ROBOT_PASSWORD']

bs = Hetzner::Bootstrap::CoreOS.new(
  :api => Hetzner::API.new(ENV['ROBOT_USER'], ENV['ROBOT_PASSWORD'])
)

# Main configuration (cloud-config)
cloud_config = <<EOT
hostname: <%= hostname %>
ssh_authorized_keys:
  - <%= public_keys %>
EOT

# The post_install hook is the right place to launch further tasks (e.g.
# software installation, system provisioning etc.)
post_install = <<EOT
  # TODO
EOT

bs << { :ip => "1.2.3.4",
  :cloud_config => cloud_config,
  :hostname => 'artemis.massive-insights.com',
    :public_keys => "~/.ssh/id_rsa.pub",
    :post_install => post_install
}

bs.bootstrap!

Installation:

gem install hetzner-bootstrap-coreos

Warnings:

  • All existing data on the system will be wiped on bootstrap!
  • This is not an official Hetzner AG project.
  • The gem and the author are not related to Hetzner AG!

Use at your very own risk. Satisfaction is NOT guaranteed.

Thank you greeting

This Ruby gem is inspired by the hetzner-bootstrap gem and requires the underlying wrapper for the Hetzner server management API hetzner-api. Thus I want to thank Roland Moriz a lot for his great work!

Copyright

Copyright © 2014 Christoph Pilka (Asconix Systems AS)

hetzner-bootstrap-coreos's People

Contributors

asconix avatar derfred avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.