Skip to content

Latest commit

 

History

History
168 lines (143 loc) · 9.23 KB

README.org

File metadata and controls

168 lines (143 loc) · 9.23 KB

.sharing.io

Configuration for Pair instances

What makes up a Pair instance

A Pair instance contains many useful pieces of software for providing a CloudNative and in-cluster environment that suppliments the way that humans can collaborate.

Software

Here’s a list of software installed in the order that it is brought up

Ubuntu host OS
familiar OS that has good support at Equinix Metal
OpenSSH server
allows for connection stability and forwarding of SSH keys
Docker CE + containerd.io
container runtime allows for image build and deploy when in-cluster
Kubernetes
the kube
WeaveNet CNI
a CNI to provide networking
Cert-Manager
manage LetsEncrypt and self-signed certs through Kubernetes
Local-Path-Provisioner
create PVCs, without external storage
Helm-Operator
declaritively manage Helm charts
MetalLB
be assigned BGP IPs
Metrics-Server
allow support for kubectl top
Kubed
sync secrets between namespaces
Environment
a containerised environment with many tools useful for Pairing, such as tmate, Emacs, Kubernetes utils, and development utilities
Environment-Exporter
a webserver for serving a JSON list of processes that are listening on ports
Contour Ingress Controller
a Kubernetes ingress controller for bringing traffic into the cluster
External-DNS
a declarative way of managing DNS records
PowerDNS
a DNS server to own the records for {name}.pair.sharing.io
Environment-Exposer
a controller for mananging Kubernetes Service and Ingress resources based on the the results of environment-exporter, in order to expose the ports inside Environment to the public internet
Kube-Prometheus
a deployment of Prometheus and Grafana. In Pair, it’s deployed so that anyone can view it on grafana.{name}.pair.sharing.io
go-http-server
a HTTP server for sharing a folder. Shares ~/public_html to www.{name}.pair.sharing.io
Reveal-Multiplex
a websocket server for Reveal to enable presentation multiplexing. Available on multiplex.{name}.pair.sharing.io
Distribution (registry)
a container registry
Knative (Serving)
serverless containers on Kubernetes

Architecture

Diagram of the component architecture to detail the relationships between the components

pair-instance

Configuration

  • full controller over DNS records for and under {name}.pair.sharing.io
  • TLS on supplied domains with wildcard support

Structure

sharingio-pair-preinit-script.sh
a script that’s runs after all repos are cloned
init
a standard repo init script, this one adds several niceities
.bashrc++
extra useful bash things
users/{USERNAME}/init
user specific init scripts
public_html
the default public_html folder, linked to ~/public_html
cluster-api/preKubeadmCommands.sh
commands run before the instance has Kubernetes installed
cluster-api/postKubeadmCommands.sh
commands run after the instance has Kubernetes installed, setting it up as an instance
cluster-api/manifests/
the manifests that make up the instance

Variables

NameDefaultDescription
TMATE_SOCKET/tmp/ii.default.target.iisocketThe socket where to run tmate out of
SHARINGIO_PAIR_INIT_EXTRASThe manifests in the extra folder (cluster-api/manifests/extras) to apply when Environment is ready

Shortcuts and tips

.sharing.io config

Any of the config can be overridden by a having a fork of .sharing.io.

IMPORTANT: As Pair moves moderately, this is only a good idea if you can maintain it.

Refreshing Environment

By executing nuke-environment, it will restart Environment back to a clean state. This is useful if say:

  • broken packages were installed
  • filesystem is messed up
  • overload of programs running

This isn’t useful for:

  • messy home folder
  • broken or misconfigured cluster

w[0-20] workspaces

When in Environment, using tmate, you can switch windows normally via C-b [0-9]. Sometimes it can be useful to switch using a command. For example w1 will switch to SHELL or w0 to Emacs, or w3 will switch to the third window.

sharingio-pair-load-init-env

This alias will load all the env vars prepared for instance launch into the current shell.

Adding and removing guests after launch

Sometimes you might want to start pairing after creating an instance or you might have forgotten to add a guest. Guests can be added via

sharingio-pair-add-guest <GUEST NAME>

and removed via

sharingio-pair-remove-guest <GUEST NAME>

Notes

  • when this repo is forked, the fork is preferred over this one