Create VM's
Some checks failed
Gitea Actions Demo Training / Explore-Gitea-Actions (push) Failing after 12s

This commit is contained in:
2023-06-06 07:47:05 +02:00
parent a6b7c0525f
commit 8a6e72cddd
18 changed files with 121 additions and 47 deletions

3
.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/opt/homebrew/bin/python3"
}

View File

@@ -9,7 +9,7 @@
"value": "workshop-rg"
},
"numberOfInstances": {
"value": 36
"value": 9
},
"vmSize": {
"value": "Standard_D1_v2"

12
prepare-vms/delete-FD.sh Executable file
View File

@@ -0,0 +1,12 @@
#!/bin/bash
resource_group="workshop-rg"
# Create a group that bundles all
time az group create --name ${resource_group} --location westeurope
# Use the template and parameter files to delete resources within the group
time az deployment group create \
--resource-group ${resource_group} \
--template-file azuredelete.json \
--mode complete

64
prepare-vms/deploy-FD.sh Executable file
View File

@@ -0,0 +1,64 @@
#!/bin/bash
# resource_group="workshop-rg"
# # Create a group that bundles all
# time az group create --name ${resource_group} --location westeurope
# # Use the template and parameter files to create resources within the group
# time az deployment group create \
# --resource-group ${resource_group} \
# --template-file azuredeploy.json \
# --parameters @azuredeploy.parameters.json
# # When done, generate a list of ip adresses for further processing
# az vm list-ip-addresses --resource-group ${resource_group} \
# --output json \
# | jq -r '.[].virtualMachine.network.publicIpAddresses[].ipAddress' \
# > tags/fd/ips.txt
# DO a terraform prepare first...
# Wait until VMs are ready (reachable and cloud init is done)
time ./workshopctl wait fd
# Group VMs in clusters
time ./workshopctl clusterize fd
# Install a bunch of useful tools (editors, git, jq...)
time ./workshopctl tools fd
# Install and start Docker
time ./workshopctl docker fd
# Create the user that students will use
time ./workshopctl createuser fd
# Install a WEB SSH server on the machines (port 1080)
time ./workshopctl webssh fd
# Install history viewer on port 1088
time ./workshopctl tailhist fd
# Setup kubernetes clusters with kubeadm (must be run AFTER deploy)
time ./workshopctl kube fd
# Install a bunch of CLI tools for Kubernetes
time ./workshopctl kubetools fd
# Install Kubernetes and CNI binaries but don't start anything
#time ./workshopctl kubetest fd
# # Check that all nodes are reporting as Ready
# time ./workshopctl kubetest fd
# Generate ready-to-print cards for a group of VMs
time ./workshopctl cards fd
# Show the IP addresses for a given tag
time ./workshopctl ips fd
exit 0
docker run -d -p 10000:10000 snsyzb/webssh wssh --address=0.0.0.0 --port=10000

2
prepare-vms/infra/azure Normal file
View File

@@ -0,0 +1,2 @@
INFRACLASS=terraform
TERRAFORM=azure

View File

@@ -403,7 +403,7 @@ bootstrapTokens:
- token: \$(cat /tmp/token)
nodeRegistration:
# Comment out the next line to switch back to Docker.
criSocket: /run/containerd/containerd.sock
# criSocket: /run/containerd/containerd.sock
ignorePreflightErrors:
- NumCPU
---
@@ -416,7 +416,7 @@ discovery:
unsafeSkipCAVerification: true
nodeRegistration:
# Comment out the next line to switch back to Docker.
criSocket: /run/containerd/containerd.sock
# criSocket: /run/containerd/containerd.sock
ignorePreflightErrors:
- NumCPU
---
@@ -589,14 +589,6 @@ EOF
echo export PATH=/home/$USER_LOGIN/.krew/bin:\\\$PATH | sudo -u $USER_LOGIN tee -a /home/$USER_LOGIN/.bashrc
fi"
# Install k9s
pssh "
if [ ! -x /usr/local/bin/k9s ]; then
FILENAME=k9s_Linux_$HERP_DERP_ARCH.tar.gz &&
curl -fsSL https://github.com/derailed/k9s/releases/latest/download/\$FILENAME |
sudo tar -zxvf- -C /usr/local/bin k9s
k9s version
fi"
# Install popeye
pssh "

View File

@@ -1,2 +0,0 @@
INFRACLASS=generic
# This is for manual provisioning. No other variable or configuration is needed.

View File

@@ -1,25 +0,0 @@
# customize your cluster size, your cards template, and the versions
# Number clusters to identify them
clusternumber: 0
# Number of VMs per cluster
clustersize: 3
# The hostname of each node will be clusterprefix + a number
clusterprefix: node
# Version of kubernetes to use: apt list -a kubelet
kubernetes_version: 1.21
# Jinja2 template to use to generate ready-to-cut cards
cards_template: cards-v2.html
# Use "Letter" in the US, and "A4" everywhere else
paper_size: A4
# Login and password that students will use
user_login: docker
user_password: training
url: https://training.verleun.org

View File

@@ -0,0 +1,22 @@
# This file is maintained automatically by "terraform init".
# Manual edits may be lost in future updates.
provider "registry.terraform.io/hashicorp/azurerm" {
version = "3.33.0"
constraints = "3.33.0"
hashes = [
"h1:KBlWanRsjlvBrADF9+mUNqI9UpHj3R0l7c2fLC/K2u4=",
"zh:136d9c642746d8d84e62ecd8ab0c7dc015eac504c1f068e06fad438ae222d934",
"zh:266e64b8e32a94ddcc20954ebad1d8ff3921d318addf576e981b1390e5d5ba79",
"zh:3bd84a1e5b3bbe34a5870f271d6a5bf9b35a4c924db32b450a1fb53bc910c37a",
"zh:3c6604041472bb4691b502877cf9d886ed9f973fbadf11389ec9499fdc66045e",
"zh:680c00a73c8054c36a58115a44d02d1ebb675c2ad3afaaab2d74a01f978f16ce",
"zh:6dab47ef64f90e43b75ed240a974c4119f5268be4433f3c1c3e97559e7ef2f38",
"zh:9f73f19fdc340c443693dc03f1a145c6bd0ee5fd425eab7473d06abbe39b99d7",
"zh:9ff008b6737e880f191b4be6dfcef95ff019969dd787c44a58c2d7d6aaf6623b",
"zh:be297f1515e9ac63886e3e092a0bcd10aa8aa2b69c2b0995ce4e069176b07a95",
"zh:f569b65999264a9416862bca5cd2a6177d94ccb0424f3a4ef424428912b9cb3c",
"zh:fb29a566e7698cfae477f3efa3bba38526ec8343355763178c6e9c96e51399f3",
"zh:fbc3b625733ce5f0970fa8d9743f6db51064c168d6be5fc7a5e3d1a54af28bb7",
]
}

View File

@@ -1,11 +1,11 @@
variable "prefix" {
type = string
default = "provisioned-with-terraform"
default = "training-marco"
}
variable "how_many_nodes" {
type = number
default = 2
default = 9
}
locals {
@@ -18,15 +18,16 @@ Available sizes:
"Standard_F4s_v2" # CPU=4 RAM=8
"Standard_D1_v2" # CPU=1 RAM=3.5
"Standard_B1ms" # CPU=1 RAM=2
"Standard_B2ms" # CPU=2 RAM=8
"Standard_B2s" # CPU=2 RAM=4
*/
variable "size" {
type = string
default = "Standard_F4s_v2"
default = "Standard_B2ms"
}
variable "location" {
type = string
default = "South Africa North"
default = "West Europe"
}

1
prepare-vms/www/fd.html Symbolic link
View File

@@ -0,0 +1 @@
../tags/fd/ips.html

1
prepare-vms/www/fd.pdf Symbolic link
View File

@@ -0,0 +1 @@
../tags/fd/ips.pdf

3
slides/.vscode/settings.json vendored Normal file
View File

@@ -0,0 +1,3 @@
{
"ansible.python.interpreterPath": "/opt/homebrew/bin/python3"
}

View File

@@ -24,6 +24,7 @@
city: Apeldoorn
event: docker workshop
title: "Docker, focus on airgapped environments"
slides: https://training.verleun.org/intro-fd-docker.yml.html#1
lang: nl
- date: 2023-06-12

View File

@@ -20,10 +20,9 @@ content:
- containers/intro.md
#- k8s/intro.md
- shared/about-slides-v2.md
#- shared/chat-room-im.md
#- shared/chat-room-slack.md
#- shared/chat-room-zoom-meeting.md
#- shared/chat-room-zoom-webinar.md
- shared/toc.md
-

View File

@@ -22,7 +22,7 @@ forever)
while true; do
fswatch -1 *html
upload
git add .
done
;;
esac