From 6f8118de4db50bd7192347dbec697c3784cd57b7 Mon Sep 17 00:00:00 2001 From: Zaher Ghaibeh Date: Sat, 6 Jun 2020 11:52:12 +0300 Subject: [PATCH] update the readme file --- .gitignore | 1 - README.md | 12 ++++++++++-- inventory/my-cluster/hosts.ini | 0 inventory/sample/hosts.ini | 12 ++++++++++++ 4 files changed, 22 insertions(+), 3 deletions(-) create mode 100644 inventory/my-cluster/hosts.ini create mode 100644 inventory/sample/hosts.ini diff --git a/.gitignore b/.gitignore index 788482a..e69de29 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +0,0 @@ -hosts.ini diff --git a/README.md b/README.md index e0e617d..710c805 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,13 @@ Master and nodes must have passwordless SSH access ## Usage -Add the system information gathered above into a file called `hosts.ini` in the same directory as this README file. There is a template in the `inventory` directory. For example: +First create a new dirctory based on the `sample` directory within the `inventory` directory: + +```bash +cp -R inventory/sample inventory/my-cluster +``` + +Second, edit `inventory/my-cluster/hosts.ini` to mactch the system information gathered above. For example: ```bash [master] @@ -37,10 +43,12 @@ master node ``` +If needed, you can also edit `inventory/my-cluster/group_vars/all.yml` to match your environment. + Start provisioning of the cluster using the following command: ```bash -ansible-playbook site.yml +ansible-playbook site.yml -i inventory/my-cluster/hosts.ini ``` ## Kubeconfig diff --git a/inventory/my-cluster/hosts.ini b/inventory/my-cluster/hosts.ini new file mode 100644 index 0000000..e69de29 diff --git a/inventory/sample/hosts.ini b/inventory/sample/hosts.ini new file mode 100644 index 0000000..b015890 --- /dev/null +++ b/inventory/sample/hosts.ini @@ -0,0 +1,12 @@ +[master] +192.168.1.26 + +[node] +192.168.1.34 +192.168.1.39 +192.168.1.16 +192.168.1.32 + +[k3s_cluster:children] +master +node