Skip to main content

# moon_engine

## Installation

If you want a stable version:

`bash sudo python -m pip install moon_engine `

If you want a development version:

`bash ARTIFACTORY=https://artifactory-iva.si.francetelecom.fr/artifactory/api/pypi/python-virt-orange-product-devops/simple sudo python -m pip install --pre moon_engine -i $ARTIFACTORY ` Use it at your own risk, this is an unstable version.

If you want to be in development mode, and get the code:

`bash git clone git@gitlab.forge.orange-labs.fr:moon/moon_utilities.git cd moon_utilities sudo pip install -e . cd .. git clone git@gitlab.forge.orange-labs.fr:moon/moon_cache.git cd moon_cache sudo pip install -e . cd .. git clone git@gitlab.forge.orange-labs.fr:moon/moon_engine.git cd moon_engine sudo pip install -e . `

## Configuration

You need to create 3 configuration files.

### config.cfg:

# configuration for Gunicorn
bind = "127.0.0.1:8081"
workers = 2

# configuration for moon_engine
moon = "moon.yaml"

### moon.yaml (feel free to update the configuration file to your need…):

type: "pipeline"
uuid:
manager_url: ""
incremental_updates: false
api_token:
data: policy.json
debug: true

management:
  password: admin
  url: http://127.0.0.1:8000
  user: admin
  token_file: moon_engine_users.json

orchestration:
  driver: moon_engine.plugins.pyorchestrator
  connection: local
  port: 20000...20100
  config_dir: /tmp

authorization:
  driver: moon_engine.plugins.authz

plugins:
  directory: /tmp

logging:
  version: 1

  formatters:
    brief:
      format: "%(levelname)s %(name)s %(message)-30s"
    custom:
      format: "%(asctime)-15s %(levelname)s %(name)s %(message)s"

  handlers:
    console:
      class : logging.StreamHandler
      formatter: custom
      level   : INFO
      stream  : ext://sys.stdout
    file:
      class : logging.handlers.RotatingFileHandler
      formatter: custom
      level   : DEBUG
      filename: /tmp/moon_engine.log
      maxBytes: 1048576
      backupCount: 3

  loggers:
    moon:
      level: DEBUG
      handlers: [console, file]
      propagate: no

  root:
    level: ERROR
    handlers: [console]

### policy.json

This file contains all data that will be imported in the Engine. As we cannot update the cache after the creation of the Engine, all data must be in this file. Example files lie in the conf directory.

## Web server execution

Execution when library is installed:

For a development server:

`bash hug -m moon_engine.server config.cfg `

For a production server:

`bash gunicorn moon_engine.server:__hug_wsgi__ -c config.cfg `

or

`bash moon_engine start config.cfg `

If library is not installed:

`bash gunicorn moon_engine/server:__hug_wsgi__ -c config.cfg `

This will install an autonomous engine server. If you need to connect to a Manager, you must update the moon.yaml accordingly.

Metadata

Release files for moon-engine 0.8

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 moon-engine 0.8
File Interpreter ABI Platform Actions
moon_engine-0.8-py3-none-any.whl Python 3 none any Details for moon_engine-0.8-py3-none-any.whl

Release files / moon_engine-0.8-py3-none-any.whl

Download URL moon_engine-0.8-py3-none-any.whl
Size 42.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
df43fae35403566abec7ee4d0f2091a68a08945bf397dfe566777af0fb58f170
BLAKE2b-256 checksum
How to use checksums
32fa1d009dc45bcec303eb891dd8aaaea57b63cfe76fa542fee2287fdb213ee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.10

Security for moon-engine 0.8

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.

Release history Release notifications | RSS feed

This release

0.8 This release

1 release file No provenance

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