[NO TESTS] WIP
This commit is contained in:
parent
3a5f0cdef8
commit
b44f00bb4f
9 changed files with 132 additions and 100 deletions
projects/smith
11
projects/smith/BUILD
Normal file
11
projects/smith/BUILD
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
py_project(
|
||||
name = "smith",
|
||||
lib_deps = [
|
||||
py_requirement("ibis"),
|
||||
py_requirement("toml"),
|
||||
],
|
||||
main_deps = [
|
||||
py_requirement("click"),
|
||||
],
|
||||
main = "src/python/smith/__main__.py",
|
||||
)
|
||||
18
projects/smith/README.md
Normal file
18
projects/smith/README.md
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
# Smith
|
||||
> An agent
|
||||

|
||||
|
||||
|
||||
Smith is, in many ways, a clean sheet implementation of [cram](https://git.arrdem.com/arrdem/cram).
|
||||
|
||||
Cram as a tool has been quite successful at implementing an agentless (get it) masterless configuration.
|
||||
Clone a git repo and apply the config.
|
||||
|
||||
The miss of Cram is that it's really only designed to install static files, and really only to a homedir.
|
||||
Installing packages is frankly a dirty hack.
|
||||
|
||||
In contrast to Cram's static configurations and mostly static actions, Smith has much more in common with Ansible, Puppet or Saltstack.
|
||||
|
||||
Like these full up configuration management systems, Smith features an inventory system, a package manager abstraction, templating features and - unlike these other systems - a core action model and changelog.
|
||||
|
||||
Also like those other systems, Smith uses a "real" configuration language for defining "modules".
|
||||
BIN
projects/smith/smith.jpeg
Normal file
BIN
projects/smith/smith.jpeg
Normal file
Binary file not shown.
|
After
(image error) Size: 295 KiB |
49
projects/smith/src/python/smith/__main__.py
Normal file
49
projects/smith/src/python/smith/__main__.py
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import click
|
||||
|
||||
|
||||
@click.group
|
||||
def cli():
|
||||
pass
|
||||
|
||||
|
||||
@cli.group("inventory")
|
||||
def inventory():
|
||||
pass
|
||||
|
||||
|
||||
@inventory.command("config")
|
||||
def inventory_config():
|
||||
"""Show the configured inventory plugins."""
|
||||
pass
|
||||
|
||||
|
||||
@inventory.command("show")
|
||||
def inventory_show():
|
||||
"""Evaluate host inventory data & display that configuration."""
|
||||
pass
|
||||
|
||||
|
||||
@cli.group("config")
|
||||
def config():
|
||||
pass
|
||||
|
||||
|
||||
@config.command("state")
|
||||
def config_state():
|
||||
"""Show the current configuration state from the last apply."""
|
||||
|
||||
|
||||
@config.command("diff")
|
||||
def config_diff():
|
||||
"""Show changes from applying the new configuration."""
|
||||
|
||||
|
||||
@config.command("apply")
|
||||
def config_apply():
|
||||
"""Apply changes from the new configuration."""
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
cli()
|
||||
Loading…
Add table
Add a link
Reference in a new issue
