Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Nua, an open source PaaS in Python to self-host your applications

Nua, an open source PaaS in Python to self-host your applications

## Summary

Nua is an open source cloud platform project launched by Abilian in 2021. It offers a PaaS (platform as a service) that can be easily installed on bare metal or virtualised servers, and which allows containerised web applications to be run, managing their lifecycle, the resources they need (storage, databases, etc.), user access rights, backups, monitoring, logs, etc.

Nua enables the management of applications from an application portfolio ("marketplace"), i.e. packaged and optimised by the platform's developers (or third parties). Nua also allows the deployment of applications under development (demo / qualif / prod), including several instances of the same application, and including automatic deployment (example use case: create demo instances on request from prospects, optimising resource consumption).

Nua is based on the main standards of the open source and cloud world: database (Postgres, MySQL, Mongodb, Redis), storage (S3), OCI, dockerfiles and buildpacks, LDAP and SSO, etc. Nua currently relies on Docker, but will eventually allow applications to be deployed in other execution environments (other containers, classic or lightweight VMs, SlapOS...).

Documentation and source code:

- https://nua.rocks
- https://github.com/abilian/nua

## Presentation outline

- Vision and main features of the project

- Simplification of packaging and multi-instance deployment,
- Self-hosting, digital sovereignty
- General architecture

- Why python?

- A python runtime in the container
- An orchestrator driving the containers
- Reuse of components between packaging, script execution and orchestration

- Examples and demo

- Configuration file (packager view)
- Deploying configurations (user CLI view)

- Roadmap and how to contribute

## Take-aways

- For developers / devops: how Nua can help to quickly deploy dev versions in the dev / preprod / prod phase, and to manage production constraints (backup, upgrades)?
- For IT managers: how can Nua help to easily deploy and manage a portfolio of open source Web applications (intranet / extranet / Web)?
- For third-party application developers: how to port their applications to Nua?
- For open source contributors: what is Nua's roadmap and how to contribute to it?

Stefane Fermigier

March 22, 2023
Tweet

More Decks by Stefane Fermigier

Other Decks in Programming

Transcript

  1. Summary Need and context The Nua vision The project The

    nua-config.toml file Example of an application
  2. Need and context A need: • Rapidly deploy multiple application

    instances on bare metal or virtualised environments • Deploying internally developed and third-party applications • For internal needs • To provide Abilian customers with SaaS applications • By simplifying the deployment steps (database / storage / Nginx / HTTPS, ...)
  3. Need and context The state of the art • PaaS,

    SaaS • Containers • Cloud, GAFAM The European context • Growing demand for "sovereign" solutions • Self-hosting of web applications remains complex (skills, reliability, security)
  4. The Nua proposal The Nua project aims to build a

    "Self-hosted PaaS • Or "self-hosted platform as a service". • This is a technical oxymoron • But a disruptive response to market needs
  5. Our Solution "Nua streamlines the development, selection, installation and resilient

    operations of Web applications in a self- sovereign cloud environment
  6. The project 100% python • Poetry, pytest, type hints, black,

    flake8, ruff, ... • System administration commands • Resource allocation algorithms Structuring choices • Wherever possible, give priority to : • declarative rather than imperative configuration • conventions rather than explicit configuration, avoiding duplication of information • Rely on proven technologies (OCI/Docker containers in the first instance) • Be inspired by "best practices" such as the "12 factor apps", SBOM, ... • Provide for extensions through plugins
  7. The project 2 fundamental steps • The build • The

    "run With some constraints • Simplicity (ergonomics) • Reproducible, safe, reliable • Scalable (plugins) • Resilience, security, maintainability
  8. The project "nua-build • The low-level command that drives the

    creation of the deployable package • Today: a Docker image for Linux/amd64 The build sequence • Analysis of the "nua-config" file • Detection of the required basic images • "build or pull the required images • Recovery of files (sources, Dockerfile, configuration files) • "The actual build of the Docker image • Storage of the result (locally as a Docker image)
  9. The project "nua-orchestrator • The low-level command to deploy an

    application(s) • The orchestrator must be installed on the host server The deployment sequence • Analysis of the applications requested • "Pulling the corresponding Nua images • Metadata retrieval from Nua images • "pull" of possible dependencies • Configuration of ports, volumes, etc. • Actual deployment (shutdown / installation / start-up)
  10. The nua-config.toml file A single file • Metadata • Build

    configuration • Recovery of sources and dependencies • Configuration of the "run • Declaration of resource requirements Used by the build environment and the orchestrator • During the build, the configuration file is copied into the application's container • The orchestrator (the "run") retrieves information directly from the application container
  11. Application example: Hedgedoc HedgeDoc • An application for collaborative editing

    of documents in Markdown format • A NodeJs application that uses the classic tools for this ecosystem: package.json and npm. • https://hedgedoc.org/
  12. The build Build overview (2/2) • Creating the Docker image

    • In verbose mode, the entire Docker build log would be displayed.
  13. The "run" sections Automatic port assignment • Only the port

    information used by the application is required • The orchestrator will assign ports for redirects • Supports multi-instance
  14. The orchestrator Minimum statement to instantiate an application • The

    name of the application (app-id) • The target area