Skip to main content

Lightweight Management and Provisioning Service

Project description

Lightweight Management and Provisioning Service
===============================================
lMaPS provides a simple way the use schema defined "instances" that can
be passed to an underlying configuration management system. This will
provide the ability to allow desperate systems to use a common namespace
application scheme to interact directly with configuration management
systems.

## Installation
```
pip install lmaps
```

## Overview
![System Architecture](.readmeimg/sysarch.png)

## Example use cases

### Using lMaPS to reconfigure a host using using ansible
In this example, an ansible playbook can be written with the expectation
that a vars file containing the proper data structure will have the
correct information to turn up a given service.

Let's assume the following playbook /my-playbook.yaml:
```
- name: An example playbook
hosts: localhost
connection: local
vars:
some_structure:
- message: This is one
- message: This is two
- message: This is three
tasks:
- debug:
msg: '{{ item.message }}'
with_items: '{{ some_structure }}'
```
Using this, a unit can be defined to call it via the `ansible_playbook`
unit handler.

We define the unit on the host as /etc/lmaps/units/some_example.yaml:
```
---
meta:
name: some_example
data_type: YamlKeyList
store_key: some_structure
store_root: /some/dir/to/store/instances
handler:
name: ansible_some_example
type: ansible_playbook
args:
playbook: /my-playbook.yaml
params:
additionalProperties: false
properties:
message:
type: string
```

Now when the daemon is run (`lmaps -D`), we can create instances.

With no instances defined, ansible will use the default vars declared
in the playbook, but if we created the following as hello_world.yaml:
```
message: Hello world!
```
and created it via:
`lmaps --create --file hello_world.yaml --unit some_example`
then when applied, the loop will get the following output:

[![asciicast](https://asciinema.org/a/AZC5wiglgxG5Vt83a1YBsOhyP.png)](https://asciinema.org/a/AZC5wiglgxG5Vt83a1YBsOhyP)

Project details


Download files

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

Source Distribution

lmaps-1.1.0.tar.gz (701.5 kB view details)

Uploaded Source

File details

Details for the file lmaps-1.1.0.tar.gz.

File metadata

  • Download URL: lmaps-1.1.0.tar.gz
  • Upload date:
  • Size: 701.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for lmaps-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4e69d2dc8e9a86a7a4047fb5b2c6b2f47b48f119ba64a5b4a5a4cb4e8000792f
MD5 6df8e2ca823a420872035d7068cce2b7
BLAKE2b-256 bffdccee57719b13a8c60476fa3e531a30dc996e9682cf13499eadf83b3d6db1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page