Skip to main content

zabel-fabric

Overview

Please note that this library is not feature-complete yet.

This is part of the Zabel platform. The zabel-fabric package defines fabrics.

A fabric is what host a Zabel platform. A given fabric can host more than one Zabel platform, and it can also host other applications.

A fabric provides foundations for the applications and platforms it hosts to build upon. Those foundations include isolation, access control, secret management, as well as deployments, persistence, and discovery services.

Zabel's fabrics are not the first attempt to offer such foundations for applications. They will not be the last either.

What fabrics do is that they (try to) provide a (very) small, coherent subset of what Kubernetes clusters offer.

An application that can be deployed on a fabric can be deployed as-is on a Kubernetes cluster, if the images it uses are converted to proper containers and they preserve encapsulation.

Images, in Zabel, are plain classes with a constructor matching a known signature and a run method, so they can easily be converted to containers.

It does not mean any Python application can be automagically converted to a cloud-native application, and it of course does not imply that you can deploy your existing Kubernetes applications on a Zabel fabric.

What it means is that if your Python application has been designed to work on a Zabel fabric, it can be deployed on a full-fledged Kubernetes cluster, should the need arise.

What it also means is that you can use existing tools (such as kubectl or your favorite editor extension) to explore or change the state of a running fabric or to deploy new resources.

Example

Here is a simple Hello World example.

Assuming the following class in a hello.py file:

import os
from time import sleep

from zabel.commons.interfaces import Image


class HelloWorld(Image):
    def __init__(self):
        self.name = os.environ.get('NAME', 'World')

    def run(self):
        print(f'hello {self.name}')
        sleep(15)
        print('good bye')

And the following pod.yaml manifest:

apiVersion: v1
kind: Pod
metadata:
  name: hello
spec:
  restartPolicy: Never
  containers:
  - name: Hello
    image: hello/HelloWorld
    env:
      - name: NAME
        value: 'Alice'

We can deploy it as follow:

kubectl apply -f pod.yaml

On your Zabel fabric console, the following should be displayed:

hello Alice
...
good bye

Resources

The following resources are available, at least partially, on fabrics:

  • v1/Events
  • v1/Namespace
  • v1/Pod
  • v1/Secret
  • v1/Service
  • v1/ServiceAccount
  • v1.apiextensions.k8s.io/CustomResourceDefinition
  • v1.apps/Deployment
  • v1.rbac.authorization.k8s.io/ClusterRole
  • v1.rbac.authorization.k8s.io/ClusterRoleBinding
  • v1.rbac.authorization.k8s.io/Role
  • v1.rbac.authorization.k8s.io/RoleBinding
  • v1beta1.networking.k8s.io/Ingress

License

Copyright (c) 2019-2020 Martin Lafaix (martin.lafaix@external.engie.com) and others

This program and the accompanying materials are made
available under the terms of the Eclipse Public License 2.0
which is available at https://www.eclipse.org/legal/epl-2.0/

SPDX-License-Identifier: EPL-2.0

Metadata

Release files for zabel-fabric 0.16.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for zabel-fabric 0.16.1
File Interpreter ABI Platform Actions
zabel_fabric-0.16.1-py3-none-any.whl Python 3 none any Details for zabel_fabric-0.16.1-py3-none-any.whl

Release files / zabel_fabric-0.16.1-py3-none-any.whl

Download URL zabel_fabric-0.16.1-py3-none-any.whl
Size 29.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7c327ab265863e1f545f5de6ba70b392eca37b93e606f5734d5c06b80498632d
BLAKE2b-256 checksum
How to use checksums
1451f2b12826a01c030bab8c0686c559d656663c7bec6505f9116e4b894b90fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/47.3.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.6.9

Security for zabel-fabric 0.16.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page