Skip to main content

No project description provided

Project description

# 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= 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 cd moon_utilities sudo pip install -e . cd .. git clone cd moon_cache sudo pip install -e . cd .. git clone cd moon_engine sudo pip install -e . `

## Configuration

You need to create 3 configuration files.

### config.cfg:

# configuration for Gunicorn
bind = ""
workers = 2

# configuration for moon_engine
moon = "moon.yaml"

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

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

  password: admin
  user: admin
  token_file: moon_engine_users.json

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

  driver: moon_engine.plugins.authz

  directory: /tmp

  version: 1

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

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

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

    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 `


`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.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for moon-engine, version 0.7
Filename, size File type Python version Upload date Hashes
Filename, size moon_engine-0.7-py3-none-any.whl (39.8 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page