Coder Social home page Coder Social logo

kubernetes-config's Introduction

Micro on Kubernetes

This repo provides the config to run Micro on Kubernetes

An example deployment is currently running at web.micro.pm leveraging Google Container Engine.

Note: This is by no means a highly available deployment. It's for testing purposes. In the future we'll lay out a highly scalable and fault tolerant regional and global deployment model.

What's in the repo?

Currently config to run Micro on Kubernetes (Testing on Google Container Engine).

  • Registry - Service Discovery using consul
  • Database - Percona with Galera (single cluster for now)
  • Micro - API, Web UI and Sidecar (spins up GCE Load Balancers)
  • Platform - All the micro platform services and dashboards
  • Misc - other miscellaneous services

Demo

Micro Demo (SSL soon):

Play via CLI

The Micro CLI now supports proxying via the sidecar. Try it out.

micro --proxy_address=proxy.micro.pm list services
consul
go.micro.api
go.micro.api.geo
go.micro.sidecar
go.micro.srv.auth
go.micro.srv.config
go.micro.srv.db
go.micro.srv.discovery
...

Getting Started

If you want to run the demo yourself, look no further.

Here's the steps I took to get started.

Kubernetes on Google Container Engine

Google Container Engine is the easiest way to run a managed kubernetes cluster. What's even better? $300 free credit for 60 days.

  1. Get yourself a Free Trial of Google Container Engine https://cloud.google.com/free-trial/
  2. Spin up a 3-4 node Kubernetes cluster
  3. Setup your kubectl command https://cloud.google.com/container-engine/docs/before-you-begin
Launch all the things

This repo contains all the kubernetes config files with docker images prebaked. Just kick them off and all should be well.

If you don't want to run everything you can just start what's in the registry/ and micro/ directories. We'll start there anyway.

First you may want to change the hostnames for CORS support in the API and WEB proxy. We're running a live demo on these hostnames hence them being present.

$ find . -name *.yaml | xargs grep micro.pm
./micro/micro-api.yaml:            "--api_cors=http://api.micro.pm",
./micro/micro-web.yaml:            "--web_cors=http://web.micro.pm",

Ok next.

  1. Start Registry
  2. Start Micro

Optional:

  1. Start Database
  2. Start Platform
  3. Start Miscellaneous Services
Starting things

We'll start the registry and micro first

for dir in registry micro; do
	pushd $dir
	for config in *.yaml; do
		kubectl create -f $config
	done
	popd
done
Start optional things

Look in database/ to see how to bootstrap the DB. It requires running some commands for databases, tables and grants. Otherwise use same method as above to start the database, platform and other services.

Screenshots

1

2

3

4

kubernetes-config's People

Watchers

 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.