Git Product home page Git Product logo

borathon-k8s's Introduction

This is a prototype of kubernetes deployment on vCenter.

Setup

For VM deployment

  • 1 vCenter.
  • 1 ESX.
  • 1 datastore with at least 40GB of space.

For running this kubernetes deployment service

Currently the prototype has been tested by running the service in eclipse only.

Installations

  • Install ISO generation utility genisoimage or mkisofs.
  • Download and install JDK 8 (latest patch).
  • Download and install latest version of gradle from https://gradle.org/gradle-download/.
  • Install latest version of Eclipse IDE.
  • Install gradle eclipse plugin (buildship) in eclipse.

Building and importing project in eclipse

  • Clone this repo and go to java directory> cd [project-dir]/vcs-proto1/java
  • Build the project by executing command> gradle build
  • Once the project has built successfully import [project-dir]/vcs-proto1/java as gradle project in eclipse. The parent gradle project (build.gradle file) is in vcs-proto1/java directory.

Property files

  • Edit java/common/src/main/resources/vcs.properties file as per your dev environment setup.
  • Edit java/vsphere-client/src/main/resources/vsphere-client.properties to point to your vCenter setup.

Running the service

  • The main class for this service is com.vmware.vcs.core.Main. Run this as Java application with the following program and VM arguments.
    • Under program arguments specify “java/common/src/main/resources/vcs.properties” file as an argument.
    • Under VM arguments specify “-Dvsphere-client-properties=vsphere-client.properties –Dssl.trustAll.enabled=true”

Using this service

Users will need REST API client to interacte with this service.

 { "clusterState" : "CREATING",
   "clusterName" : "cluster1", 
   "clusterType" : "KUBERNETES", 
   "imageId" : "Kubernetes-image.vmdk", 
   "projectId" : "k8s-project", 
   "vmNetworkId" : "VM Network", 
   "diskFlavorName" : "Disk flavor", 
   "masterVmFlavorName" : "Master flavor", 
   "otherVmFlavorName" : "Slave Flavor", 
   "slaveCount" : "1", 
   "extendedProperties" : { 
      "etcd_ips" : "10.20.104.90", 
      "dns" : "10.20.145.1", 
      "gateway" : "10.20.107.253", 
      "netmask" : "255.255.252.0", 
      "master_ip" : "10.20.104.92", 
      "container_network" : "10.20.0.1/20" 
     } 
  }
  • Modify clusterName, etcd_ips, dns, gateway, netmask, master_ip to appropriate values as per your setup.

Note

  • There will be a parent image VM and snapshot created in vCenter. Do not delete the VM and snapshot.
  • First cluster creation might take some time due to image upload.

borathon-k8s's People

Contributors

prashima avatar

Watchers

Miao Luo avatar  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.