Giter Site home page Giter Site logo

lxclab-builder's Introduction

Lab2022

Amit Karia Lab 2022

Setup Lab (To help automate this, working on setup_host.sh which is currently a work in progress)

To setup a Multi Node MicroK8s Cluster on an Ubuntu 22.04 Desktop Physical Installation (also works inside an Ubuntu 22.04 VM)

Open a terminal

sudo apt install git

cd $HOME

git clone https://github.com/akaria2001/Lab2022.git bin

cd bin

bash setup_host.sh

ssh-keygen -t rsa

Enter the default options

Copy the contents off $HOME/.ssh/id_rsa.pub to the cloud-init-test.yaml file at line 15

cd $HOME/bin

source/bin/activate

time python3 k8_cluster.py

The last script will create the nodes as defined in kubernetes_vms.toml, by default it will create them as LXC system containers, but you can change the type value to vm to use QEMU KVM VMs instead

It used cloud-init to bootstrap the nodes and then ansible for installing MicroK8s


Manual Steps

On New Ubuntu 22.04 Desktop Install

Open a terminal

Install git

sudo apt install git

Install LXD

sudo snap install lxd lxd init - default except ipv6

lxc profile create microk8s

wget https://raw.githubusercontent.com/ubuntu/microk8s/master/tests/lxc/microk8s.profile -O microk8s.profile

cat microk8s.profile | lxc profile edit microk8s

Install Python Packages

sudo apt install python3-pip and python3-virtualenv -y

Download Git Repo -

cd $HOME

git clone https://github.com/akaria2001/Lab2022.git bin

cd bin

Setup virtualenv and enable it

virtualenv . source bin/activate

Python Modules in virtual env

flask psutil toml

pip3 install flask psutil toml

Open up a 2nd terminal and navigate to $HOME/bin

cd $HOME/bin

activate the virtual env in the 2nd terminal

source bin/activate

In first terminal launch the Flask Web App

python3 frontend.py

Connect to interface via your web browser (http://:35000)

Go back to first terminal and run the script to create the Linux Instances

time python3 linux_stack.py

lxclab-builder's People

Contributors

akaria2001 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.