From dbbb2897589fbe01d245bfd5bac1690eb9ef6562 Mon Sep 17 00:00:00 2001 From: Michele Cereda Date: Thu, 4 Apr 2024 01:09:46 +0200 Subject: [PATCH] chore(kb/awx): start article about awx, improve dependent ones --- knowledge base/awx.md | 74 ++++++++++++++++++ knowledge base/kubernetes/minikube.md | 108 +++++++++++++++++--------- 2 files changed, 147 insertions(+), 35 deletions(-) create mode 100644 knowledge base/awx.md diff --git a/knowledge base/awx.md b/knowledge base/awx.md new file mode 100644 index 0000000..adfdcf4 --- /dev/null +++ b/knowledge base/awx.md @@ -0,0 +1,74 @@ +# Ansible AWX + +1. [TL;DR](#tldr) +1. [Installation](#installation) +1. [Testing](#testing) +1. [Further readings](#further-readings) + 1. [Sources](#sources) + +## TL;DR + + + + + + + +## Installation + +Starting from version 18.0, the [AWX Operator][operator's documentation] is the preferred way to install AWX.
+It is meant to provide a Kubernetes-native installation method for AWX via an AWX Custom Resource Definition (CRD). + +## Testing + +```sh +$ minikube start --cpus=4 --memory=6g --addons=ingress +… +🌟 Enabled addons: storage-provisioner, default-storageclass, ingress +🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default + +``` + +## Further readings + +- [Website] +- [Kubernetes] +- [Minikube] + +### Sources + +- [AWX's documentation] +- [AWX's repository] +- [Operator's documentation] +- [Operator's repository] + + + + + +[kubernetes]: kubernetes/README.md +[minikube]: kubernetes/minikube.md + + + +[awx's documentation]: https://ansible.readthedocs.io/projects/awx/en/latest/ +[awx's repository]: https://github.com/ansible/awx/ +[operator's documentation]: https://ansible.readthedocs.io/projects/awx-operator/en/latest/ +[operator's repository]: https://github.com/ansible/awx-operator/ +[website]: https://www.ansible.com/awx/ + + diff --git a/knowledge base/kubernetes/minikube.md b/knowledge base/kubernetes/minikube.md index 2447b35..0ec028c 100644 --- a/knowledge base/kubernetes/minikube.md +++ b/knowledge base/kubernetes/minikube.md @@ -1,16 +1,17 @@ # Minikube -## Table of contents - 1. [TL;DR](#tldr) 1. [Troubleshooting](#troubleshooting) 1. [What happens if one uses the _LoadBalancer_ type with Services](#what-happens-if-one-uses-the-loadbalancer-type-with-services) 1. [Use custom certificates](#use-custom-certificates) 1. [Further readings](#further-readings) -1. [Sources](#sources) + 1. [Sources](#sources) ## TL;DR +
+ Installation and configuration + ```sh # Install minikube. sudo pacman -S 'minikube' @@ -18,52 +19,93 @@ brew install 'docker' 'minikube' # Shell completion. source <(minikube completion "$(basename $SHELL)") +``` -# Disable emojis in the commands. -export MINIKUBE_IN_STYLE=false +User configuration options are overridden by command flags. -# Start the cluster. +```sh +# See defaults for individual configuration values. +minikube config defaults 'disk-size' +minikube config defaults 'container-runtime' + +# Get individual user configuration values. +minikube config get 'cache' +minikube config get 'driver' +minikube config get 'kubernetes-version' + +# Set individual user configuration values. +minikube config set 'cpus' '4' +minikube config set 'profile' 'awx-cluster' +minikube config set 'rootless' true + +# View the current user configuration. +minikube config view + +# Unset user configuration values. +minikube config unset 'memory' +``` + +
+ +
+ Usage + +```sh +# Start clusters. minikube start -minikube start --cpus '4' --memory '8192' +minikube -p 'profile' start --cpus '4' --memory '8192' --vm --addons 'ingress' +minikube start --driver='docker' --kubernetes-version='v1.29.0' -# Pause the cluster without impacting deployed applications -minikube pause - -# Halt the cluster. -minikube stop - -# Permanently increase the default memory limit. -# Requires the cluster to restart. -minikube config set 'memory' '16384' - -# Browse the catalog of easily installable Kubernetes services. +# Browse the addons catalog, with their current status. minikube addons list -# Create a(nother) cluster running a specific Kubernetes version. -minikube start -p 'old-k8s' --kubernetes-version='v1.16.1' -minikube config set 'kubernetes-version' 'v1.16.15' && minikube start +# Enable addons. +minikube addons enable 'dashboard' +minikube --profile 'profile' addons enable 'dashboard' -# Use a specific docker driver. -minikube start --driver='docker' -minikube config set 'driver' 'docker' && minikube start - -# Disable new update notifications. -minikube config set 'WantUpdateNotification' false - -# Get IP and port of a service of type NodePort. +# Get IP and port of services of type NodePort. minikube service --url 'nextcloud' minikube service --url 'nextcloud' --namespace 'nextcloud' -# Use the integrated kubectl command. +# Use the equipped 'kubectl' executable. minikube kubectl -- get pods # Log into the minikube environment (for debugging). minikube ssh +# Pause clusters without impacting deployed applications. +minikube pause +minikube -p 'profile' pause -A + +# Halt clusters. +minikube stop + # Delete all the clusters. minikube delete --all --purge ``` +
+ +
+ Real world use cases + +```sh +# Permanently increase the default memory limit. +# Requires the cluster to restart. +minikube config set 'memory' '16384' + +# Disable new update notifications. +minikube config set 'WantUpdateNotification' false + +# Disable emojis in the commands. +export MINIKUBE_IN_STYLE=false + +# Create (other) clusters running specific Kubernetes versions. +minikube start -p 'old-k8s' --kubernetes-version='v1.27.1' +``` + +
+ ## Troubleshooting ### What happens if one uses the _LoadBalancer_ type with Services @@ -81,9 +123,7 @@ Minikibe's certificates are available in the `~/.minikube/certs` folder. - [Kubernetes] - [`kubectl`][kubectl] -## Sources - -All the references in the [further readings] section, plus the following: +### Sources - [Accessing] the services - [Getting started] guide @@ -111,8 +151,6 @@ All the references in the [further readings] section, plus the following: [website]: https://minikube.sigs.k8s.io -[further readings]: #further-readings - [kubectl]: kubectl.md [kubernetes]: README.md