"This Project has been archived by the owner, who is no longer providing support. The project remains available to authorized users on a "read only" basis."
A Large-scale Cloud Emulator provides ability to
There are many different hardware resource management platform in the field, currently we choose two platforms to investigate and create our prototype:
The following diagram illustrate the high-level architecture of Merak on a kubernetes cluster using Meshnet CNI and the basic workflow to emulate Alcor's control plane for creating VMs in the emulated compute nodes.
In order to provide more virtual and emulated resources with limited hardware resources, three possible solutions are investigated and developed in this project:
For more detail design and information, please refer to the docs folder in this repository.
This test will bring up Merak and Alcor in a single master node Kind Kubernetes cluster.
Minimum Machine Requirements (Our tests were ran on AWS t2.2xlarge ec2 instances)
Update
sudo apt-get update
sudo apt-get install make
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
curl --proto '=https' --tlsv1.2 -sSfL https://run.linkerd.io/install | sh
export PATH=$PATH:/home/ubuntu/.linkerd2/bin
curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.17.0/kind-linux-amd64 && chmod +x ./kind && sudo mv ./kind /usr/local/bin/kind
curl -LO https://dl.k8s.io/release/v1.26.0/bin/linux/amd64/kubectl && sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
sudo apt-get install docker.io
sudo groupadd docker
sudo gpasswd -a $USER docker
newgrp docker
You can deploy Merak and Alcor in Kind with the command below.
git clone https://github.com/futurewei-cloud/merak.git
cd merak
make kind-alcor
Please wait for all pods to be in running state as shown in the picture below before proceeding to the next step. This should take approximately 5 minutes.
You can use the prebuilt test tool as shown below.
./tools/teste2e/bin/teste2e
This will create 5 hosts with 10 VM each. Once everything is created, you can test network connnectivity as shown below.
Run kubectl get pods -A
to see all vhost pods.
Merak uses network namespaces to emulate VMs, run kubectl exec -it -n <namespace of the pod> vhost-0 ip netns exec v000 ip a
to get the IP address of the emulated VM v000
inside of the emulated host vhost-0
.
Ping the VM v000
on vhost-0
from a different VM on vhost-1
with the following command kubectl exec -it -n <namespace of the pod> vhost-1 ip netns exec v000 ping (IP address from step 2)
Run the command below to clean up the Kind environment.
kind delete cluster
To build this project, please make sure the following things are installed:
Then, the project can be built with:
make
Before deploying Merak with Alcor, you will need the following.
curl https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 | bash
apt install openvswitch-switch
)NOTE: Please wait for all LinkerD pods and containers to be fully running before moving on to the steps below.
Once your cluster is ready, you can deploy the latest small scale development (one replica for every service) build of Merak and Alcor with the command below.
kubectl kustomize https://github.com/futurewei-cloud/merak/deployments/kubernetes/alcor --enable-helm | kubectl apply -f -
A successful deployment should take roughly 5 minutes for all pods to come to running
state.
The deployed components are as follows:
The deployment settings such as container image and replicas can be changed by editing the kustomize file under deployments/kubernetes/alcor/kustomization.yaml
and redeploying with
kubectl kustomize deployments/kubernetes/alcor --enable-helm | kubectl apply -f -