GithubHelp home page GithubHelp logo

awesomegolang / archon Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kubeup/archon

0.0 3.0 0.0 100.6 MB

Cluster operation the Kubernetes way

License: Apache License 2.0

Dockerfile 0.01% Makefile 0.27% Go 98.69% Shell 0.84% Python 0.19%

archon's Introduction

Archon

CircleCI

Archon is a Kubernetes controller managing computing resources based on the operator pattern. Sysadmins could use it to automate their daily work eg. bootstrapping, updating and scaling servers. It is primarily designed for Kubernetes clusters but can easily be extended to other distributed clusters due to its declarative nature.

Archon is designed following the principles of Kubernetes and it works as an extension of Kubernetes using ThirdPartyResource. Users create abstract cluster definitions with yaml files. Archon will render the definition resources and create computing resources accordingly in the configured cloud provider. Then users could update and scale the cluster using kubectl in the same way as managing containers.

WARNING: Archon is currently in beta status.

See it in action

Features

Archon itself is a general purpose execution engine. It provides following fundamental capabilities:

  • Certificates management. Creating CA, signing new certificates with Secret.
  • Network management. Create VPC from definition resource and manage its lifecyle.
  • User management. Create user definitions used as default users for instances.
  • Instance group management. Manage a group of instances with similar configurations. Scale the group by changing the replicas field.
  • Instance management. Create instance with generated userdata for cloudinit from definition resource. Manage the instance lifecyle by watching its status.

We have put together some examples to showcase various ways to bootstrap and manage a Kubernetes cluster with Archon with following features:

  • HA master to prevent single point of failure
  • Rolling update by creating a new instance group and delete the old one
  • Support various operating systems using bootkube or kubeadm
  • Scale the cluster with one command
  • Manage baremetal servers using matchbox and PXE

Why Archon

We already have tools like kubeadm and kops. Why do we need another tool for a similar job? Here are bunch of reasons:

  1. Tools exist today are mainly imperative. Declarative tools will help users share their experience by publish their own cluster definitions. Also users could easily make small customization based on existing template using declarative tools.
  2. Self-hosted Kubernetes sounds like a promising idea and we need cluster management tools which could be easily integrated into current Kubernetes architecture.
  3. There're many different environment to launch a Kubernetes cluster in, an unified experience and easy to extend codebase will help developers to collaborate by adding more cloud provider and os support.

How it works

Archon use Kubernetes as its base. Just like the way you use Kubernetes, define resources in your cluster by creating yaml files using our customized resource types. Then manage its lifecycle using kubectl. Until now, we support these resources:

  • User
  • Network
  • InstanceGroup
  • Instance
  • ReservedInstance

The archon-controller which you should launch beforehand in the cluster will create and manage its status based on your definition.

You might find the idea that bootstrapping a new Kubernetes cluster with an existing one too complex. But after your cluster got initialized, you can move all the definitions and controllers into the new cluster and let it manage itself. It will be very convenient that you can manage both applications running in your cluster and the cluster itself with just the kubectl cli tool.

Supported platforms

Supported cloud providers:

Supported baremetal provisioners:

Supported operating system:

Supported bootstrapping tool:

At the moment, we only support limited cloud providers and oses. More cloud providers and operating systems support will be added when the core is stable.

Installation

You could launch Archon locally or install it into your cluster.

Download

Download the latest release from Github.

wget https://github.com/kubeup/archon/releases/download/v0.3.0/archon-controller-v0.3.0-linux-amd64.gz
gunzip archon-controller-v0.3.0-linux-amd64.gz
chmod +x archon-controller-v0.3.0-linux-amd64
mv archon-controller-v0.3.0-linux-amd64 /usr/local/bin/archon-controller

On OSX, just change linux to darwin:

wget https://github.com/kubeup/archon/releases/download/v0.3.0/archon-controller-v0.3.0-darwin-amd64.gz
gunzip archon-controller-v0.3.0-darwin-amd64.gz
chmod +x archon-controller-v0.3.0-darwin-amd64
mv archon-controller-v0.3.0-darwin-amd64 /usr/local/bin/archon-controller

Launch locally

Then config AWS credentials and start running the embeded Kubernetes server along with archon-controller:

export AWS_ACCESS_KEY_ID=YOUR_AWS_KEY_ID
export AWS_SECRET_ACCESS_KEY=YOUR_AWS_SECRET
export AWS_ZONE=YOUR_CLUSTER_ZONE
archon-controller --local --cloud-provider aws

You can also use Aliyun:

export ALIYUN_ACCESS_KEY=YOUR_ALIYUN_KEY_ID
export ALIYUN_ACCESS_KEY_SECRET=YOUR_ALIYUN_SECRET
archon-controller --local --cloud-provider aliyun

The server will listen on localhost:8080 and server data will be saved to ./.localkube folder.

Create cluster resource with kubectl

By default, kubectl will talk with the server on localhost:8080, you can create an example cluster with:

kubectl create -f examples/k8s-simple

After a while, you could get the ip address for the server:

kubectl get instance -o yaml

And ssh into the server with the default password archon:

ssh core@SERVER_IP

In cluster deployment

Please follow these instructions if you plan to deploy Archon into your cluster:

Example

We believe every cluster is different. So we provides some ways to bootstrap a Kubernetes cluster as examples. You could choose one as the starting point and customize it to match your needs.

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.