Merge remote-tracking branch 'origin/develop' into ent-2441-despliegue-de-agentes-desde-pandora

This commit is contained in:
fbsanchez 2019-07-30 12:53:23 +02:00
commit 755b0bbf7d
27 changed files with 92 additions and 25 deletions

49
pandora_agents/Dockerfile Normal file
View File

@ -0,0 +1,49 @@
FROM centos:centos7
MAINTAINER Pandora FMS Team <info@pandorafms.com>
# Add Pandora FMS agent installer
ADD unix /tmp/pandora_agent/unix
# Install dependencies
RUN yum -y install \
epel-release \
unzip \
perl \
sed \
"perl(Sys::Syslog)"
# Install Pandora FMS agent
RUN cd /tmp/pandora_agent/unix \
&& ./pandora_agent_installer --install
# Set default variables
ENV SERVER_IP '127.0.0.1'
ENV REMOTE_CONFIG '0'
ENV GROUP 'Servers'
ENV DEBUG '0'
ENV AGENT_NAME 'agent_docker'
ENV AGENT_ALIAS 'agent_docker'
ENV TIMEZONE 'UTC'
ENV SECONDARY_GROUPS ''
# Create the entrypoint script.
RUN echo -e '#/bin/bash\n \
sed -i "s/^server_ip.*$/server_ip $SERVER_IP/g" /etc/pandora/pandora_agent.conf\n \
sed -i "s/^remote_config.*$/remote_config $REMOTE_CONFIG/g" /etc/pandora/pandora_agent.conf\n \
sed -i "s/^group.*$/group $GROUP/g" /etc/pandora/pandora_agent.conf\n \
sed -i "s/^debug.*$/debug $DEBUG/g" /etc/pandora/pandora_agent.conf\n \
sed -i "s/^#agent_name.*$/agent_name $AGENT_NAME/g" /etc/pandora/pandora_agent.conf\n \
sed -i "s/^#agent_alias.*$/agent_alias $AGENT_ALIAS/g" /etc/pandora/pandora_agent.conf\n \
sed -i "s/^# secondary_groups.*$/secondary_groups $SECONDARY_GROUPS/g" /etc/pandora/pandora_agent.conf\n \
if [ $TIMEZONE != "" ]; then\n \
\tln -sfn /usr/share/zoneinfo/$TIMEZONE /etc/localtime\n \
fi\n \
/etc/init.d/pandora_agent_daemon start\n \
rm -f $0\n \
bash' \
>> /entrypoint.sh && \
chmod +x /entrypoint.sh
# Entrypoint + CMD
ENTRYPOINT ["bash"]
CMD ["/entrypoint.sh"]

View File

@ -0,0 +1,18 @@
#!/bin/bash
source /root/code/pandorafms/extras/build_vars.sh
# Set tag for docker build
if [ "$1" == "nightly" ]; then
LOCAL_VERSION="latest"
else
LOCAL_VERSION=$VERSION
fi
# Build image with code
docker build --rm=true --pull --no-cache -t pandorafms/pandorafms-agent:$LOCAL_VERSION -f $CODEHOME/pandora_agents/Dockerfile $CODEHOME/pandora_agents/
# Push image
docker push pandorafms/pandorafms-agent:$LOCAL_VERSION
# Delete local image
docker image rm -f pandorafms/pandorafms-agent:$LOCAL_VERSION

View File

@ -1,5 +1,5 @@
package: pandorafms-agent-unix
Version: 7.0NG.736-190726
Version: 7.0NG.736-190730
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.736-190726"
pandora_version="7.0NG.736-190730"
echo "Test if you has the tools for to make the packages."
whereis dpkg-deb | cut -d":" -f2 | grep dpkg-deb > /dev/null

View File

@ -42,7 +42,7 @@ my $Sem = undef;
my $ThreadSem = undef;
use constant AGENT_VERSION => '7.0NG.736';
use constant AGENT_BUILD => '190726';
use constant AGENT_BUILD => '190730';
# Agent log default file size maximum and instances
use constant DEFAULT_MAX_LOG_SIZE => 600000;

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.736
%define release 190726
%define release 190730
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_agent_unix
%define version 7.0NG.736
%define release 190726
%define release 190730
Summary: Pandora FMS Linux agent, PERL version
Name: %{name}

