GithubHelp home page GithubHelp logo

echome-k8s-launcher's Introduction

ecHome Kubernetes Launcher

Dockerfile and small set of scripts that automatically launches a Kubernetes cluster in an ecHome server. The image is built upon ubuntu:18.04 and install Python3, Ansible, the ecHome-cli and Kubespray

Although limited in functionality for testing, the idea is that this will become a function in ecHome to be able to launch a k8s environment. In the future, this will use a python script with the echome-sdk and would be more customizable in addition to using pre-configured images instead of Kubespray through ansible to set them up.

Building and running

In this scripts current configuration:

Copy the echome_env.list.template file to echome_env.list and fill in the variables. Modify inventory.ini with the desired local network IPs that the instances will use. These VMs should not exist and the IP addresses should be available as the init.sh script will automatically create the VMs with these IPs.

Modify k8s-cluster.yml to optionally include or remove any features.

Run the following commands locally on your computer (assumed linux/mac):

docker build --tag k8s-deployer:0.1.0 .

docker run --env-file echome_env.list -i k8s-deployer:0.1.0

When it completes, ssh into the primary (first) node and run the following to use kubectl:

sudo cp /etc/kubernetes/admin.conf $HOME/ && sudo chown $(id -u):$(id -g) $HOME/admin.conf && export KUBECONFIG=$HOME/admin.conf

Or grab the file contents from /etc/kubernetes/admin.conf to your local machine and use kubectl locally.

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.