gravity

module
v0.0.0-...-3bfe646 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2023 License: Apache-2.0

README

Gravity

Warning Gravity was archived 2023-07-01.

Please see our Gravitational is Teleport blog post for more information.

If you're looking for a similar solution, we recommend using a certified Kubernetes Distribution.

Gravity is a Kubernetes packaging solution.

Introduction

Gravity is an open source toolkit for creating "images" of Kubernetes clusters and the applications running inside the clusters. The resulting images are called cluster images and they are just .tar files.

A cluster image can be used to re-create full replicas of the original cluster in any environment where compliance and consistency matters, i.e. in locked-down AWS/GCE/Azure environments or even in air-gapped server rooms. An image can run without human supervision, as a "kubernetes appliance".

Cluster Images

A Cluster Image produced by Gravity includes:

  • All Kubernetes binaries and their dependencies.
  • Built-in container registry.
  • De-duplicated layers of all application containers inside a cluster.
  • Built-in cluster orchestrator which guarantees HA operation, in-place upgrades and auto-scaling.
  • Installation wizard for both CLI and web browser GUI.

An image is all one needs to re-create the complete replica of the original Kubernetes cluster, with all deployed applications inside, even in an air-gapped server room.

Examples

Take a look at the examples directory in this repository to find examples of how to package and deploy Kubernetes applications using Gravity.

The following examples are currently available:

  • Wordpress. Deploys Wordpress CMS with an OpenEBS-backed persistent storage.

Building from source

Gravity is written in Go. There are two ways to build the Gravity tools from source: by using locally installed build tools or via Docker. In both cases you will need a Linux machine.

Building on MacOS, even with Docker, is possible but not currently supported

$ git clone git@github.com:gravitational/gravity.git
$ cd gravity

# Running 'make' with the default target uses Docker.
# The output will be stored in build/current/
$ make

# If you have Go 1.10+ installed, you can build without Docker which is faster.
# The output will be stored in $GOPATH/bin/
$ make install

# To remove the build artifacts:
$ make clean

Directories

Path Synopsis
assets
e
lib
apis/cluster/v1beta1
Package v1beta1 is the v1beta1 version of the API.
Package v1beta1 is the v1beta1 version of the API.
app
Package app implements gravity application support for import and configuration and management
Package app implements gravity application support for import and configuration and management
app/resources
+groupName=gravitational.io
+groupName=gravitational.io
app/suite
package suite contains a backend-independent application service acceptance test suite
package suite contains a backend-independent application service acceptance test suite
autoscale/aws
package aws implements autoscaling integration for AWS cloud provider
package aws implements autoscaling integration for AWS cloud provider
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/cluster/v1beta1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
client/clientset/versioned/typed/cluster/v1beta1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
constants
package constants contains global constants shared between packages
package constants contains global constants shared between packages
docker
docker package is responsible for pushing container data (layers) from the offline storage into the regisitry running on-site
docker package is responsible for pushing container data (layers) from the offline storage into the regisitry running on-site
fsm
hub
install/dispatcher/buffered
package buffered implements an event dispatcher with buffering semantics
package buffered implements an event dispatcher with buffering semantics
install/dispatcher/direct
package direct implements a synchronous event dispatcher
package direct implements a synchronous event dispatcher
install/engine/cli
package cli implements command line installer workflow
package cli implements command line installer workflow
install/engine/interactive
package interactive implements wizard-based installation workflow
package interactive implements wizard-based installation workflow
loc
localenv/credentials
Package credentials provides interface for retrieving local user credentials.
Package credentials provides interface for retrieving local user credentials.
log
network/ipallocator
package ipallocator manages allocation of IP addresses from a network range.
package ipallocator manages allocation of IP addresses from a network range.
ops
Site state transitions ----------------------
Site state transitions ----------------------
ops/suite
package suite contains a ops service acceptance test suite that is backend implementation independent, used both for services and clients
package suite contains a ops service acceptance test suite that is backend implementation independent, used both for services and clients
pack
package pack defines packaging format used by gravity
package pack defines packaging format used by gravity
pack/suite
Package suite contains a package service acceptance test suite that is backend implementation independent each storage will use the suite to test itself
Package suite contains a package service acceptance test suite that is backend implementation independent each storage will use the suite to test itself
process
handler introduces new way to access site API:
handler introduces new way to access site API:
rpc
rpc/internal/inprocess
Package inprocess implements in-process network connections and corresponding dialing/listening.
Package inprocess implements in-process network connections and corresponding dialing/listening.
rpc/internal/proxy
Package proxy implements a simple network proxy for tests
Package proxy implements a simple network proxy for tests
run
schema
This package implements compatibility layer to bridge previous provider/provisioner mismatch and as such is discouraged for future use.
This package implements compatibility layer to bridge previous provider/provisioner mismatch and as such is discouraged for future use.
schema/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
sni
storage
Package storage implements storage backends for objects in portal - Accounts, Sites and others these implementations are supposed to be dumb - no business logic just storage logic should be handled to keep the backend implementations small.
Package storage implements storage backends for objects in portal - Accounts, Sites and others these implementations are supposed to be dumb - no business logic just storage logic should be handled to keep the backend implementations small.
storage/allocator
package allocator manages allocation of resources.
package allocator manages allocation of resources.
storage/keyval
Package keyval implements Etcd and BoltDB powered storage
Package keyval implements Etcd and BoltDB powered storage
storage/suite
package suite contains a storage acceptance test suite that is backend implementation independent each storage will use the suite to test itself
package suite contains a storage acceptance test suite that is backend implementation independent each storage will use the suite to test itself
system/auditlog
package auditlog implements support for manipulating kernel audit system
package auditlog implements support for manipulating kernel audit system
system/environ
Package environ implements utilities for managing host environment during an operation
Package environ implements utilities for managing host environment during an operation
system/service
package service implements helpers for working with systemd services
package service implements helpers for working with systemd services
system/signals
package signals implements support for managing interrupt signals
package signals implements support for managing interrupt signals
update
This file implements richer support for working with operation phases
This file implements richer support for working with operation phases
update/internal/builder
Package builder implements richer support for working with operation phases
Package builder implements richer support for working with operation phases
update/internal/rollingupdate
This file implements a rolling update FSM
This file implements a rolling update FSM
users/suite
package credssuite contains a storage acceptance test suite that is service implementation independent
package credssuite contains a storage acceptance test suite that is service implementation independent
utils/fields
Package fields provides methods for making log fields from various objects.
Package fields provides methods for making log fields from various objects.
webapi
Package webapi implements web proxy handler that provides various helpers for web UI, so it's OK to put UI specific stuff here
Package webapi implements web proxy handler that provides various helpers for web UI, so it's OK to put UI specific stuff here
tool

Jump to

Keyboard shortcuts

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