Skip to content

Files

Latest commit

93903b2 · Apr 11, 2022

History

History

scripts

Edge Cluster Multi-Layer Setup using Bash Scripts

Virtual Machine Configuration

  • 3 Ubuntu 18.04 VMs, one for cloud-core, two for edge-core.
  • Open the port of 10000 and 10002 in the security group of the cloud-core machine and edge-core machine
  • EC2 Instance: t3.2xlarge, 128 GB Storage.

Host Machine 1: Cloud Core Node (Root Operator)

Host Machine 2: Cloud Core And Edge Core Node

Host Machine 3: Edge Core Worker Node

A Step-by-Step Process for Setting up all Machines (For AWS EC2 Instances)

  • Step 1.1: Switch to ROOT user:
sudo su
  • Step 1.2: Run the following command on all the Three Host Machines only after switching to 'root' user
cat /home/ubuntu/.ssh/authorized_keys  > /root/.ssh/authorized_keys
  • Step 1.3: Create project folder and Clone the Fornax Repository
mkdir -p /root/go/src/github.com
cd /root/go/src/github.com
git clone https://github.com/click2cloud-alpha-p/fornax.git

Run the scripts (Only after completing step 1. in all the three machines):

For Host Machine 1:

  • Step 2.1: Create two empty files (like aws-keypair-2.pem & aws-keypair-3.pem) with extension .pem in host-1 & Update these .pem files by copying the content of host-2 & host-3 aws-keypair .pem (keypair which was generated while launching the instance-2 and instance-3) files respectively :
touch aws-keypair-2.pem
vi  aws-keypair-2.pem
touch aws-keypair-3.pem
vi  aws-keypair-3.pem
  • Step 2.2: Run the command
sudo bash fornax/scripts/host_1.sh
  • Step 2.3: Input the Private IP's of Hosts and keypair path:

    image

For Host Machine 2: (Run the script only after successfully running the Machine-1 script)

  • Step 3.1: Create an empty file with extension .pem in host-2 & Update that .pem file by copying the content of host-3 aws-keypair .pem file (keypair which was generated while launching the instance-3) :
touch aws-keypair-3.pem
vi aws-keypair-3.pem
  • Step 3.2: Run the command
sudo bash fornax/scripts/host_2.sh
  • Step 3.3: Input the Private IP of host-3 and keypair path:

image

For Host Machine 3: (Run the script only after successfully running the Machine-2 script)

  • Step 4: Run the command
sudo bash fornax/scripts/host_3.sh

Note: prerequisite_packages.sh contains all the required packages for creating Kubernetes Cluster.

Verify the Edge cluster by running command in Host Machine 1:

kubectl get edgecluster

image

To see Cloudcore & Edgecore logs:

cd $HOME/go/src/github.com/fornax
cat cloudcore.logs
cat edgecore.logs

To verify Cloudcore & Edgecore is running currently:

ps -aef | grep _output/local/bin/cloudcore | grep -v sh| grep -v grep
ps -aef | grep _output/local/bin/edgecore | grep -v sh| grep -v grep

image