This cookbook installs and configures luigi.
python
- luigi needs python cookbook to run.
The main attributes are:
Key | Type | Description | Default |
---|---|---|---|
['luigi']['version'] | String | luigi version to be installed | '2.5.0' |
['luigi']['config_dir'] | String | Directory for luigi configuration | '/etc/luigi' |
['luigi']['setup_user'] | Boolean | If true it will create a luigi Unix user | true |
['luigi']['user'] | String | Unix user name | 'luigi' |
['luigi']['setup_group'] | Boolean | If true it will create a luigi Unix group | true |
['luigi']['group'] | String | Unix group name | 'luigi' |
['luigi']['shell'] | String | Unix user shell for luigi user | '/bin/false' |
['luigi']['server']['auto_start'] | Boolean | If true the luigid service will auto start | true |
['luigi']['server']['log_dir'] | String | The luigid log directory | '/var/log/luigi' |
['luigi']['server']['pid_file'] | String | The luigid pid file | '/var/run/luigid.pid' |
All the configuration of luigi are written to default['luigi']['config_dir']/luigi.cfg
file. The pattern is:
[mysection]
option=hello
intoption=123
and you can add them through chef as follows:
default['luigi']['luigi_cfg'] = {
mysection => {
'option' = 'hello',
'intoption' = 123
}
}
In order to load ENV variables when running your service, you can add them as:
default['luigi']['server']['env']['VARIABLE'] = 'value'
In order to create a default luigid directory you can add:
default['luigi']['server']['dir'] = '/var/luigi'
If present, it will create this directory and it's present by default.
Please check attributes/default.rb for the entire list of attributes.
In order to install luigi, add this in you machine configuration recipe:
include_recipe 'luigi'
Or just include luigi
in your node's run_list
:
{
"name":"my_node",
"run_list": [
"recipe[luigi]"
]
}
Feel free to fork this repository and use it the way you like. If you want to propose any improvements, just create a pull request from you forked branch.
The full list of contributors is here.