nua-build


Namenua-build JSON
Version 0.5.43 PyPI version JSON
download
home_pagehttps://github.com/abilian/nua
SummaryNua build package (currently: build, core build, agent)
upload_time2023-10-09 21:19:24
maintainer
docs_urlNone
authorStefane Fermigier
requires_python>=3.10,<4.0
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Nua-build

Build system for Nua packages.

[Nua](https://nua.rocks/) is an open source, self-hosted cloud platform project (a PaaS - platform as a service).

This packaged is mostly used internally. The main entry point is the `nua` command line tool (see: [Nua on PyPI](https://pypi.org/project/nua/) or [nua-cli on GitHub](https://github.com/abilian/nua/tree/main/nua-cli)).


## Purpose

The `nua-build` package is used to build packages deployable by the Nua orchestrator.

The current version of nua-build builds Docker images for an amd64 Linux environment. There are plans to extend the system to other container and isolation architectures in future releases.


`nua-build` relies on a `nua-config` configuration file containing application build directives. This configuration can reference other local or remote providers and is supplemented by default values. The file can be formatted as TOML, JSON or YAML.

## Build sequence:

The main steps to build a Nua image:

- Analysis of the `nua-config` file,
- detection of the required base images,
- build or pull base images if needed,
- collect files (Dockerfile, configuration files),
- build a Docker container using the `nua-agent`,
- store locally the resulting images as a `tar` file.


### About Dockerfile

`nua-build` allows 2 approaches for image generation:

- The package can use a generic Dockerfile provided by `nua-build`, in which case most of the containerization work is done by a python script (*build.py*) executed in the container being built. This permits a build with a single `RUN` command in the docker file, but requires to specify the build through the `nua-config` config file and some python script.

- The package can use a dedicated (potentially pre-existing) Dockerfile. Then this Dockerfile must be modified slightly to add the metadata to the image:

```dockerfile
RUN mkdir -p /nua/metadata
COPY nua-config.toml /nua/metadata/
```

### Containerization layers

Standard Nua images are images build from `nua-build`'s default Dockerfile.

Standard Nua images contain three layers:

- A Linux image (Ubuntu 22.04 LTS Jammy, amd64),
- `nua-python`, addition of python 3.10,
- `nua-builder`, addition of `nua-agent` and `nua-lib`.

All standard Nua packages have a Python environment.

Some other base images are available to facilitate builds in other programming environments: `nua-builder-nodejs16`, `nua-builder-nodejs18`, `nua-builder-nodejs20`.

## Dependencies on other Nua Python packages

`nua-build` uses the following packages:

- `nua-lib`: common code for all Nua packages. It provides:

    - `shell`: shell shortcuts (mostly wrappers above `subprocess` and `shutil`)
    - `exec`: shortcuts to execute sub commands like `exec_as_root()`, `exec_as_root()`
    - `actions`: higher level commands, related to the installation of packages and dependencies (wrappers above `apt`, `pip`, ...)

- `nua-agent`: agent for building Nua apps. It provides:

    - `app_builder`: actual builder of the application inside the Docker image.

## Dependency graph

![Dependency graph](./doc/dependency-graph.png)


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/abilian/nua",
    "name": "nua-build",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.10,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Stefane Fermigier",
    "author_email": "sf@abilian.com",
    "download_url": "https://files.pythonhosted.org/packages/d4/7b/423c9f801090eb64442863aad2c6767c210972237310d2b130b87b3559c2/nua_build-0.5.43.tar.gz",
    "platform": null,
    "description": "# Nua-build\n\nBuild system for Nua packages.\n\n[Nua](https://nua.rocks/) is an open source, self-hosted cloud platform project (a PaaS - platform as a service).\n\nThis packaged is mostly used internally. The main entry point is the `nua` command line tool (see: [Nua on PyPI](https://pypi.org/project/nua/) or [nua-cli on GitHub](https://github.com/abilian/nua/tree/main/nua-cli)).\n\n\n## Purpose\n\nThe `nua-build` package is used to build packages deployable by the Nua orchestrator.\n\nThe current version of nua-build builds Docker images for an amd64 Linux environment. There are plans to extend the system to other container and isolation architectures in future releases.\n\n\n`nua-build` relies on a `nua-config` configuration file containing application build directives. This configuration can reference other local or remote providers and is supplemented by default values. The file can be formatted as TOML, JSON or YAML.\n\n## Build sequence:\n\nThe main steps to build a Nua image:\n\n- Analysis of the `nua-config` file,\n- detection of the required base images,\n- build or pull base images if needed,\n- collect files (Dockerfile, configuration files),\n- build a Docker container using the `nua-agent`,\n- store locally the resulting images as a `tar` file.\n\n\n### About Dockerfile\n\n`nua-build` allows 2 approaches for image generation:\n\n- The package can use a generic Dockerfile provided by `nua-build`, in which case most of the containerization work is done by a python script (*build.py*) executed in the container being built. This permits a build with a single `RUN` command in the docker file, but requires to specify the build through the `nua-config` config file and some python script.\n\n- The package can use a dedicated (potentially pre-existing) Dockerfile. Then this Dockerfile must be modified slightly to add the metadata to the image:\n\n```dockerfile\nRUN mkdir -p /nua/metadata\nCOPY nua-config.toml /nua/metadata/\n```\n\n### Containerization layers\n\nStandard Nua images are images build from `nua-build`'s default Dockerfile.\n\nStandard Nua images contain three layers:\n\n- A Linux image (Ubuntu 22.04 LTS Jammy, amd64),\n- `nua-python`, addition of python 3.10,\n- `nua-builder`, addition of `nua-agent` and `nua-lib`.\n\nAll standard Nua packages have a Python environment.\n\nSome other base images are available to facilitate builds in other programming environments: `nua-builder-nodejs16`, `nua-builder-nodejs18`, `nua-builder-nodejs20`.\n\n## Dependencies on other Nua Python packages\n\n`nua-build` uses the following packages:\n\n- `nua-lib`: common code for all Nua packages. It provides:\n\n    - `shell`: shell shortcuts (mostly wrappers above `subprocess` and `shutil`)\n    - `exec`: shortcuts to execute sub commands like `exec_as_root()`, `exec_as_root()`\n    - `actions`: higher level commands, related to the installation of packages and dependencies (wrappers above `apt`, `pip`, ...)\n\n- `nua-agent`: agent for building Nua apps. It provides:\n\n    - `app_builder`: actual builder of the application inside the Docker image.\n\n## Dependency graph\n\n![Dependency graph](./doc/dependency-graph.png)\n\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "Nua build package (currently: build, core build, agent)",
    "version": "0.5.43",
    "project_urls": {
        "Documentation": "https://nua.rocks/",
        "Homepage": "https://github.com/abilian/nua",
        "Repository": "https://github.com/abilian/nua"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "95a955ca2f6769e5c5a415022ee8461e47dd14af7596afa2940a6009e4d67e9b",
                "md5": "e66e7683194061fc5863b69686908457",
                "sha256": "860d789691215710f3dca8bd146058242a8714fbd36a29667b097b96bce82321"
            },
            "downloads": -1,
            "filename": "nua_build-0.5.43-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e66e7683194061fc5863b69686908457",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10,<4.0",
            "size": 31592,
            "upload_time": "2023-10-09T21:19:22",
            "upload_time_iso_8601": "2023-10-09T21:19:22.847882Z",
            "url": "https://files.pythonhosted.org/packages/95/a9/55ca2f6769e5c5a415022ee8461e47dd14af7596afa2940a6009e4d67e9b/nua_build-0.5.43-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d47b423c9f801090eb64442863aad2c6767c210972237310d2b130b87b3559c2",
                "md5": "bc8f93712ff32293bf03f18183ffdfa9",
                "sha256": "6c97b8809f6b45a45d5007269f803d8fd51818255dc030ccb0ef739d67b17d30"
            },
            "downloads": -1,
            "filename": "nua_build-0.5.43.tar.gz",
            "has_sig": false,
            "md5_digest": "bc8f93712ff32293bf03f18183ffdfa9",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10,<4.0",
            "size": 20385,
            "upload_time": "2023-10-09T21:19:24",
            "upload_time_iso_8601": "2023-10-09T21:19:24.461677Z",
            "url": "https://files.pythonhosted.org/packages/d4/7b/423c9f801090eb64442863aad2c6767c210972237310d2b130b87b3559c2/nua_build-0.5.43.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-10-09 21:19:24",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "abilian",
    "github_project": "nua",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "nua-build"
}
        
Elapsed time: 0.46874s