Skip to main content

mProv Job Server

Build Status Latest Version Supported Python Wheel Status License

The mProv Job server is the work horse behind the scenes of the mPCC. The job server connects to the mPCC and will run jobs that are queued on the mPCC. The job server is also responsible for serving images created through the mPCC, as well as running scripts on the images and hosts when they come up.

Requirements

  • MUST BE INSTALLED AS ROOT
  • The mProv Job server requires python 3.8 and above.

Installation

The best way to install the job server is to run:

wget https://raw.githubusercontent.com/mprov-ng/mprov_jobserver/main/install_mprov_jobserver.sh -O - | bash

This will download and run the jobserver installation script from this repo.

Setup

You will need to create an API key in the mPCC for the job server. Once you have the api key, you will want to add that key to the /etc/mprov/jobserver.yaml file. There should be an example in there already, it will not work. You must replace it. While you are in there, you will want to setup the mprovURL entry to point to your mPCC instance. After that, you can enable/disable whatever jobmodules you want this job server to run by uncomment/commenting the lines that describe the jobmodules.

do not use localhost use IP or internal name

Here is an example for a good first jobserver config:

- global:
    # This points to your mprov control center instance.
    # This URL should point to the internal IP address or hostname and include a trailing slash
    # e.g. "http://<IP of internal interface>/"
    
    mprovURL: "http://mprov.local.cluster"
    # this is the api key for your mprov control center so that the 
    # jobserver can login and do stuff.
    apikey: 'kjangknfdasjhngurwegqfdbjhn'
    # this is the interval which this jobserver will check in with the mPCC
    heartbeatInterval: 10
    # runonce: True # uncomment to run the jobserver once and exit.
    myaddress: 'mprov.local.cluster' # set this to the address of this jobserver.
    jobmodules:
      # set the jobmodules you want to run here.
      - repo-delete
      - repo-update
      - image-update # REQUIRES mprov-webserver
      - mprov-webserver
      - image-delete
      - dnsmasq
      
# include any plugin yamls.        
- !include plugins/*.yaml

Post Setup

After you have setup the /etc/mprov/jobserver.yaml you can enable the jobserver with this command:

# systemctl enable --now mprov_jobserver

The jobserver should connect to the mPCC and start a repo sync which is required before you can update any images.

Arguments

Job server takes a few command line arguments. Global arguments are

  • -r Runs the jobserver in 'runonce' mode. The job server will run any of the job modules listed once then exit.
  • -d Tells the job server not to register with the mPCC. This is useful only when running the script-runner module to run post-boot or image-gen scripts.

Some plugins also use commandline arguments.

script-runner args

The script-runner job module will take the following arguments:

  • -i This is the id of the system image you are going to run scripts against. Mutually exclusive with -s
  • -s The host name of the system you are running the scripts against.
  • -b Runs scripts in post-boot mode.
  • -r (Global Option) The script-runner must be run in runonce mode only. It is probably wise to also pass -d
  • -d (Global Option) The script-runner will not register as a job server with mPCC.

Metadata

Release files for mprov-jobserver 0.0.62

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

Source distribution (sdist)

Source distribution for mprov-jobserver 0.0.62
File Size Uploaded Provenance Actions
mprov_jobserver-0.0.62.tar.gz 46.4 kB Without provenance Details for mprov_jobserver-0.0.62.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mprov-jobserver 0.0.62
File Interpreter ABI Platform Actions
mprov_jobserver-0.0.62-py3-none-any.whl Python 3 none any Details for mprov_jobserver-0.0.62-py3-none-any.whl

Total release size: 106.4 kB

Release files / mprov_jobserver-0.0.62.tar.gz

Download URL mprov_jobserver-0.0.62.tar.gz
Size 46.4 kB
Tags Source
SHA-256 checksum
How to use checksums
08253a621c4cc95b9adf644d6afe5e5136bee43f22abcdb4db4e4ff4317763ef
BLAKE2b-256 checksum
How to use checksums
1a5e61016f793c9adbc6b608eeb2767ff85386c9a1db663163fc0e16be99d551
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / mprov_jobserver-0.0.62-py3-none-any.whl

Download URL mprov_jobserver-0.0.62-py3-none-any.whl
Size 60.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
108cbfc1ff1eb4030fc0754fffb9f40b2ef238cfb1dedaf4836bb6b65de76fcf
BLAKE2b-256 checksum
How to use checksums
ecf2feab35c87f1b66376454a2183c4740e55c59ab9f6915844deac05261337f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Security for mprov-jobserver 0.0.62

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.0.62 This release

2 release files 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