Git Product home page Git Product logo

simplenetes's Introduction

Simplenetes - magic free clusters

Welcome to Simplenetes! Let's put the Dev and Ops back into DevOps.

Simplenetes compared to Kubernetes:

- Simplenetes has a 100x less code than Kubernetes.
- Simplenetes has fewer moving parts
    - No etcd
    - No iptables
    - Root-less containers
    - Your cluster is also your git repo so you can see it on disk
    - Everything is managed via SSH
    - No magic involved
    - Very GitOps
- Simplenetes also supports:
    - Multiple replicas of pods
    - Overlapping versions of pods
    - Controlled rollout and rollback of pods
    - Loadbalancers
    - Internal proxying of traffic
    - CI/CD pipelines
    - Letsencrypt certificates
    - Health checks
- Simplenetes makes it really smooth to work with pods and micro services in development mode on you laptop (spoiler: no VMs needed)
- Simplenetes uses `podman` as container runtime

In short: Simplenetes takes the raisins out of the cake, but it does not have everything Kubernetes offers.

While Kubernetes is "true cloud computing" in the sense that it can expand your cluster with more worker machines as needed and it can request resources from the environment as needed such as persistent disk, Simplenetes doesn't go there because that is when DevOps becomes MagicOps.

When should I use Simplenetes?

In what cases should I really consider using Simplenetes?

1.  You enjoy the simple things in life.
2.  You might have struggled getting into a good local development flow using k8s.
3.  You know you will have a small cluster, between 1 and 20 nodes.
4.  You are happy just running N replicas of a pod instead of setting up auto scaling parameters.
5.  You want a deterministic cluster which you can troubleshoot in detail
6.  You want less moving parts in your cluster

In which cases should I not use Simplenetes over Kubernetes?

1.  Simplenetes is in beta.
2.  Because you are anticipating having more than 20 nodes in your cluster.
3.  You need auto scaling in your cluster.
4.  You really need things such as namespaces.
5.  You are not using Linux as your development machine.
6.  Your boss has pointy-hair.

Simplenetes explained

Simplenetes has three parts:

- This repo, the `sns` tool which setup and manages the cluster
- `podc` - the pod compiler which takes yaml specs into executable standalone shell scripts managing a pod
- `simplenetesd` - the daemon which runs on each host to start and stop pods.

See the doc/README.md for topics on HOWTOs in getting started working with Simplenetes Clusters.

Install

sns is a standalone executable, written in POSIX-compliant shell script and will run anywhere there is Bash/Dash/Ash installed.

LATEST_VERSION=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/simplenetes-io/simplenetes/releases/latest | grep tag_name | cut -d":" -f2 | tr -d ",|\"| ")
curl -LO https://github.com/simplenetes-io/simplenetes/releases/download/$LATEST_VERSION/sns
chmod +x sns
sudo mv sns /usr/local/bin

For further instructions, please refer to the documentation.

Simplenetes was built by @bashlund and filippsen

simplenetes's People

Contributors

bashlund avatar eggfriedrice avatar filippsen avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

simplenetes's Issues

Consider omitting connection closed message at the end of commands

It is understandable that commands targetting remote pods and hosts involve opening and closing connections. However, the Connection to <IP> closed. message at the end is potentially confusing. Example:

sns pod logs mypod

Output:

1617604253 simplenetes_io 10.0.2.100 - - [05/Apr/2021:06:30:53 +0000] "GET / HTTP/1.1" 206 364 "-" "Mozilla/5.0" "10.0.2.100"
1617604342 simplenetes_io 10.0.2.100 - - [05/Apr/2021:06:32:22 +0000] "GET / HTTP/1.1" 200 364 "-" "abc/1.1" "10.0.2.100"
1617604514 simplenetes_io 10.0.2.100 - - [05/Apr/2021:06:35:14 +0000] "GET / HTTP/1.1" 200 364 "-" "dfg" "10.0.2.100"
1617616950 simplenetes_io 10.0.2.100 - - [05/Apr/2021:10:02:30 +0000] "HEAD / HTTP/1.1" 200 0 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.67 Safari/537.36" "10.0.2.100"
Connection to <redacted IP> closed.

Add release process `--mode=safe`

Right now sns supports two release methods for pods: hard (default) and soft.

The hard release is focused on a quick release process from the Ops perspective. It will stop the old pod version and run the new version in the same transaction, which likely gives a small glitch in uptime.

The soft process takes longer time as as it has both versions running with overlap before retiring the old version.

We would want a safe method which guarantees that there is no overlap between version. Which is desirable when
running processes which should never concurrently access the same file. For example a database.

Add volume management

We need tools for listing volumes, opening a shell into volumes, downloading volumes, purging old volumes.

sns commands attempts to create missing cluster pods directory

Relative directory references were originally intended to serve the reuse of pods between clusters. However, referencing directories alone, missing or not, should not trigger the creation of new directories (mkdir).

Note:

we should consider movingexisting pods to be inside the cluster repository instead

Potential downside:

... one has to clone all the pods once for each cluster

Related data:

  • /pod directories: local podDir="$(FILE_REALPATH "${PODPATH}/${pod}")"
  • Cluster path: PODPATH: ${PODPATH:-\$CLUSTERPATH/../pods}
  • mkdir -p calls

Example in parent directory relative to CLUSTERPATH:

/media/mysite$ sns cluster ps
mkdir: cannot create directory ‘/media/mysite/../pods’: Permission denied
mkdir: cannot create directory ‘/media/pods’: Permission denied

Add SecretService

To have secrets encrypted as safe as possible we would a specific service which serves up decrypted secrets to the ramdisks of pods.

Implement 'sns cluster ps'

To get a quick overview of the current status of a cluster one would like to run:

sns cluster ps

Right now, the function does nothing.

Consider outputting help for a specific context when command is empty

Given the following command:

sns CONTEXT

Current output:

[ERROR] Unknown <CONTEXT> command ''

Suggested output:

Usage:
help
-h
    Output this help

version
-V
    Output the version of Simplenetes

sns CONTEXT COMMAND [OBJECT] [OPTIONS] [ARGUMENTS]

Cluster commands:
  cluster create <cluster name>
[...]

Host commands:
  host register <host>
[...]


Pod commands:
  pod ls [[pod[:version]][@host]]
[...]

Or just that particular help usage. Example:

sns host

Targetted output:

sns host COMMAND [OBJECT] [OPTIONS] [ARGUMENTS]

Host commands:
  host register <host>
[...]

Could also consider applying the same to invalid commands, but that is more understandable as it is (in comparison to the case of empty commands).
Invalid command:

sns CONTEXT invalid

Current output:

[ERROR] Unknown <CONTEXT> command 'invalid'

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.