/
README
45 lines (30 loc) · 932 Bytes
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
tattrdb
=======
Description
~~~~~~~~~~~
TattrDB is a simple way to add Tags and Attributes to hostnames for use
as a very generic service management database.
Installation
~~~~~~~~~~~~
::
pip install tattrdb
Database Creation
~~~~~~~~~~~~~~~~~
Tattr uses sqlalchemy underneath and those uses a database url to
connect. Once you've constructed your url you can plugin it into the
example below:
::
from tattrdb import models
models._sync(models.connect("sqlite:///tattr.sqlite"))
Configuration
~~~~~~~~~~~~~
Using the same url from the example above you'll need to create a
configuration file at /etc/tattr.yaml as follows:
::
db_uri: "sqlite:///tattr.sqlite"
Command-line
~~~~~~~~~~~~
Once you've finished installing and configuring tattr you can use the
tattr command line tool to add/rm/modify hosts/tags/attributes. Tattr
uses subcommands and each individual subcommand has it's own help
messages.