Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Builds Nuvolaris test environment and run tests against them

License

Notifications You must be signed in to change notification settings

pmarchini/nuvolaris-testing

 
 

Repository files navigation

nuvolaris-testing

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.

How to build a test cluster in a physical server running Kubernetes

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.

  1. Change to ansible and generate a ssh keypair in inventory/id_rsa
  2. Copy the public and private key to access the server without password
  3. Generate a configuration running ./config.py, see below for the parameters
  4. run ./play.sh <cluster>
  5. access to the server with Kubernetes in it with kubectl --kubeconfig kubeconfig

Configuration examples

KVM with Microk8s

Syntax

./config.py kwm <name> <server-hostname> <priv_key-file> <pub_key-file> <node-count> <disk-size-in-gb> <mem-size-in-gb> <num-of-vcpu>

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 [email protected]
# 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

AWS

./config.py eks aws <key> <secret>

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 [email protected]
# 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

How to destroy the cluster

./play.sh m8s clean

About

Builds Nuvolaris test environment and run tests against them

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 63.7%
  • Shell 26.9%
  • Python 9.4%