crowdsec
crowdsec copied to clipboard
[wip] cscli setup / wizard.sh
Codecov Report
Merging #1728 (734c3d1) into master (4097214) will decrease coverage by
0.27%. The diff coverage is58.99%.
@@ Coverage Diff @@
## master #1728 +/- ##
==========================================
- Coverage 54.10% 53.83% -0.28%
==========================================
Files 151 151
Lines 20243 20595 +352
==========================================
+ Hits 10953 11087 +134
- Misses 8110 8334 +224
+ Partials 1180 1174 -6
| Flag | Coverage Δ | |
|---|---|---|
| func-crowdsec | 47.07% <ø> (-6.44%) |
:arrow_down: |
| func-cscli | 45.59% <70.29%> (+1.01%) |
:arrow_up: |
| unit-linux | 58.28% <53.53%> (-0.12%) |
:arrow_down: |
| unit-windows | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| pkg/setup/install.go | 0.00% <0.00%> (ø) |
|
| cmd/crowdsec-cli/setup.go | 70.16% <70.16%> (ø) |
|
| pkg/setup/units.go | 74.28% <74.28%> (ø) |
|
| pkg/setup/detect.go | 81.44% <81.44%> (ø) |
|
| cmd/crowdsec-cli/main.go | 68.07% <100.00%> (ø) |
|
| pkg/cwhub/cwhub.go | 41.81% <100.00%> (+0.53%) |
:arrow_up: |
| cmd/crowdsec/api.go | 54.38% <0.00%> (-26.32%) |
:arrow_down: |
| cmd/crowdsec/serve.go | 22.95% <0.00%> (-20.24%) |
:arrow_down: |
| ...isition/modules/wineventlog/wineventlog_windows.go | ||
| pkg/csplugin/utils_windows.go | ||
| ... and 5 more |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
Is the old wizard broken somehow ? On a fresh instance I get:
ubuntu@primary:~/Home/work/crowdsec/crowdsec-v1.4.2-rc4$ sudo ./wizard.sh --install --unattended
INFO[10/28/22:19:08:29] crowdsec_wizard: checking if crowdsec is installed
INFO[10/28/22:19:08:29] crowdsec_wizard: installing crowdsec
INFO[28-10-2022 07:08:31 PM] Wrote new 500185 bytes index to /etc/crowdsec/hub/.index.json
WARN[28-10-2022 07:08:31 PM] can't load CAPI credentials from '/etc/crowdsec/online_api_credentials.yaml' (missing field)
INFO[28-10-2022 07:08:31 PM] push and pull to Central API disabled
WARN[0000] you are using sqlite without WAL, this can have an impact of performance. If you do not store the database in a network share, set db_config.use_wal to true. Set explicitly to false to disable this warning. context=ent
INFO[28-10-2022 07:08:31 PM] Machine '9ebc77f81364448c9d54d53a95ac7148' successfully added to the local API
INFO[28-10-2022 07:08:31 PM] API credentials dumped to '/etc/crowdsec/local_api_credentials.yaml'
WARN[28-10-2022 07:08:31 PM] can't load CAPI credentials from '/etc/crowdsec/online_api_credentials.yaml' (missing field)
INFO[28-10-2022 07:08:31 PM] push and pull to Central API disabled
INFO[28-10-2022 07:08:33 PM] Successfully registered to Central API (CAPI)
INFO[28-10-2022 07:08:33 PM] Central API credentials dumped to '/etc/crowdsec/online_api_credentials.yaml'
WARN[28-10-2022 07:08:33 PM] Run 'sudo systemctl reload crowdsec' for the new configuration to be effective.
FATA[28-10-2022 07:08:33 PM] detecting services: invalid datasource for gitea-systemd: source is empty
Installing hub objects....
FATA[28-10-2022 07:08:33 PM] EOF
And after this I did:
ubuntu@primary:~/Home/work/crowdsec/crowdsec-v1.4.2-rc4$ sudo cscli setup detect
FATA[28-10-2022 07:22:03 PM] detecting services: invalid datasource for dovecot-systemd: source is empty
ubuntu@primary:~/Home/work/crowdsec/crowdsec-v1.4.2-rc4$ sudo cscli setup detect
FATA[28-10-2022 07:22:04 PM] detecting services: invalid datasource for asterisk-systemd: source is empty
ubuntu@primary:~/Home/work/crowdsec/crowdsec-v1.4.2-rc4$ sudo cscli setup detect
FATA[28-10-2022 07:22:05 PM] detecting services: invalid datasource for suricata-systemd: source is empty
Looks like the default detect.yaml is missing some config field which has been made mandatory by the code.
/kind feature /area configuration