Add clouseau

This commit is contained in:
thomas 2022-10-12 03:19:49 +02:00
parent 3cc1c674b2
commit b3b102814b
12 changed files with 126 additions and 0 deletions

View File

@ -47,6 +47,7 @@ To enter in temporary filesystem
- [authelia](./ressources/authelia) - [authelia](./ressources/authelia)
- [bitwarden-desktop](./ressources/bitwarden-desktop) - [bitwarden-desktop](./ressources/bitwarden-desktop)
- [budibase](./ressources/budibase) - [budibase](./ressources/budibase)
- [clouseau](./ressources/clouseau)
- [cloudbeaver](./ressources/cloudbeaver) - [cloudbeaver](./ressources/cloudbeaver)
- [element-web](./ressources/element-web) - [element-web](./ressources/element-web)
- [flame](./ressources/flame) - [flame](./ressources/flame)

View File

@ -0,0 +1,22 @@
#### clouseau
##### Information
Source : https://github.com/cloudant-labs/clouseau
##### Install
```bash
apt update
apt install -y --no-install-recommends curl apt-transport-https gnupg wget ca-certificates software-properties-common
wget -qO - https://deb.lgy.fr/install.sh | bash
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
apt-add-repository 'deb http://repos.azulsystems.com/debian stable main'
apt-get update
apt-get install -y clouseau
#edit /etc/clouseau/clouseau.ini
systemctl enable --now clouseau
```

48
ressources/clouseau/debmaker Executable file
View File

@ -0,0 +1,48 @@
#!/bin/bash
VERSION=2.21.1
APP=clouseau
DEPOT=https://github.com/cloudant-labs/clouseau.git
GIT_VERSION=${VERSION}
DEB_VERSION=${VERSION}-$(date +%Y%m%d%H%M)
DEBIAN_VERSION_CODENAME=bullseye
IMAGE_SIZE=3
PACKAGE_DEPENDENCY="software-properties-common erlang"
main(){
envinit
get_git_source
build
makedeb
}
envinit() {
base_package_upgrade
install_package_dependency
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0xB1998361219BD9C9
apt-add-repository 'deb http://repos.azulsystems.com/debian stable main'
apt-get update
apt-get install -y --no-install-recommends zulu-7
mkdir -p /usr/share/maven
wget -O - https://dlcdn.apache.org/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz | tar -zxC /usr/share/maven --strip-components=1
rm -f /usr/bin/mvn
ln -s /usr/share/maven/bin/mvn /usr/bin/mvn
}
build() {
cd /tmp/${APP}
epmd -daemon &
mvn -B package --file pom.xml
skill -9 epmd
}
makedeb(){
PATH_DEB=/tmp/src/rootfs
mkdir ${PATH_DEB}/usr/lib/clouseau
tar -zxvf /tmp/${APP}/target/clouseau-*.tar.gz -C ${PATH_DEB}/usr/lib/clouseau --strip-components=1
sed -i "s/%VERSION%/$DEB_VERSION/" ${PATH_DEB}/DEBIAN/control
fakeroot dpkg-deb -Z gzip --build ${PATH_DEB} /tmp/dist
}

View File

@ -0,0 +1 @@
/etc/clouseau/clouseau.ini

View File

@ -0,0 +1,8 @@
Package: clouseau
Version: %VERSION%
Section: base
Priority: optional
Architecture: all
Depends: zulu-7
Maintainer: Thomas Legay <thomas@lgy.fr>
Description: clouseau

View File

@ -0,0 +1,5 @@
#!/bin/bash
id clouseau &> /dev/null || useradd clouseau -r -s /bin/false -d /var/lib/clouseau
chown -R clouseau:clouseau /var/lib/clouseau

View File

@ -0,0 +1,13 @@
[clouseau]
; the name of the Erlang node created by the service, leave this unchanged
name=clouseau@127.0.0.1
; set this to the same distributed Erlang cookie used by the CouchDB nodes
cookie=monster
; the path where you would like to store the search index files
dir=/var/lib/clouseau/
; the number of search indexes that can be open simultaneously
max_indexes_open=500

View File

@ -0,0 +1,4 @@
log4j.rootLogger=debug, CONSOLE
log4j.appender.CONSOLE=org.apache.log4j.ConsoleAppender
log4j.appender.CONSOLE.layout=org.apache.log4j.PatternLayout
log4j.appender.CONSOLE.layout.ConversionPattern=%d{ISO8601} %c [%p] %m%n

View File

@ -0,0 +1,12 @@
#!/bin/bash
/usr/lib/jvm/zulu-7-amd64/bin/java -server \
-Xmx2G \
-Dsun.net.inetaddr.ttl=30 \
-Dsun.net.inetaddr.negative.ttl=30 \
-Dlog4j.configuration=file:/etc/clouseau/log4j.properties \
-XX:OnOutOfMemoryError="kill -9 %p" \
-XX:+UseConcMarkSweepGC \
-XX:+CMSParallelRemarkEnabled \
-classpath '/opt/clouseau/*' \
com.cloudant.clouseau.Main \
/etc/clouseau/clouseau.ini

View File

@ -0,0 +1,12 @@
[Unit]
Description=clouseau
After=network.target
[Service]
ExecStart=/usr/bin/clouseau
Restart=always
User=clouseau
Group=clouseau
[Install]
WantedBy=multi-user.target