Coder Social home page Coder Social logo

maticmermolja / ansible-rke2-rancher Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 31 KB

Ansible script for creating fully functional Kubernetes RKE2 installation with Rancher.

Jinja 2.89% Shell 97.11%
ansible ansible-playbook centos8 kubernetes oraclelinux8 rancher rke2

ansible-rke2-rancher's Introduction

Ansible RKE2 + Rancher Configuration

This Ansible script configures Oracle Linux 8 / CentOS 8 systems and installs RKE2 alongside Rancher.

Quick start

Prerequisites

Ensure the following packages and Python modules are installed on your master node:

  • python3-pip
  • unzip
  • nano
  • epel-release
  • ansible

Additionally, you'll need to install the Kubernetes Python module:

pip3 install kubernetes

Make sure the master node has SSH access to all other nodes in the configuration.

  1. Before running the playbook, execute generate_hosts.ini.sh from the master node:
sh ./generate_hosts.ini.sh

Follow the script instructions, entering all required IP addresses and FQDNs. This script will configure your hosts.ini file and update /etc/hosts on your master node.

  1. Copy the configured hosts to all other nodes in your setup.
  2. Update default variables in the defaults directory to match your expectations and configuration. To access Rancher make sure to change rancher_hostname in roles/rancher/defaults/main.yml to match your master node hostname.
  3. Run the playbook:
ansible-playbook -i inventory/hosts.ini site.yml

Script Overview

This project contains several roles:

  • system-config: Configures the OS and installs required packages.
  • rke2-server: Sets up server nodes and installs RKE2 on them.
  • rke2-worker: Sets up worker nodes and installs RKE2 on them.
  • rancher: Installs Rancher on selected nodes.

ansible-rke2-rancher's People

Contributors

maticmermolja avatar

Stargazers

 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.