dcd5fc4279
Moved files to a new directory to support the installation of the molteniron package. Renamed one file to be a command line tool and added a new file to start/stop the daemon. Added tox support for testing. This needed the ability to start and stop the daemon. And it also needed the ability to delete the database entries to ensure a clean test run. Change-Id: I1b0fadd68b9598b715c639b962cf8586f4db5da8 |
||
---|---|---|
molteniron | ||
README.md | ||
conf.yaml | ||
createDB.py | ||
requirements.txt | ||
setup.py | ||
testAllocateBM.py | ||
tox.ini |
README.md
MoltenIron overview
MoltenIron maintains a pool of bare metal nodes.
Starting
Before starting the server for the first time, the createDB.py script must be run.
To start the server:
moltenirond-helper start
To stop the server:
moltenirond-helper stop
MoltenIron client
Use the molteniron client (molteniron) to communicate with the server. For usage information type:
molteniron -h
For usage of a specific command use:
molteniron [command] -h
MoltenIron commands
command | description |
---|---|
add | Add a node |
allocate | Allocate a node |
release | Release a node |
get_field | Get a specific field in a node |
set_field | Set a specific field with a value in a node |
status | Return the status of every node |
delete_db | Delete every database entry |
Configuration of MoltenIron
Configuration of MoltenIron is specified in the file conf.yaml.
"B)" means that this configuration option is required for both the client and the server. "C)" means that it is required only for the client. "S)" means it is only required for the server.
usage | key | description |
---|---|---|
B) | mi_port | the port that the server uses to respond to commands. |
C) | serverIP | The IP address of the server. This is only used by |
clients. | ||
S) | maxTime | The maximum amount of time, in seconds, that a node |
is allowed to be allocated to a particular BM node. | ||
S) | logdir | The path to the directory where the logs should be |
stored. | ||
S) | maxLogDays | The amount of time, in days, to keep old logs. |
S) | sqlUser | The username to use for the MI server. This user |
will automatically be generated when createDB.py is run. | ||
S) | sqlPass | The password of sqlUser |
Running testcases
The suite of testcases is checked by tox. But, before you can run tox, you need to change the local yaml configuration file to point to the log directory.
(LOG=$(pwd)/testenv/log; sed -i -r -e 's,^(logdir: )(.*)$,\1'${LOG}',' conf.yaml; rm -rf testenv/; tox -e testenv)