Code Monkey home page Code Monkey logo

install-k8s-lunanode's Introduction

install-k8s-lunanode

This repository is here to set up a sandbox to train kubernetes students. Couple of
scripts create the environment in Lunanode, a cloud service provider in Toronto, they have the lowest price. for KVM virtual machines. Their service is awesome.

see their website here.

First create all cluster VMs

Get an API credentials from the lunanode website, see here
Save your API credentials in a file under your $HOME directory, change the line 7 in the file create_vm_cluster.py accordingly to your environment.
This script is a quick and dirty experimental solution for setting up a cluster of 1 master and 2 nodes. It's linear so read it as it's be done and make some tests beforehand
So I use to change it by naming each VM using a color reference, line 15 and test it in line 35
(Note: I set a timer -line 25- for letting lunanode enough time for provisioning all public IP addresses for each VMs)

Inventory

The create_vm_cluster script save all cluster ip addresse, password and user name in a file so you should change it accordingly to the following structure for your inventory file.

[node]
ip_address  ansible_ssh_user=ubuntu  ansible_ssh_pass=password ansible_ssh_extra_args='-o StrictHostKeyChecking=no'
ip_address  ansible_ssh_user=ubuntu  ansible_ssh_pass=password ansible_ssh_extra_args='-o StrictHostKeyChecking=no'
[master]
ip_address  ansible_ssh_user=ubuntu  ansible_ssh_pass=password ansible_ssh_extra_args='-o StrictHostKeyChecking=no'

And run the playbook !!!

Example:
ansible-playboox -i /home/hme/iventory playbook

##Note: If you are outside the lunanode network you should change the following code suitable to your network topology.

- name: get primary ip address
      shell: ip route get 1 | awk '{print $NF;exit}'

install-k8s-lunanode's People

Contributors

dockerlite avatar

Watchers

 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.