Commit Graph

30 Commits

Author SHA1 Message Date
matze c1d5d5b088 __netbox: remove dependency to package virtualenv
This is not required any more because it was completly replaced by
`python3-venv`. The venv handling is already given to `__pyvenv`.
2020-10-24 08:52:43 +02:00
matze 144cae3b79 __netbox: use __pyenv and remove obsolete netbox stop
Now, the python venv is now created via `pyvenv` or `python3 -m venv`
instead of the legacy `virtualenv`. For this, not all python processes
from the venv need to be stopped.

Migration from previous versions of this type may be difficult, but
solvable if the venv will be recreated.
2020-10-17 10:16:25 +02:00
matze 14f7cf8839 __netbox: set --data-root default value
The default value is set to preserve all data saved by netbox. As
explained in the manpage, it sets the directory for all data directories
to `~netbox/data/` (would resolve to `/opt/netbox/data/`), so upgrades
will not remove this data.
2020-10-04 17:40:01 +02:00
matze b55186544f __netbox: adding seperate /opt/netbox/cdist/ directory
Adding a place to keep all configuration stuff for cdist seperated from
the installation directory. For safety reasons.
2020-09-28 19:49:29 +02:00
matze e800f42a6d __netbox: consistency with __systemd_unit --restart
This commit brings consistency into the --restart parameter for systemd
units. All units except the netbox wrapper service will be restarted on
unit change.
2020-09-09 20:33:20 +02:00
matze 5d437839f6 __netbox: replaced secret key character set
The used character set should now only contain characters used by the
`netbox/generate_secret_key.py` program. Finially got correct escaping.
2020-09-08 19:52:03 +02:00
matze 398a3da10e __netbox: fix gerneration random generated secret key
Because `/dev/random` was used, the `cdist config` could hang a long
time to get real random values. The pseudo-generated values through
`/dev/urandom` are fully enought for the secret key.
2020-09-08 18:10:15 +02:00
matze 3389752dec __netbox: fix detection of the secret-key to use
Mixed up a parameter. Should be correct now.
2020-09-07 17:23:22 +02:00
matze eed3515424 __netbox: add --ldap-staff-group parameter
Required to get "admin access".
2020-09-07 17:10:59 +02:00
matze b10f6b71d0 __netbox: avoid useless generated code-remote
Because `set -e` got printed all the time, the type __netbox always had
some generated code for the remote side. This line was removed because
this is already done by cdist when executing the code-remote script.

Rather, the exit-on-error option was set to some scirpts (two ..).
2020-09-05 22:34:14 +02:00
matze 243e34f0a5 __netbox_uwsgi: enable further protocols to bind to
Enables multiple protocols like fastcgi or HTTP to bind to. This makes
it more flexible to use.

Also, a little fix for __netbox was done: correctly output a error msg.
2020-09-05 11:20:20 +02:00
matze 2805b6beff __netbox{,_gunicorn}: fix shellcheck directives 2020-09-02 09:15:45 +02:00
matze facb5a64d3 __netbox{,_gunicorn}: disabled shellcheck warnings
Shellcheck warned about creating content for a python array. As the
string will be printed literally into the config, the warning does not
match to the current case.
2020-09-01 13:20:31 +02:00
matze 9d8b3ebe74 __netbox: add wrapper service to manage the wsgi services
The wrapper service will "control" the services added from the
__netbox_* types to provide a general interface. This is more dynamic
than the alias approach used previously. Through this, it is possible
to handle multiple wsgi services for netbox - if this works ..

See as a reference:
  http://alesnosek.com/blog/2016/12/04/controlling-a-multi-service-application-with-systemd/
2020-09-01 10:02:08 +02:00
matze bbce0030ab __netbox: enable ldap usage via configuration.py
The REMOTE_AUTH_BACKEND must be set to use LDAP.

It now exports USE_LDAP to generally say if LDAP is being used in the
configuration or not.
2020-08-26 21:07:31 +02:00
matze e0a1b4f663 __netbox_gunicorn: extract gunicorn setup from __netbox
Because someone *want* to use something other than just gunicorn, it was
extracted to a own type. Because gunicorn is a bit deep in the netbox
installation process, it's a bit harder to isolate it.

`__netbox_uwsgi` will come, too.
2020-08-26 20:08:37 +02:00
matze 8ff7a4616d __netbox: allow multiple hostnames 2020-08-25 19:30:32 +02:00
matze 7d694342ff __netbox: new parameter for automatic release checks 2020-08-24 19:31:49 +02:00
matze 49bb527dea __netbox: autogen secretkey and store at remote
The secret key is generated if it is not set via parameter and the
explorer does not return any. It will be saved in the netbox home
directory to easily read the key for the config generation.
2020-08-23 16:52:02 +02:00
matze f5c8c26db6 __netbox: new config parameters for data paths
.. to move them to an other partition.
2020-08-23 16:41:58 +02:00
matze 4a04a2c472 __netbox: repalace tabs with whitespaces
Doing `s/\t/    /g` to have all times the same indents.
2020-08-22 21:58:44 +02:00
matze ee3db10ecf __netbox: auto-install sudo as dependency
There are may be systems does not have `sudo` preinstalled like
debian-minimal. Else, `su` could be used as alternative.
2020-08-22 20:55:35 +02:00
matze 987393942b __netbox: add more database parameters 2020-08-22 15:53:24 +02:00
matze e6e6dbcd00 __netbox: added some netbox configuration options
Those who might be useful are added ..
2020-08-21 23:50:24 +02:00
matze efab6ac23e __netbox: add version memorisation
This saves the installed version and checks if a new version must be
installed. If no update required, it updates the configuration files
if required.
2020-08-16 15:18:47 +02:00
fnux 240b8f1615 __netbox: make shellcheck happy 2020-08-12 09:01:05 +02:00
fnux 47584d6da6 __netbox: use __systemd_unit, do not recreate existing directory 2020-08-12 08:58:29 +02:00
fnux ef7a214dae __netbox: support basic LDAP group mapping 2020-07-21 08:30:09 +02:00
fnux ab2c826cc3 __netbox: add minimal LDAP support 2020-07-21 07:46:45 +02:00
fnux 70047d10b1 Initial __netbox type 2020-07-20 17:20:33 +02:00