View File

@ -10,7 +10,7 @@
# **********************************************************************
PI_VERSION="7.0NG.736"
PI_BUILD="190726"
PI_BUILD="190730"
OS_NAME=`uname -s`
FORCE=0

View File

@ -186,7 +186,7 @@ UpgradeApplicationID
{}
Version
{190726}
{190730}
ViewReadme
{Yes}

View File

@ -30,7 +30,7 @@ using namespace Pandora;
using namespace Pandora_Strutils;
#define PATH_SIZE _MAX_PATH+1
#define PANDORA_VERSION ("7.0NG.736(Build 190726)")
#define PANDORA_VERSION ("7.0NG.736(Build 190730)")
string pandora_path;
string pandora_dir;

View File

@ -11,7 +11,7 @@ BEGIN
VALUE "LegalCopyright", "Artica ST"
VALUE "OriginalFilename", "PandoraAgent.exe"
VALUE "ProductName", "Pandora FMS Windows Agent"
VALUE "ProductVersion", "(7.0NG.736(Build 190726))"
VALUE "ProductVersion", "(7.0NG.736(Build 190730))"
VALUE "FileVersion", "1.0.0.0"
END
END

View File

@ -1,5 +1,5 @@
package: pandorafms-console
Version: 7.0NG.736-190726
Version: 7.0NG.736-190730
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.736-190726"
pandora_version="7.0NG.736-190730"
package_pear=0
package_pandora=1

View File

@ -20,7 +20,7 @@
/**
* Pandora build version and version
*/
$build_version = 'PC190726';
$build_version = 'PC190730';
$pandora_version = 'v7.0NG.736';
// Do not overwrite default timezone set if defined.

View File

@ -129,7 +129,7 @@
<div style='height: 10px'>
<?php
$version = '7.0NG.736';
$build = '190726';
$build = '190730';
$banner = "v$version Build $build";
error_reporting(0);

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.736
%define release 190726
%define release 190730
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.736
%define release 190726
%define release 190730
# User and Group under which Apache is running
%define httpd_name httpd

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_console
%define version 7.0NG.736
%define release 190726
%define release 190730
%define httpd_name httpd
# User and Group under which Apache is running
%define httpd_name apache2

View File

@ -1,5 +1,5 @@
package: pandorafms-server
Version: 7.0NG.736-190726
Version: 7.0NG.736-190730
Architecture: all
Priority: optional
Section: admin

View File

@ -14,7 +14,7 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
pandora_version="7.0NG.736-190726"
pandora_version="7.0NG.736-190730"
package_cpan=0
package_pandora=1

View File

@ -45,7 +45,7 @@ our @EXPORT = qw(
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.736";
my $pandora_build = "190726";
my $pandora_build = "190730";
our $VERSION = $pandora_version." ".$pandora_build;
# Setup hash

View File

@ -32,7 +32,7 @@ our @ISA = qw(Exporter);
# version: Defines actual version of Pandora Server for this module only
my $pandora_version = "7.0NG.736";
my $pandora_build = "190726";
my $pandora_build = "190730";
our $VERSION = $pandora_version." ".$pandora_build;
our %EXPORT_TAGS = ( 'all' => [ qw() ] );

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.736
%define release 190726
%define release 190730
Summary: Pandora FMS Server
Name: %{name}

View File

@ -3,7 +3,7 @@
#
%define name pandorafms_server
%define version 7.0NG.736
%define release 190726
%define release 190730
Summary: Pandora FMS Server
Name: %{name}

View File

@ -9,7 +9,7 @@
# **********************************************************************
PI_VERSION="7.0NG.736"
PI_BUILD="190726"
PI_BUILD="190730"
MODE=$1
if [ $# -gt 1 ]; then

View File

@ -34,7 +34,7 @@ use PandoraFMS::Config;
use PandoraFMS::DB;
# version: define current version
my $version = "7.0NG.736 PS190726";
my $version = "7.0NG.736 PS190730";
# Pandora server configuration
my %conf;

View File

@ -36,7 +36,7 @@ use Encode::Locale;
Encode::Locale::decode_argv;
# version: define current version
my $version = "7.0NG.736 PS190726";
my $version = "7.0NG.736 PS190730";
# save program name for logging
my $progname = basename($0);