Giter Club home page Giter Club logo

mokctl's Introduction

My Own Kind

View a Transcript of the screenscast.

Features

  • Tracks the latest stable version

  • After downloading 'build' images a single node cluster builds in under 60 seconds

  • Very simple to use without need for YAML files

  • Builds kubernetes master and worker nodes in containers

  • Can create multi-master and multi-node clusters

  • Can create an haproxy load balancer to front master nodes with '--with-lb'

  • For multi-node clusters the 'create cluster' command returns when kubernetes is completely ready, with all nodes and pods up and ready.

  • Can skip master, worker, or load balancer set up

    • In this case the set-up scripts are placed in /root in the containers

    • The set-up scripts can be run by hand

    • Can do kubernetes the hard way (see kthwic)

  • Each release tested by AI and test logs saved in e2e-logs

  • Build and create can show extensive logs with '--tailf'

  • Supports docker, podman and moby

  • Written in Bash in the style of Go for maintainability - see Why Bash? and src/

Install on Linux, Mac or Windows

Note for Fedora Linux users: Cgroups 2 must be disabled. See Linux Installation Options.

Ensure Docker or Moby are installed first.

Add the following to your shell startup file, for example ~/.bashrc or ~/.zshrc:

alias mokbox='docker run --rm -ti --hostname mokbox --name mokbox -v /var/run/docker.sock:/var/run/docker.sock -v /var/tmp:/var/tmp myownkind/mokbox'

Close the terminal and start it again so the alias is created.

Then 'log in' to the work container:

mokbox

Use mokctl and kubectl, which are already installed in the 'mokbox' container:

mokctl build image --get-prebuilt-image

mokctl create cluster myk8s --masters 1

export KUBECONFIG=/var/tmp/admin-myk8s.conf

kubectl get pods -A

Type exit or Ctrl-d to 'log out' of mokbox. The mokbox container will be deleted but the kubernetes cluster will remain, as will the kubectl file,/var/tmp/admin-myk8s.conf.

To remove the kubernetes cluster:

mokbox

export KUBECONFIG=/var/tmp/admin-myk8s.conf

mokctl delete cluster myk8s

exit

Two docker images will remain, 'myownkind/mokbox' and 'myownkind/mok-centos-7-v1.19.1'. Remove them to reclaim disk space, or keep them around to be able to quickly build kubernetes clusters.

See also:

mokctl's People

Contributors

mclarkson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

mokctl's Issues

Bash and zsh completion

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

When I'm writing mokctl commands I would like to be able to use tab to complete the options

Describe the solution you'd like
A clear and concise description of what you want to happen.

bash and zsh completion

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

There are none I can think of

Additional context
Add any other context or screenshots about the feature request here.

Make JSONPath.sh use the MOK shell programming style.

Describe the bug
JSONPath.sh has been imported to remove nasty sed lines from the mokctl code, but JSONPath.sh pollutes the global namespace.

To Reproduce
Look at the top of JSONPath.sh. It pollutes the global namespace.

Expected behavior
Its global variables should be in the MOK shell style - in an associative array.

Screenshots
N/A

Desktop (please complete the following information):
N/A

Smartphone (please complete the following information):
N/A

Additional context
All globals should be put in an associative array, _JP maybe. It should initialise itself.

Extend mokctl to add worker nodes

CLI Interface extension:

mokctl edit cluster CLUSTNAME add worker X
mokctl edit cluster CLUSTNAME delete worker X

or something similar.

Extend mokctl to `mokctl exec` into a 'node'

Is your feature request related to a problem? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

After a cluster is installed I would like to use mokctl exec to exec into it rather than using docker exec

Describe the solution you'd like
A clear and concise description of what you want to happen.

mokctl exec myclust-master-1 - to exec into the myclust cluster master-1 node.

mokctl exec - will give me a list of nodes I can log into (probably using select) then I just press the number and enter.

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

Using docker exec is fine, I just want a shorter version.

Additional context
Add any other context or screenshots about the feature request here.

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.