- The following steps require a bash environment. Please configure the default shell in your CloudLab account to be bash. For how to configure bash on Cloudlab, Please refer to the post "Choose your shell": https://www.cloudlab.us/portal-news.php?idx=49
- When starting a new experiment on Cloudlab, select the small-lan profile
- In the profile parameterization page, - Set Number of Nodes as X - Set OS image as Ubuntu 20.04 - Set physical node type as xI170 - Set Link Speed as 10Gb/s - Please check Temp Filesystem Max Space - Keep Temporary Filesystem Mount Point as default (/mydata)
- Wait for the cluster to be initialized (It may take 5 to 10 minutes)
- Clone this repository on every node
git clone https://github.com/chaojin0310/scripts.git
and go to the root directory of the repository.
Run ./partition.sh
at each node. The partition.sh script will reboot the server.
Note that this step is needed to perform only once after the cluster starts, no matter the node is rebooted or reloaded.
Run ./mount.sh
at each node after the node finishes rebooting.
If you reload the server, you need to start from this step.
- Run
./env_setup.sh
at each node. This script will flush the IP table, install docker and a recent release of go and so on to prepare for the installation of Kubernetes and Knative. - Run
source ~/.bashrc
to activate some necessary environment variables. - If you require to compile Knative manually, you have to close current remote connection to the server and reconnect to it. Then run
docker login
to configure a DockerHub account.
- Run
./k8s_build.sh
at each node. This script compiles k8s from its source code (release-1.25). Themake
process will last for about 10 minutes. You could also reference tok8s_install.sh
to install some k8s tools using apt. - Choose a node as your k8s cluster controller.
- At the controller node, run
./controller.sh <controller_ip>
, where<controller_ip>
is the public IP address of the controller node. - At other nodes, run
sudo kubeadm join <controller_ip> --token <token> --discovery-token-ca-cert-hash <hash>
after the controller has been intialized. Thekubeadm join
command is generated at the controller node.
If you want to modify some k8s code and remake it, run ./k8s_rebuild.sh
at each node (you need to add some components that need to be remaked in the script first). Then start from step ./controller.sh <controller_ip>
.
Run ./kn_install.sh
at the controller node.
If you need to compile Knative manually, please refer to kn_build.sh
.
- Run
./ceph_install.sh
at the controller node. - Run
source ~/.bashrc
after the ceph cluster finishes initialization.
- Run
./k8s_install.sh master <controller_ip>
at the controller node and run./k8s_install.sh slave
at other nodes. - At other nodes, run
sudo kubeadm join <controller_ip> --token <token> --discovery-token-ca-cert-hash <hash>
after the controller has been intialized. Thekubeadm join
command is generated at the controller node. - Run
source ~/.bashrc
at all nodes.
- Run
./ceph_install.sh
at the controller node. - Run
source ~/.bashrc
after the ceph cluster finishes initialization.