added 2 initial getting started guieds
This commit is contained in:
parent
3ec4dbd188
commit
a73c3b1f28
5 changed files with 124 additions and 2 deletions
53
src/content/docs/guides/dev-env.md
Normal file
53
src/content/docs/guides/dev-env.md
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
---
|
||||
title: Local Development Environment
|
||||
description: A guide to checking a local environment.
|
||||
---
|
||||
|
||||
Run `dev-pre-flight-checks.sh` command line tool with
|
||||
|
||||
```bash
|
||||
curl -L https://codeberg.org/headshed/infctl-cli/raw/branch/main/scripts/dev-pre-flight-checks.sh | bash
|
||||
```
|
||||
|
||||
Alternatively, download https://codeberg.org/headshed/infctl-cli/raw/branch/main/scripts/dev-pre-flight-checks.sh locally, check over what it does, `chmod +x dev-pre-flight-checks.sh` and run `./dev-pre-flight-checks.`
|
||||
|
||||
the following executables are checked to be in your `$PATH`:
|
||||
|
||||
"infctl" "pwgen" "kubectl" "k3d" "helm" "jq" "docker"
|
||||
|
||||
if any of these are missing, a development environment cannot be created.
|
||||
|
||||
`infctl` - see [quick start](/guides/quick-start/)
|
||||
|
||||
`pwgen`, `jq` are typically available in package managers
|
||||
|
||||
To install `pwgen` or `jq`:
|
||||
|
||||
**On macOS (using Homebrew):**
|
||||
```bash
|
||||
brew install pwgen jq
|
||||
```
|
||||
|
||||
**On Linux (Debian/Ubuntu):**
|
||||
```bash
|
||||
sudo apt-get update
|
||||
sudo apt-get install pwgen jq
|
||||
```
|
||||
|
||||
**On Linux (Fedora):**
|
||||
```bash
|
||||
sudo dnf install pwgen jq
|
||||
```
|
||||
|
||||
To download `kubectl`, visit the official Kubernetes documentation: [Install and Set Up kubectl](https://kubernetes.io/docs/tasks/tools/). Follow the instructions for your operating system.
|
||||
|
||||
|
||||
To install `k3d` go to [k3d installation](https://k3d.io/stable/#installation) and follow their guide
|
||||
|
||||
To install `helm` got to [helm install](https://helm.sh/docs/intro/install/) and follow their guide
|
||||
|
||||
Docker can be installed in a variety of ways but for most Windows and Mac users [docker desktop](https://www.docker.com/products/docker-desktop/) can be an easy option
|
||||
|
||||
For Linux users, [docker engine install](https://docs.docker.com/engine/install/) is more often than not the better option.
|
||||
|
||||
Which ever path you take to install Docker, any of the above will work but if you are interesting in really getting to know Kubernetes, it is would be really good to go for a Linux based solution as this is typically what Kubernetes is likely to be running on in any production grade environment.
|
||||
58
src/content/docs/guides/local-k3d.md
Normal file
58
src/content/docs/guides/local-k3d.md
Normal file
|
|
@ -0,0 +1,58 @@
|
|||
---
|
||||
title: Create a Local K3d Instance
|
||||
description: A guide to creating an initial local k3d instance.
|
||||
---
|
||||
|
||||
clone the `infctl-cli` repo in order to have local access to its scripts, files and manifests to use later on.
|
||||
|
||||
Where you put this is up to you but we will work on the assumption that this will be in `$HOME/projects` :
|
||||
|
||||
```bash
|
||||
mkdir -p $HOME/projects/
|
||||
cd $HOME/projects
|
||||
git clone https://codeberg.org/headshed/infctl-cli.git
|
||||
cd infctl-cli
|
||||
```
|
||||
|
||||
take a look at the script `scripts/create_k3d_cluster.sh` to familiarise yourself with what it does and when ready to run it
|
||||
|
||||
```bash
|
||||
./scripts/create_k3d_cluster.sh
|
||||
```
|
||||
|
||||
k3d can also list this and any other clusters you have running locally with
|
||||
|
||||
```bash
|
||||
k3d cluster list
|
||||
NAME SERVERS AGENTS LOADBALANCER
|
||||
mycluster 1/1 0/0 true
|
||||
```
|
||||
|
||||
if all goes well, you should have a k3d ( k3s ) cluster running locally that you can see its single node running with
|
||||
|
||||
```bash
|
||||
kubectl get nodes
|
||||
NAME STATUS ROLES AGE VERSION
|
||||
k3d-mycluster-server-0 Ready control-plane,master 93m v1.31.5+k3s1
|
||||
```
|
||||
|
||||
A healthy state and most of the resources may be viewed in several ways but 2 for starters can be:
|
||||
|
||||
```bash
|
||||
kubectl get events -A
|
||||
kubectl get all -A
|
||||
```
|
||||
|
||||
The first will list any events logged by the cluster.
|
||||
|
||||
The second will list 'all' resources which can be a bit misleading as not all the things are actually listed, just the main ones we are interested in.
|
||||
|
||||
When your done with this secion and are ready to, delete the cluster ( you can create a new one any time with the above command )
|
||||
|
||||
```bash
|
||||
k3d cluster delete mycluster
|
||||
```
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
@ -6,7 +6,7 @@ description: A guide to setting up MVK quickly.
|
|||
Install `infctl` command line tool with a single command
|
||||
|
||||
```bash
|
||||
curl -L https://codeberg.org/headshed/infctl-cli/raw/branch/chore/code-refactor/install.sh | bash
|
||||
curl -L https://codeberg.org/headshed/infctl-cli/raw/branch/main/install.sh | bash
|
||||
```
|
||||
|
||||
Alternatively, go to [Releases](https://codeberg.org/headshed/infctl-cli/releases) to find a current version for your Operating System, download it and place a copy in your `PATH`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue