Skip to content
Permalink
Browse files

[CMK-2057] [CMK-2113] - new files required for agent updater and beta…

…-test

- version is set to 2.0.1
- added install/check_mk.user.yml, install/checkmk.dat
- removed check_mk.dat also from the repo
- faq.txt is converted to readme.md
- added check_mk.marker, this is for installation testing
- changed PackageCode to update file list in install database
- refactoring: removed unused trash
- minor: content of project listed all required files
- build script now skips useless deployment of all bionaries

Change-Id: I6d9af6ab0d50ca2a62aeab92cd498a2b021d9cbb
  • Loading branch information...
s-kipnis committed May 15, 2019
1 parent 789f570 commit c84bcc376c08e1d9b1ab0e83093e252e4c64d22f
@@ -4,12 +4,10 @@ unusedFunction
useStlAlgorithm
// The TEST/TEST_F macros from googletest do not contain "override".
missingOverride:test_*.cc
missingOverride:test-*.cpp
// We do not care about warnings in our libraries.
*:*/include/boost/*
*:*/include/gtest/*
*:*/include/re2/*
*:*/extlibs/*
// Why on earth do we need this???
unmatchedSuppression:test_*.cc
unmatchedSuppression:test-*.cpp
@@ -22,6 +22,8 @@ mkdir %arte%\providers 2> nul
mkdir %arte%\exe 2> nul
mkdir %arte%\pdb 2> nul
set REMOTE_MACHINE=%arte%
set VS_DEPLOY=No
set VS_DEPLOY_MSI=YES
set LOCAL_IMAGES_PDB=%arte%\pdb
set LOCAL_IMAGES_EXE=%arte%\exe

@@ -60,14 +62,14 @@ if not %errorlevel% == 0 powershell Write-Host "Failed %exec%-32" -Foreground Re
if not %errorlevel% == 0 powershell Write-Host "Failed %exec%-64" -Foreground Red && exit 7

@rem auto install msi
git update-index --assume-unchanged install/resources/check_mk.dat > nul
@copy install\resources\check_mk.dat save.tmp > nul
echo update > install\resources\check_mk.dat
git update-index --assume-unchanged install/resources/check_mk.marker > nul
@copy install\resources\check_mk.marker save.tmp > nul
echo update > install\resources\check_mk.marker
%msbuild% wamain.sln /t:install /p:Configuration=Release,Platform=x64
set el=%errorlevel%
@type save.tmp > install\resources\check_mk.dat
@type save.tmp > install\resources\check_mk.marker
@del save.tmp > nul
git update-index --no-assume-unchanged install/resources/check_mk.dat > nul
git update-index --no-assume-unchanged install/resources/check_mk.marker > nul
if not %el% == 0 powershell Write-Host "Failed Install build" -Foreground Red && exit 88
move %REMOTE_MACHINE%\check_mk_service.msi %REMOTE_MACHINE%\check_mk_agent_update.msi

@@ -28,8 +28,8 @@ mkdir %ALLUSERSPROFILE%\CheckMk\Agent\Update 2> nul
copy check_mk_agent_update.msi %ALLUSERSPROFILE%\CheckMk\Agent\update\check_mk_agent.msi > nul
powershell Start-Sleep 20
echo update > control.tmp
fc "%ProgramFiles(X86)%\check_mk_service\check_mk.dat" control.tmp > nul
if not "%ERRORLEVEL%" == "0" powershell Write-Host "Update failed" -Foreground Red && fc "%ProgramFiles(X86)%\check_mk_service\check_mk.dat" control.tmp
fc "%ProgramFiles(X86)%\check_mk_service\check_mk.marker" control.tmp > nul
if not "%ERRORLEVEL%" == "0" powershell Write-Host "Update failed" -Foreground Red && fc "%ProgramFiles(X86)%\check_mk_service\check_mk.marker" control.tmp
set upd=%errorlevel%
del control.tmp > nul
:work
@@ -1,10 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<?define CompanyName = "Mathias Kettner GmbH"?>
<?define ProductName = "Check MK Service"?>
<?define ProductVersion = "1.6.0"?>
<?define ProductVersion = "2.0.1"?>
<?define ProductId = "{C3BDE55B-4C42-48D0-8792-B1DE5174C202}"?>
<?define ProductUpgradeCode = "83F434E9-EA96-4881-AA93-E21B27285C05"?>
<?define PackageCode = "BAEBF560-7308-4D53-B426-903EA74B1D7E"?>
<!-- IMPORTANT NOTE: If you change architecture, please change the package code TOO -->
<?define PackageCode = "BAEBF560-7308-4D53-B426-903EA74B1D9F"?>
<?define FolderName = "check_mk_service"?>
<?define ServiceName = "CheckMkService"?>
<?define ServiceDisplayName = "Check MK Service"?>
@@ -163,9 +164,27 @@
<File Id="plugins_cap"
Source="resources\plugins.cap"
KeyPath="yes"
Checksum="yes" DiskId="2"
/>
Checksum="yes"
DiskId="2"/>
</Component>

<Component Id="checkmk.dat" Guid="{77EB5469-AD06-4B52-A408-C2F4151C7114}">
<File Id="checkmk.dat"
Source="resources\checkmk.dat"
KeyPath="yes"
Checksum="yes"
DiskId="2" />
</Component>

<Component Id="check_mk.user.yml" Guid="{FB530333-4B0E-4C13-BF01-4F980B1C7326}">
<File Id="check_mk.user.yml"
Source="resources\check_mk.user.yml"
KeyPath="yes"
Checksum="yes"
DiskId="2" />
</Component>


</DirectoryRef>

<DirectoryRef Id="plugins">
@@ -290,6 +309,8 @@
-->
<ComponentRef Id="check_mk_ini_" />
<ComponentRef Id="plugins_cap_" />
<ComponentRef Id="checkmk.dat" />
<ComponentRef Id="check_mk.user.yml" />
</Feature>

<Feature Id="plugins_binaries" Title="Plugins for Windows" Level="1">
@@ -348,13 +369,13 @@
<!-- <Component Id="ProductComponent"> -->
<!-- TODO: Insert files, registry keys, and other resources here. -->
<!-- </Component> -->
<Component Id="check_mk_data"
Guid="{382114FC-FB0C-4A15-AECE-CD489957DDFC}">
<File Id="check_mk.dat"
Source="resources\check_mk.dat"
Name="check_mk.dat"
<Component Id="check_mk_marker"
Guid="{F3949AC9-2D27-4A96-81C7-9C5599E8AF8F}">
<File Id="check_mk.marker"
Source="resources\check_mk.marker"
Name="check_mk.marker"
KeyPath="yes"
Checksum="yes"
Checksum="yes"
DiskId="1" />
</Component>

@@ -420,10 +441,10 @@
<File Id="check_mk.yml" Source="resources\check_mk.yml" DiskId="1" />
</Component>

<Component Id="faq.txt" Guid="{E5DC6560-A666-4939-A441-3861BE025A27}">
<File Id="faq.txt" Source="resources\faq.txt" DiskId="1" />
<Component Id="readme.md" Guid="{14F083A7-2ACE-4738-A8E4-3D5D8C1DA50C}">
<File Id="readme.md" Source="resources\readme.md" DiskId="1" />
</Component>

<!-- not required anybmore -->
<Component Id="RegistryEntries"
Guid="F95DD079-D93F-441B-9D38-CA6D9500C6A7"
@@ -45,9 +45,12 @@
<Folder Include="resources" />
</ItemGroup>
<ItemGroup>
<Content Include="resources\check_mk.dat" />
<Content Include="resources\checkmk.dat" />
<Content Include="resources\check_mk.ini" />
<Content Include="resources\check_mk.marker" />
<Content Include="resources\check_mk.user.yml" />
<Content Include="resources\check_mk.yml" />
<Content Include="resources\faq.txt" />
<Content Include="resources\readme.md" />
<Content Include="resources\GPL-V2.rtf" />
</ItemGroup>
<Import Project="$(WixTargetsPath)" Condition=" '$(WixTargetsPath)' != '' " />
@@ -57,10 +60,14 @@
</Target>
<PropertyGroup>
<PostBuildEvent>%40echo off
%40if not "$(VS_DEPLOY)" == "YES" goto DoNotCopy
%40if "$(VS_DEPLOY)" == "YES" goto copy_all
%40if "$(VS_DEPLOY_MSI)" == "YES" goto copy_msi
%40goto end
%40:copy_all
%40copy "$(TargetPath)" $(LOCAL_IMAGES_EXE) 1&gt; nul || exit 2
%40:copy_msi
%40copy "$(TargetPath)" $(REMOTE_MACHINE) 1&gt; nul || exit 3
%40:DoNotCopy</PostBuildEvent>
%40:end</PostBuildEvent>
</PropertyGroup>
<!--
To modify your build process, add your task inside one of the targets below and uncomment it.

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1 @@
# placeholder 2.0.1
@@ -0,0 +1,4 @@
# informational file about configuration and build
# supplied by build or by bakery
# format is yml
hash: DEFADEFADEFA

This file was deleted.

Oops, something went wrong.
@@ -0,0 +1,14 @@
# New Windows Agent: FAQ


## Where is my log files?
The Log file is relocated to %PUBLIC%, usually c:\Users\Public\check_mk.log

## Where is my other folders?
in %ProgramData%\CheckMk\Agent, usually this is c:\ProgramData\CheckMK\Agent\

## What happened with Legacy Agent
If the Legacy Agent have been installed, then this it was stopped and disabled during insatllation.
New Agent have migrated to Legacy agent config and plugins.


@@ -1101,7 +1101,6 @@ LoadCfgStatus ConfigInfo::loadAggregated(const std::wstring& config_filename,

// check user
auto& user = yamls[2];
bool try_cache = user.exists() && user.bad();

bool changed = false;
for (auto& yd : yamls) {
@@ -653,15 +653,6 @@ extern XLOG::Emitter stdio; // only print

// API:
//
// #TODO make ONE ENTRY we have to many methods to setup and to read setup
// as in example below
namespace setup {
class VeryBestConfigForAgentFromSergey {
bool event_;
bool windbg_;
};

} // namespace setup

// bad example of engineering.
// #TODO fix this make one entry point(Global Object)

0 comments on commit c84bcc3

Please sign in to comment.
You can’t perform that action at this time.