Giter Site home page Giter Site logo

hcloud-okd-setup's Introduction

OKD setup for Hetzner Cloud

This folder takes care of setting up a new machine with OKD and performs all the necessary configuration. The idea is to be able to create a bunch of OKD clusters, with proper TLS and DNS support, running on a public infrastructure.

Note: This module uses Git submodules. Either clone with --recursive or run git submodule update --init --recursive after cloning.

Prepare yourself

This setup requires a few things before you can start.

Software

You will need CentOS/RHEL, and a few tools installed:

sudo yum install gettext

If you want to to use the Lexicon DNS API support:

sudo yum install python34 python34-pip
pip3 install --user dns-lexicon

Hetzner Cloud

You will need an account at: https://console.hetzner.cloud

Additionally you will need the hcloud command line tool: https://github.com/hetznercloud/cli/releases

Register your account with hcloud context create โ€ฆ. Also see: https://github.com/hetznercloud/cli#getting-started

Local configuration

You will need to create a file called config in this directory. You may use the file config.example as a basis for this.

DNS integeration

See: dns/README.md

TLS with Let's encrypt

See: letsencrypt/README.md

Creating a new instance

After you done all the preparations you can simple create a new instance by calling

./create foo-bar

And the setup will begin to create your new OKD instance. You can log in to the machine using.

It takes around 10-15 minutes until the installation is ready. You can check the progress in the file /var/log/okd-setup.log. The setup if complete if the last line shows:

persistentvolume "pv-18" created
persistentvolume "pv-19" created
persistentvolume "pv-20" created

After that the machine will be rebooted one last time.

Accessing OKD

Once the setup is complete you can access the instance using either the Web Console or the oc command line tool on port 8443. Using the credentials developer / developer (note: it might be wise to change them!)

About the environment

By default a user developer will be created, which has the password developer set as a default. You can change this in the configuration.

Optionally you can create an admin user, which has cluster admin privileges assigned. By default this user will not be created, but you can enable the creating by specifying a password for the admin user in the variable ADMIN_PASSWORD, in the configuration.

This setup will also create a few PVs, backed by the local storage and attached by using NFS.

The hostname will be printed out by the create command. You can access the server using the Web UI or the API using the URL https://<dns-name>:8443

The process

This is what will happen when you create a new machine:

  • Create a new server instance, upload the cloud-config.yaml file in the process
  • Register the newly assigned IP with the DNS
  • When the machine boots:
    • Run first boot cloud init
      • Install a bunch of packages
      • Set SElinux to "permissive"
      • Create the "run-on-boot" service
      • Reboot
    • The machine will reboot, the "run-on-boot" service will be executed:
      • SElinux will relabel the filesystem
      • SElinux will be switched to enforcing
      • Reboot
    • Again the "run-on-boot" script will be called
      • Disable the "run-on-boot" service
      • Run /okd/setup
      • Delete the "run-on-boot" service
      • Reboot

The SElinux steps are necessary as Hetzner has SElinux disabled by default, however SElinux is required by OKD. Also see fix-selinux/README.md.

hcloud-okd-setup's People

Contributors

ctron avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.