initial checkin

This commit is contained in:
Radar231 2021-07-23 18:45:45 -04:00
commit 0dd83557e7
3 changed files with 100 additions and 0 deletions

17
ansible.cfg Normal file
View File

@ -0,0 +1,17 @@
###########################################################################
#
# This is a custom ansible configuration file with select config values set
# as required.
#
###########################################################################
[defaults]
callback_whitelist = profile_tasks
command_warnings = False
deprecation_warnings = False
display_skipped_hosts = False
host_key_checking = False
stdout_callback = default
interpreter_python = auto
# EOF

43
microk8s.yml Normal file
View File

@ -0,0 +1,43 @@
---
###########################################################################
#
# This is the top level playbook for the 'microk8s' role.
#
# This role will install a microk8s cluster to three or more target hosts.
#
# This role requires at least three target hosts, previously deployed. Each
# host should have at least 4GB of RAM and at least a 20GB disk. The hosts
# should also be running Ubuntu LTS, 16.04, 18.04 or 20.04.
#
# It is also assumed that the user running the playbook has SSH key access
# set up for the root user on the target hosts.
#
###########################################################################
#
# This playbook can be run using the following command line;
#
# ansible-playbook -i <inventory file> -e "username=<username>" microk8s.yml
#
# ie,
# ansible-playbook -i microk8s_inventory.yml -e "username=joe" microk8s.yml
#
###########################################################################
- hosts: all
gather_facts: true
remote_user: root
roles:
- role: update_cache
- role: microk8s
vars:
# Calculate the number of target hosts
numhosts: "{{ groups['all'] | length }}"
# Set the following variable as required
# ie,
# username: joe
#
# Default is to apply the playbook against the root user
username: "root"
# EOF

40
microk8s_inventory.yml Normal file
View File

@ -0,0 +1,40 @@
---
###########################################################################
#
# Inventory for microk8s cluster deployment playbook.
#
###########################################################################
all:
hosts:
node1:
ansible_host: 192.168.7.231
node2:
ansible_host: 192.168.7.232
node3:
ansible_host: 192.168.7.233
children:
master:
hosts:
node1:
workers:
hosts:
node2:
node3:
# Global variables
vars:
# Switch to control whether we are creating a cluster, or just
# deploying to a single host
do_cluster: true
# Minimum hosts for our cluster
minhosts: "3"
# microk8s version
microk8s_version: "1.20/stable"
# Switch to control application of proxy config or not
do_proxy: false
# Proxy host (if required)
proxy_host: http://10.100.255.18:3128
# Network range(s) to add to 'NO_PROXY' (if doing proxy config)
net_cidrs: 10.104.3.0/24,10.104.4.0/24,10.104.5.0/24
# EOF