headnode

module
v1.0.0-alpha.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2019 License: Apache-2.0

README

EdgeNet Head Node

This repository hosts the code that implements an early version of the EdgeNet Project's head node. The head node is where the portal interacts with Kubernetes and makes requests for new workers to be added to the DNS.

Components

The EdgeNet project code is split into two parts: A user-visible Web front end, and a back end that interfaces with Kubernetes.

The front end is a Google App Engine web app written in Python / webapp2, with Jinja templates. It lets the user register an account and agree to the Acceptable Usage Policy (AUP), and then hands out credentials in the form of a Kubernetes configuration. With this config, the user can access their personalized Kubernetes dashboard for further interactions with their resources on the Sundew cluster.

The back end is an app written in Go that is only accessible via the front end. For various routes in its app, it gets the benefit of client-go and Go packages for talking to the Kubernetes cluster of EdgeNet and makes use of the Namecheap API. Addition to these, Kubernetes custom controller called nodelabeler lists and watches the nodes of the cluster to detect add & edit node operations, and then attaches geolabels on them by using GeoLite2. The API documentation which describes the main functionallities of the head node is created by Postman.

Design Options Deferred For The Prototype

As of the May 2018 prototype,

  • There is only a single Kubernetes head node for all users in the cluster. We will later on think about scaling up, distributing, and federating head nodes, etc.
  • New user registrations are handled manually on a case-by-case basis, and must go through some Google App Engine-specific processing. Later, other identity providers and user verification methods should be supported.

Implementation of The New Architecture

As of May 2019,

  • Firstly, we port the existing head node code to Go, so as to benefit from the client-go library.
  • Then, CRDs will be used to substitute for the current datastore and cronjobs, thereby taking advantage of custom controllers.

Directories

Path Synopsis
cmd
pkg
client/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
client/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
client/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
client/clientset/versioned/typed/selectivedeployment/v1alpha
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/selectivedeployment/v1alpha/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL