Skip to content

Commit

Permalink
fix: update docs to be sure we have a functional build (rackerlabs#529)
Browse files Browse the repository at this point in the history
The docs were changed to point to a playbook that is broken,
this change updates the docs to ensure readers have a functional
setup. The docs still have the broken references but they've been
moved to experimental.

Signed-off-by: Kevin Carter <[email protected]>
  • Loading branch information
cloudnull authored Nov 2, 2024
1 parent 68aadc0 commit 40a146b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 15 deletions.
40 changes: 29 additions & 11 deletions docs/k8s-kubespray.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,22 +93,40 @@ source /opt/genestack/scripts/genestack.rc
ansible-playbook host-setup.yml
```

The `private-key` option can be used to instruct ansible to use a custom SSH key for the SSH connection

``` shell
--private-key ${HOME}/.ssh/openstack-keypair.key
```
!!! note
The RC file sets a number of environment variables that help ansible to run in a more easy to understand way.

### Run the cluster deployment

This is used to deploy kubespray against infra on an OpenStack cloud. If you're deploying on baremetal you will need to setup an inventory that meets your environmental needs.
=== "Kubespray Direct _(Recommended)_"

The playbook `setup-kubernetes.yml` is used to invoke the selected provider installation and label and configure a kube config:
This is used to deploy kubespray against infra on an OpenStack cloud. If you're deploying on baremetal you will need to setup an inventory that meets your environmental needs.
Change the directory to the kubespray submodule.

``` shell
source /opt/genestack/scripts/genestack.rc
ansible-playbook setup-kubernetes.yml
```
The cluster deployment playbook can also have overrides defined to augment how the playbook is executed.
Confirm openstack-flex-inventory.yaml matches what is in /etc/genestack/inventory. If it does not match update the command to match the file names.

``` shell
cd /opt/genestack/submodules/kubespray
ansible-playbook --inventory /etc/genestack/inventory/openstack-flex-inventory.ini \
--private-key /home/ubuntu/.ssh/openstack-flex-keypair.key \
--user ubuntu \
--become \
cluster.yml
```

=== "Setup-Kubernetes Playbook _(Experimental)_"

The `private-key` option can be used to instruct ansible to use a custom SSH key for the SSH connection

``` shell
--private-key ${HOME}/.ssh/openstack-keypair.key
```

``` shell
source /opt/genestack/scripts/genestack.rc
ansible-playbook setup-kubernetes.yml
```

!!! tip

Expand Down
12 changes: 8 additions & 4 deletions docs/k8s-labels.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
# Label all of the nodes in the environment

The labeling of nodes is automated as part of the `setup-kubernetes.yml` playbook based on ansible groups.
For understanding the use of k8s labels is defined as following, automation and documented deployment
steps build ontop of the labels referenced here:
To use the K8S environment for OpenStack all of the nodes MUST be labeled. The following Labels will be used within your environment.
Make sure you label things accordingly.

!!! note

The following example assumes the node names can be used to identify their purpose within our environment. That may not be the case in reality. Adapt the following commands to meet your needs.
The labeling of nodes is automated as part of the `setup-kubernetes.yml` playbook based on ansible groups.
For understanding the use of k8s labels is defined as following, automation and documented deployment
steps build ontop of the labels referenced here:

The following example assumes the node names can be used to identify their purpose within our environment.
That may not be the case in reality. Adapt the following commands to meet your needs.

## Genestack Labels

Expand Down

0 comments on commit 40a146b

Please sign in to comment.