Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Commit

Permalink
Merge release-debian-22.04.0 into 22.04.x (#11383)
Browse files Browse the repository at this point in the history
* fix jenkinsfile for debian

* fix jenkinsfile for debian

* fix jenkinsfile for debian

* fix jenkinsfile for debian

* fix jenkinsfile for debian

* fix jenkinsfile for debian

* Update centreon-common.postinst

* add centreon-poller package (#11274)

* Fix lowercase names (#11275)

* add package as dependency of centreon-poller (#11282)

* improve snmpd file change (#11287)

* fix path (#11288)

* set snmp community to public using centreon profile (#11291)

* (debian) Fix commit number in about page (#11292)

* fix get commit number

* fix path to get commit

* add postinst to fix permissions for poller package (#11300)

* comment other public entry (#11301)

* (debian) fix permissions in generate traps directory (#11302)

* fix permissions in generate traps directory

* add centreon-engine-extcommands as dependency

* Add widget single metric (#11303)

* (debian) add centreon-database plugin as dependecy (#11306)

* add centreon-database plugin as dependecy

* add centreon-plugin-applications-jvm-actuator

* fix(install): add port to dsn in database tempalte (#11324)

* Update Jenkinsfile

* Update Jenkinsfile

* Update control

* Update Jenkinsfile

* Update Jenkinsfile

* Update Jenkinsfile

* simplifies the COMMIT var get value

* add apt upgrade before run tasks

Co-authored-by: Zakaria GUENNOUNE <zguennoune@centreon.com>
Co-authored-by: Zakaria Guennoune <83596451+zguennoune02@users.noreply.github.com>
Co-authored-by: Luiz Costa <me@luizgustavo.pro.br>
  • Loading branch information
4 people authored and kduret committed Jul 21, 2022
1 parent e218c92 commit 4250095
Show file tree
Hide file tree
Showing 9 changed files with 87 additions and 19 deletions.
8 changes: 4 additions & 4 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -135,12 +135,9 @@ def checkoutCentreonBuild() {
*/
stage('Deliver sources') {
node {
cleanWs()
dir('centreon-web') {
checkout scm
if (!isStableBuild()) {
hasFrontendChanges = hasChanges(frontendFiles)
hasBackendChanges = hasChanges(backendFiles)
}
}

checkoutCentreonBuild()
Expand Down Expand Up @@ -169,18 +166,21 @@ stage('Deliver sources') {
reportTitles: ''
])


// get api feature files
apiFeatureFiles = sh(
script: 'find centreon-web/tests/api/features -type f -name "*.feature" -printf "%P\n" | sort',
returnStdout: true
).split()


// get tests E2E feature files
e2eFeatureFiles = sh(
script: 'find centreon-web/tests/e2e/cypress/integration -type f -name "*.feature" -printf "%P\n" | sort',
returnStdout: true
).split()


//FIXME : reintegrate ldap features after fixing them
featureFiles = sh(
script: "rm centreon-web/features/Ldap*.feature && find centreon-web/features -type f -name '*.feature' | sed -e 's#centreon-web/features/##g' | sort",
Expand Down
5 changes: 3 additions & 2 deletions ci/debian/centreon-common.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@
if [ "$1" = "configure" ] ; then
if [ ! "$(getent passwd centreon)" ]; then
# User will have a shell. Not secure but require refactoring otherwise.
adduser --system --group --shell /bin/bash --home /var/lib/centreon centreon
adduser --system --group --shell /bin/bash --home /var/spool/centreon centreon
fi

chown -vR centreon:centreon \
/etc/centreon \
/var/cache/centreon
/var/cache/centreon \
/var/spool/centreon
chmod -R 0775 \
/var/cache/centreon
fi
Expand Down
20 changes: 13 additions & 7 deletions ci/debian/centreon-poller-centreon-engine.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,20 @@ if [ "$1" = "configure" ]; then
chmod -v +x /usr/share/centreon/bin/centreontrapd

# snmpd.conf file
if [ -f "/etc/snmpd/snmpd.conf" ]; then
if [ -e "/etc/snmp/snmpd.conf" ]; then
# Add right in SNMP
sed -i \
-e "/^view.*\.1\.3\.6\.1\.2\.1\.1$/i\
view centreon included .1.3.6.1" \
-e "/^access.*$/i\
access notConfigGroup \"\" any noauth exact centreon none none" \
/etc/snmp/snmpd.conf
if [ ! "$(grep 'view centreon' /etc/snmp/snmpd.conf)" ]; then
sed -i \
'/^# system + hrSystem groups only/a view centreon included .1.3.6.1' \
/etc/snmp/snmpd.conf
fi
if [ ! "$(grep 'public default -V centreon' /etc/snmp/snmpd.conf)" ]; then
sed -i \
-e '/^# Read-only access to everyone to the systemonly view/a rocommunity public default -V centreon' \
-e 's/^rocommunity public default -V systemonly/#rocommunity public default -V systemonly/' \
-e 's/^rocommunity6 public default -V systemonly/#rocommunity6 public default -V systemonly/' \
/etc/snmp/snmpd.conf
fi
fi

# Fix centreon configuration permissions
Expand Down
13 changes: 13 additions & 0 deletions ci/debian/centreon-poller.postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/sh

if [ "$1" = "configure" ]; then

if [ "$(getent passwd centreon-engine)" ]; then
chmod -v -R 0775 \
/var/lib/centreon/centplugins
chown -v -R centreon-engine:centreon-engine \
/var/lib/centreon/centplugins
fi

fi
exit 0
13 changes: 10 additions & 3 deletions ci/debian/centreon-trap.postinst
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,19 @@ EOF
fi

# Fix permissions
chmod 0755 \
chmod -v 0755 \
/usr/share/centreon/bin/centreontrapd \
/usr/share/centreon/bin/centreontrapdforward \
/var/spool/centreontrapd
chown centreon:centreon \
/var/spool/centreontrapd
if [ "$(getent passwd centreon)" ]; then
chown -v centreon:centreon \
/var/spool/centreontrapd
if [ -d "/etc/snmp/centreon_traps" ]; then
chmod -v 0775 /etc/snmp/centreon_traps
chown -v centreon:centreon \
/etc/snmp/centreon_traps
fi
fi

# Initial installation
systemctl --no-reload preset centreontrapd.service || : &>/dev/null || :
Expand Down
37 changes: 36 additions & 1 deletion ci/debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,46 @@ Depends:
centreon-widget-live-top10-memory-usage,
centreon-widget-service-monitoring,
centreon-widget-servicegroup-monitoring,
centreon-widget-tactical-overview
centreon-widget-tactical-overview,
centreon-widget-single-metric
Description: The package contains base configuration for Centreon Engine and Centreon Broker.
It provides one default monitoring engine running with Centreon Engine and
two Centreon Broker instances to store real-time information in database and
performance data in RRD files.

Package: centreon-poller
Architecture: all
Depends:
centreon-common (>= ${centreon:version}~),
centreon-poller-centreon-engine (>= ${centreon:version}~),
centreon-trap (>= ${centreon:version}~),
centreon-engine (>= ${centreon:version}~),
centreon-broker (>= ${centreon:version}~),
centreon-broker-cbmod (>= ${centreon:version}~),
centreon-broker-storage (>= ${centreon:version}~),
centreon-connector (>= ${centreon:version}~),
centreon-gorgone (>= ${centreon:version}~),
libdbd-mysql-perl,
libdbd-sqlite3-perl,
centreon-plugin-applications-databases-mysql,
centreon-plugin-applications-monitoring-centreon-central,
centreon-plugin-applications-monitoring-centreon-database,
centreon-plugin-applications-monitoring-centreon-map4-jmx,
centreon-plugin-applications-monitoring-centreon-poller,
centreon-plugin-applications-protocol-dns,
centreon-plugin-applications-protocol-ftp,
centreon-plugin-applications-protocol-http,
centreon-plugin-applications-protocol-ldap,
centreon-plugin-applications-databases-mysql,
centreon-plugin-hardware-printers-generic-snmp,
centreon-plugin-hardware-ups-standard-rfc1628-snmp,
centreon-plugin-network-cisco-standard-snmp,
centreon-plugin-operatingsystems-linux-snmp,
centreon-plugin-operatingsystems-windows-snmp,
monitoring-plugins-basic
Description: This package add rights and default directories for a poller
managed by Centreon. This includes the default central poller.

Package: centreon-web-common
Architecture: all
Depends:
Expand Down Expand Up @@ -151,6 +185,7 @@ Depends:
centreon-broker (>= ${centreon:version}~),
centreon-engine (>= ${centreon:version}~),
centreon-gorgone (>= ${centreon:version}~),
centreon-engine-extcommands (>= ${centreon:version}~),
centreon-trap (>= ${centreon:version}~),
centreon-plugin-applications-databases-mysql,
centreon-plugin-applications-monitoring-centreon-central,
Expand Down
1 change: 1 addition & 0 deletions ci/debian/rules
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#!/usr/bin/make -f

export DH_VERBOSE=1
export CYPRESS_CACHE_FOLDER=$PWD/cypress_cache

%:
dh $@
Expand Down
5 changes: 5 additions & 0 deletions ci/scripts/centreon-deb-package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ if [ -z "$VERSION" -o -z "$RELEASE" -o -z "$DISTRIB" ] ; then
exit 1
fi

# Upgrade image before
apt update
apt upgrade -y

echo "################################################## PACKAGING WEB ##################################################"

AUTHOR="Luiz Costa"
Expand All @@ -18,6 +22,7 @@ MAJOR_VERSION="$(echo $VERSION | egrep -o '^[0-9][0-9].[0-9][0-9]')"
cd centreon/

# Replace basic macros.
COMMIT=$(git log -1 HEAD --pretty=format:%h)
find ./www/include/Administration/about -type f | xargs --delimiter='\n' sed -i -e "s/@COMMIT@/$COMMIT/g"

# set locale
Expand Down
4 changes: 2 additions & 2 deletions www/install/var/databaseTemplate.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
database:
db_configuration:
dsn: "mysql:host=--ADDRESS--:--DBPORT--;dbname=--CONFDB--"
dsn: "mysql:host=--ADDRESS--:port=--DBPORT--;dbname=--CONFDB--"
username: "--DBUSER--"
password: "--DBPASS--"
db_realtime:
dsn: "mysql:host=--ADDRESS--:--DBPORT--;dbname=--STORAGEDB--"
dsn: "mysql:host=--ADDRESS--:port=--DBPORT--;dbname=--STORAGEDB--"
username: "--DBUSER--"
password: "--DBPASS--"

0 comments on commit 4250095

Please sign in to comment.