This repo includes our test suite and the scripts to build our test environments.
You can discuss it in the #nuvolaris-testing discord channel and in the forum under the category testing.
Check this developer guide for informations how to improve it.
Steps to follow, see below for an example:
Get a remote server running Ubuntu 20.04, say test.server
You need at least 64gb of memory and 8 cores.
- Change to
ansible
and generate a ssh keypair ininventory/id_rsa
- Copy the public and private key to access the server without password
- Generate a configuration running ./config.py, see below for the parameters
- run
./play.sh <cluster>
- access to the server with Kubernetes in it with
kubectl --kubeconfig kubeconfig
Note that full syntax is ./play.sh <cluster> [<tag> [<script>]]
So you can select a tag and execute only a part of the script select by <tag>
(not documented here).
Also you can use alternative scripts.
Syntax
./config.py kwm <name> <kube-type> <server-hostname> <priv_key-file> <pub_key-file> <node-count> <disk-size-in-gb> <mem-size-in-gb> <num-of-vcpu>
<kube-type>
can be microk8s
or okd
Example:
# 1 generate keys
cd ansible
ssh-keygen -f inventory/id_rsa
# 2 copy to the test server (change test.server with your own)
ssh-copy-id -i inventory/id_rsa root@test.server
# 3 generate a config names m8s with 4 nodes 20gb disk 8gb memory and 2 vcpu each
./config.py m8s kvm microk8s magrathea.academy inventory/id_rsa inventory/id_rsa.pub 4 20 8 1
# 4 install everything
./play.sh m8s
# 5 check everything works
kubectl --kubeconfig kubeconfig/m8s/kubeconfig get nodes
TODO: add other kinds of kubernetes: k3s, kubeadm etc
./config.py eks aws <key> <secret> <region> <vm-type> <node-count> <disk-size>
Example:
/config.py eks aws AAAAAAAAAAAA abcdefghilmnopqrstuwwxyz
#./play.sh eks
Example using microk8s
:
# 1 generate keys
cd ansible
ssh-keygen -f inventory/id_rsa
# 2 copy to the test server (change test.server with your own)
ssh-copy-id -i inventory/id_rsa root@test.server
# 3 generate a config names m8s with 4 nodes 20gb disk 8gb memory and 2 vcpu each
./config.py m8s test.server microk8s 4 20 8 2
# 4 install everything
./play.sh m8s
# 5 check everything works
kubectl --kubeconfig kubeconfig/m8s/kubeconfig get nodes
Select the corresponding cleaninig script with the cluster configuration and select the tag clean.
- KVM:
./play.sh clean
- AWS:
./play.sh clean