Giter VIP home page Giter VIP logo

ansible-hetzner's Introduction

Description

Ansible Playbook that will create a Rancher Master and a defined count of workers.

Before you start make sure to create the group_vars/servers.yml from the server.yaml.example file.

To run this, you need to do something like this:

Requirements

  • Install Ansible 2.8 or newer
  • Install required Python modules (go to folder root and execute pip install -r pyrequirements.txt)
  • Enable hcloud inventory in Ansible configuration (explained here)

Usage

Install Hetzner environment

Spawn Env at Hetzner

  • rename all.yml.example and servers.yml.example and fill in information
export HCLOUD_TOKEN=hetzner-token-goes-here
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hcloud.yml site.yml

Destroy Servers

export HCLOUD_TOKEN=hetzner-token-goes-here
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hcloud.yml site.yml -e hetzner_serverstate=absent

Cleanup Rancher Installation on Servers

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hcloud.yml cleanup.yml -e 'ansible_python_interpreter=/usr/bin/python3'

Install local Helm on Master Server

If it is necessary you can install Helm localy on Masterserver

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hcloud.yml helm.yml -e 'ansible_python_interpreter=/usr/bin/python3'

Install in existing environment

  • rename inventory.yml.example to inventory.yml and fill information
  • Execute:
    ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i inventory.yml site_local.yml -e 'ansible_python_interpreter=/usr/bin/python3'
    

Cleanup Rancher Installation on Servers

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i inventory.yml cleanup.yml -e 'ansible_python_interpreter=/usr/bin/python3'

Install local Helm on Master Server

If it is necessary you can install Helm localy on Masterserver

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i inventory.yml helm.yml -e 'ansible_python_interpreter=/usr/bin/python3'

ansible-hetzner's People

Contributors

ebartz avatar jwhb avatar volkimd avatar

Watchers

 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.