Skip to content

Cloud-infra is open source software for setting up Kubernetes cluster for developers.

License

Notifications You must be signed in to change notification settings

go4clouds/cloud-infra

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

80 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Cloud-infra

Cloud-infra is open source software for setting up Kubernetes cluster for developers.

Table of Contents

Features

  • Install Kubernetes cluster for learning, testing and developing applications.

Installation

Quickstart

On Linux server execute script:

cd cloud-infra
./configure.sh

It will automatically configure your server for cloud-infra project. Otherwise look below what manual changes should be done on your server.

Manual installation

  1. First of all chceck is there any new packages that have just come to the repositories and fetch new versions of packages existing on the machine:

    sudo apt update && apt upgrade --yes
  2. Install required packages:

    sudo apt install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils virt-manager git-core libguestfs-tools jq
  3. Add your user to the libvirt and kvm group:

    sudo usermod -a -G kvm $(whoami)
    sudo usermod -a -G libvirt $(whoami)

    3.a. Now you can check user permissions by command:

    id

    Remember: If user has 0 it means that user is root, numbers 1000+ means that's normal user

  4. Only on ubuntu: Change parameter security_driver in /etc/libvirt/qemu.conf from security_driver = "selinux" to security_driver = "none":

    sudo sed -i -e 's/#security_driver = "selinux"/security_driver = "none"/g' /etc/libvirt/qemu.conf
  5. Start libvirtd and check status:

    sudo systemctl start libvirtd
    sudo systemctl status libvirtd
  6. Download your favorite Linux cloud image e.g. Ubuntu Cloud Image to /var/lib/libvirt/images directory:

    sudo  curl -L https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64.img --output /var/lib/libvirt/images/focal-server-cloudimg-amd64.img
  7. Install Terraform project on you environment:

    sudo curl -fsSL https://apt.releases.hashicorp.com/gpg | sudo apt-key add -
    sudo apt-add-repository "deb [arch=$(dpkg --print-architecture)] https://apt.releases.hashicorp.com $(lsb_release -cs) main"
    sudo apt install terraform
  8. Clone cloud-infra to your pc:

    git clone https://github.com/go4clouds/cloud-infra
  9. Copy settings file for Terraform:

    cd ~/git/cloud-infra/libvirt
    cp terraform.tfvars.examples terraform.tfvars
  10. Copy your ssh-key to terraform.tfvars:
    Show your key and copy it

    cat ~/.ssh/id_rsa.pub

    If you don't have ssh keys, you can create them using command:

    ssh-keygen

    Open terraform.tfvars placed in ~/git/cloud-infra/libvirt/

    vim ~/git/cloud-infra/libvirt/terraform.tfvars

    and paste your key as shown:

    authorized_keys = [
    "<YOUR_KEY>"
    ]
  11. Start Terraform:

    terraform init
    terraform plan
    terraform apply --auto-approve
  12. After all, you can clean up using:

    terraform destroy --auto-approve

Technologies used

Cloud-infra uses a number of open source projects to work properly:

  • Terraform - codifies cloud APIs into declarative configuration files
  • Kernel Virtual Machine - is a full virtualization solution for Linux on x86 hardware containing virtualization extensions
  • Libvirt - is a toolkit to manage virtualization platforms
  • Bridge Utils- a utility needed to create, manage and setting up networks for a hosted virtual machine
  • Virtual Machine Manager- is a desktop user interface for managing virtual machines through libvirt
  • Git- version control system
  • Virtual Machine Manager- tools for accessing and modifying virtual machine disk images

And of course Cloud-infra is open source with a repository on GitHub.

Requirements

Hardware for properly working Cloud-infra
Physical server or PC with:

Recommended
CPU 8x core
RAM 24 GB
Disk Space 256 GB
OS Linux OS

Plugins

Plugins for Cloud-infra

Plugin Readme
dmacvicar Readme
hashicorp/null Readme
hashicorp/template Readme

License

Apache-2.0 License

About

Cloud-infra is open source software for setting up Kubernetes cluster for developers.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published