futurewei-cloud / merak

Merak: Large-scale cloud emulator
MIT License
5 stars 9 forks source link

"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."

Merak

A Large-scale Cloud Emulator provides ability to

Platforms

There are many different hardware resource management platform in the field, currently we choose two platforms to investigate and create our prototype:

Architecture

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.

Merak Architecture

Components

Scalability

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.

Kind: Simple Deployment and E2E Test

This test will bring up Merak and Alcor in a single master node Kind Kubernetes cluster.

Prerequisites

Step 1: Deploy

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.

Successful Merak Deployment

Step 2: Run The Test

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.

  1. Run kubectl get pods -A to see all vhost pods. Step 1

  2. 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. Step 2

  3. 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) Step 2

Clean-up:

Run the command below to clean up the Kind environment.

kind delete cluster

Getting Started With Development

To build this project, please make sure the following things are installed:

Then, the project can be built with:

make

How to Deploy a Development Cluster

Prerequisites

Before deploying Merak with Alcor, you will need the following.

NOTE: Please wait for all LinkerD pods and containers to be fully running before moving on to the steps below.

LinkerD

Deployment

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:

Successful Merak Deployment

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 -