add a 'user.yaml' config that is similar to prod, but with stdout logging and no background

This commit is contained in:
Thibault bui Koechlin 2020-05-26 14:39:25 +02:00
parent 067f2e1b0e
commit 4ba5288aed
3 changed files with 33 additions and 1 deletions

View file

@ -34,14 +34,28 @@ Besides detecting and stopping attacks in real time based on your logs, it allow
## Key points
### Easy installation, no technical barrier
### Fast assisted installation, no technical barrier
<img src="docs/assets/images/crowdsec_install.gif" alt="CrowdSec install" title="CrowdSec" width="470" height="900"/>
> User is assisted during setup, providing functional out-of-the-box setup
### Out of the box detection
<img src="docs/assets/images/out-of-the-box-protection.gif" alt="CrowdSec install" title="CrowdSec" width="470" height="900"/>
> Baseline detection is effective out-of-the-box, no fine-tuning required
### Easy blocker deployment
<img src="docs/assets/images/blocker-installation.gif" alt="CrowdSec install" title="CrowdSec" width="470" height="900"/>
> It's trivial to add blockers to enforce decisions of crowdsec
### Dashboard at handreach
## About this repository
This repository contains the code for the two main components of crowdsec :

17
config/user.yaml Normal file
View file

@ -0,0 +1,17 @@
working_dir: /tmp/
data_dir: ${DATA}
config_dir: ${CFG}
pid_dir: ${PID}
log_dir: /var/log/
cscli_dir: ${CFG}/cscli
log_mode: stdout
log_level: info
profiling: false
sqlite_path: ${DATA}/crowdsec.db
apimode: true
daemon: false
prometheus: true
#for prometheus agent / golang debugging
http_listen: 127.0.0.1:6060
plugin:
backend: "/etc/crowdsec/plugins/backend"

View file

@ -288,6 +288,7 @@ install_crowdsec() {
install -v -m 600 -D ./config/api.yaml "${CROWDSEC_CONFIG_PATH}" || exit
mkdir -p ${PID_DIR} || exit
PID=${PID_DIR} DATA=${CROWDSEC_DATA_DIR} CFG=${CROWDSEC_CONFIG_PATH} envsubst < ./config/prod.yaml > ${CROWDSEC_CONFIG_PATH}"/default.yaml"
PID=${PID_DIR} DATA=${CROWDSEC_DATA_DIR} CFG=${CROWDSEC_CONFIG_PATH} envsubst < ./config/user.yaml > ${CROWDSEC_CONFIG_PATH}"/user.yaml"
CFG=${CROWDSEC_CONFIG_PATH} PID=${PID_DIR} BIN=${CROWDSEC_BIN_INSTALLED} envsubst < ./config/crowdsec.service > "${SYSTEMD_PATH_FILE}"
install_bins
systemctl daemon-reload