Skip to content

Commit

Permalink
Merge branch 'rewrite' into ci-review
Browse files Browse the repository at this point in the history
  • Loading branch information
Daemonslayer2048 authored Jan 9, 2025
2 parents e3623ad + 50f9fc2 commit f7ceed4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 36 deletions.
38 changes: 5 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,35 +57,15 @@ Deployment environment must have Ansible 2.9.0+

Usage
-----
Create a new directory based on the one of the sample inventory directories within the `docs` directory:
Create an Ansible inventory file (or folder), you can check the docs folder for examples (`basic_sample_inventory` or `advanced_sample_inventory`).

```bash
cp -R ./docs/basic_sample_inventory ./inventory
```

Second, edit `inventory/hosts.yaml` to match the system information gathered above. For example:

```yaml
---
rke2_cluster:
children:
rke2_servers:
hosts:
server0.example.com:
rke2_agents:
hosts:
agent0.example.com:
```
If needed, you can also create `inventory/group_vars/rke2_agents.yml` and `inventory/my-cluster/group_vars/rke2_servers.yml` to match your environment.

Start provisioning of the cluster using the following command:
> [!NOTE]
> More detailed information can be found [here](./docs/README.md)
Start provisioning the cluster using the following command:
```bash
ansible-playbook site.yml -i inventory/hosts.yml
ansible-playbook site.yml -i inventory/hosts.yml -b
```
> [!NOTE]
> More detailed information can be found [here](./docs/README.md)


Tarball Install/Air-Gap Install
Expand All @@ -98,14 +78,6 @@ Kubeconfig
The root user will have the `kubeconfig` and `kubectl` made available, to access your cluster login into any server node and `kubectl` will be available for use immediately.


Available configurations
------------------------
Variables should be set in `inventory/group_vars/rke2_agents.yml` and `inventory/group_vars/rke2_servers.yml`.

> [!NOTE]
> More detailed information can be found [here](./docs/README.md)


Uninstall RKE2
---------------
Note: Uninstalling RKE2 deletes the cluster data and all of the scripts.
Expand Down
6 changes: 3 additions & 3 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ There are three levels an RKE2 config variables can be placed in, that is `clust
- `all.vars.cluster_rke2_config`: Defines common RKE2 config options for the whole cluster
- `rke2_cluster.children.rke2_servers.vars.group_rke2_config`: Defines common RKE2 config options for the `rke2_servers` group
- `rke2_cluster.children.rke2_agents.vars.group_rke2_config`: Defines common RKE2 config options for the `rke2_agents` group
- `rke2_cluster.children.rke2_servers.vars.hosts.<host>.host_rke2_config`: Defines a list of node labels for a specific agent node
- `rke2_cluster.children.rke2_agents.vars.hosts.<host>.host_rke2_config`: Defines a list of node labels for a specific agent node
- `rke2_cluster.children.rke2_servers.vars.hosts.<host>.host_rke2_config`: Defines RKE2 config options for a specific server node
- `rke2_cluster.children.rke2_agents.vars.hosts.<host>.host_rke2_config`: Defines RKE2 config options for a specific agent node

> [!NOTE]
> Through the rest of these docs you may see references to `rke2_servers.yml`, this is the group vars file for rke2_servers. This is functionally equivalent to `rke2_cluster.children.rke2_servers.vars`. References to `rke2_agents.yml` is functionally equivalent to `rke2_cluster.children.rke2_agents.vars`
Expand Down Expand Up @@ -260,4 +260,4 @@ spec:
```

# Examples
There are two examples provided in this folder, `basic_sample_inventory`, and `advanced_sample_inventory`. The basic example is the simplest possible example, the advanced example is all of the options explained above in one example.
There are two examples provided in this folder, `basic_sample_inventory`, and `advanced_sample_inventory`. The basic example is the simplest possible example, the advanced example is all of the options explained above in one example.
1 change: 1 addition & 0 deletions roles/rke2/tasks/add_manifest_addons.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
paths: "{{ source_directory }}"
register: local_files_find_return
delegate_to: localhost
become: false

- name: Create array of managed files
ansible.builtin.set_fact:
Expand Down

0 comments on commit f7ceed4

Please sign in to comment.