mirror of
https://gh.llkk.cc/https://github.com/WeblateOrg/scripts.git
synced 2025-10-03 15:01:00 +08:00
feat: add graylog sidecar installation
This commit is contained in:
parent
7d652d031e
commit
1a04a4e197
4 changed files with 34 additions and 0 deletions
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -35,6 +35,8 @@ jobs:
|
|||
run: sudo ./install-weblate --nocert
|
||||
- name: Munin
|
||||
run: sudo ./install-munin
|
||||
- name: Graylog
|
||||
run: sudo ./install-graylog
|
||||
- name: Upgrade
|
||||
run: sudo ./upgrade-weblate --nodiff
|
||||
- name: Upgrade (lazy restart)
|
||||
|
|
|
@ -21,6 +21,12 @@ else
|
|||
echo "Sentry Token:"
|
||||
read -r sentry_token
|
||||
fi
|
||||
if [ -f ~/.config/weblate-bootstrap/graylog_token ] ; then
|
||||
graylog_token=$(cat ~/.config/weblate-bootstrap/graylog_token)
|
||||
else
|
||||
echo "Graylog Token:"
|
||||
read -r graylog_token
|
||||
fi
|
||||
|
||||
smtp_pass=$(openssl rand -hex 32)
|
||||
|
||||
|
@ -31,6 +37,7 @@ WEBLATE_TITLE="$title"
|
|||
WEBLATE_SECRET=$(openssl rand -hex 32)
|
||||
WEBLATE_SENTRY="$sentry"
|
||||
WEBLATE_SENTRY_TOKEN="$sentry_token"
|
||||
WEBLATE_GRAYLOG_TOKEN="$graylog_token"
|
||||
WEBLATE_VERSION="$2"
|
||||
|
||||
# Exim
|
||||
|
|
24
install-graylog
Executable file
24
install-graylog
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/bin/sh
|
||||
|
||||
set -e
|
||||
|
||||
# shellcheck disable=SC1091
|
||||
. /etc/weblate-bootstrap
|
||||
|
||||
# Install package
|
||||
wget https://packages.graylog2.org/repo/packages/graylog-sidecar-repository_1-5_all.deb
|
||||
dpkg -i graylog-sidecar-repository_1-5_all.deb
|
||||
rm graylog-sidecar-repository_1-5_all.deb
|
||||
apt-get update
|
||||
apt-get install -y graylog-sidecar
|
||||
|
||||
# Configure
|
||||
sed -i "s@^.\?server_url:.*@server_url: http://172.16.0.78:9000/api/@" /etc/graylog/sidecar/sidecar.yml
|
||||
sed -i "s@^server_api_token:.*@server_api_token: $WEBLATE_GRAYLOG_TOKEN@" /etc/graylog/sidecar/sidecar.yml
|
||||
sed -i "s@^#node_id: @node_id: @" /etc/graylog/sidecar/sidecar.yml
|
||||
cat /etc/graylog/sidecar/sidecar.yml
|
||||
|
||||
# Start service
|
||||
graylog-sidecar -service install
|
||||
systemctl enable graylog-sidecar
|
||||
systemctl start graylog-sidecar
|
|
@ -86,6 +86,7 @@ s ./scripts/install-weblate-docker
|
|||
#s ./scripts/install-weblate
|
||||
s ./scripts/upgrade-nginx-ssl
|
||||
s ./scripts/install-munin
|
||||
s ./scripts/install-graylog
|
||||
|
||||
# Print list of things to do
|
||||
echo "TODO:"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue