[add] Documentation\n[chore] Remove some debug trace logs
This commit is contained in:
parent
c27d732655
commit
3c4307bed4
@ -109,12 +109,12 @@ namespace
|
|||||||
BOOST_LOG_TRIVIAL(debug) << "Trying to find processor idenfication...";
|
BOOST_LOG_TRIVIAL(debug) << "Trying to find processor idenfication...";
|
||||||
uint32_t a, b, c, d;
|
uint32_t a, b, c, d;
|
||||||
__cpuid (0 /* vendor string */, a, b, c, d);
|
__cpuid (0 /* vendor string */, a, b, c, d);
|
||||||
std::cout << "EAX: " << std::hex << std::setw(8) << std::setfill('0') << a << "\nEBX: " << b << "\nECX: " << c << "\nEDX: " << d << "\n";
|
BOOST_LOG_TRIVIAL(debug) << "EAX: " << std::hex << std::setw(8) << std::setfill('0') << a << "\nEBX: " << b << "\nECX: " << c << "\nEDX: " << d;
|
||||||
uint32_t vendorId = a;
|
uint32_t vendorId = a;
|
||||||
uint32_t vendorString[] = {b, d, c, 0};
|
uint32_t vendorString[] = {b, d, c, 0};
|
||||||
|
|
||||||
__cpuid (1 /* Processor Info and Feature Bits */, a, b, c, d);
|
__cpuid (1 /* Processor Info and Feature Bits */, a, b, c, d);
|
||||||
std::cout << "EAX: " << std::hex << std::setw(8) << std::setfill('0') << a << "\nEBX: " << b << "\nECX: " << c << "\nEDX: " << d << "\n";
|
BOOST_LOG_TRIVIAL(debug) << "EAX: " << std::hex << std::setw(8) << std::setfill('0') << a << "\nEBX: " << b << "\nECX: " << c << "\nEDX: " << d;
|
||||||
bool isHypervisor = c & 0x80000000;
|
bool isHypervisor = c & 0x80000000;
|
||||||
uint32_t modelId = a & 0b00001111111111110011111111111111;
|
uint32_t modelId = a & 0b00001111111111110011111111111111;
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ namespace detail
|
|||||||
|
|
||||||
auto result2 = read_dmidecode();
|
auto result2 = read_dmidecode();
|
||||||
for (auto it = result2.cbegin(); it != result2.cend(); ++it) {
|
for (auto it = result2.cbegin(); it != result2.cend(); ++it) {
|
||||||
std::cout << it->first << ": " << it->second << std::endl;
|
BOOST_LOG_TRIVIAL(debug) << it->first << ": " << it->second;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (result.find(SystemParamTypes::mainboardSerialNum) == result.end() &&
|
if (result.find(SystemParamTypes::mainboardSerialNum) == result.end() &&
|
||||||
|
|||||||
@ -40,6 +40,7 @@ void initLogging(std::optional<std::string> logFolder, bool debug = false)
|
|||||||
keywords::open_mode = std::ios_base::app,
|
keywords::open_mode = std::ios_base::app,
|
||||||
keywords::rotation_size = 10 * 1024 * 1024,
|
keywords::rotation_size = 10 * 1024 * 1024,
|
||||||
keywords::max_files = 10,
|
keywords::max_files = 10,
|
||||||
|
keywords::auto_flush = true,
|
||||||
keywords::format = (
|
keywords::format = (
|
||||||
expr::stream
|
expr::stream
|
||||||
<< expr::format_date_time<boost::posix_time::ptime>("TimeStamp", "%Y-%m-%d %H:%M:%S")
|
<< expr::format_date_time<boost::posix_time::ptime>("TimeStamp", "%Y-%m-%d %H:%M:%S")
|
||||||
|
|||||||
67
docs/CCEngineServer/CREATING_LICENSE.html
Normal file
67
docs/CCEngineServer/CREATING_LICENSE.html
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>CCEngineServer service guide: Creating a new license</title>
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body class="vscode-body vscode-light">
|
||||||
|
<blockquote>
|
||||||
|
<p>Important: This file is confidential for APIS internal use</p>
|
||||||
|
</blockquote>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#ccengineserver-service-guide-creating-a-new-license">CCEngineServer service guide: Creating a new license</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#1-pripojenie-na-databazu-licencii-cez-adminer">1. Pripojenie na databazu licencii cez Adminer</a></li>
|
||||||
|
<li><a href="#2-optional-zoznam-este-neaktivovanych-licencii-si-viem-pozriet-nasledovnym-query">2. (optional) Zoznam este neaktivovanych licencii si viem pozriet nasledovnym query:</a></li>
|
||||||
|
<li><a href="#3-vygenerovanie-novej-licencie">3. Vygenerovanie novej licencie</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h1 id="ccengineserver-service-guide-creating-a-new-license">CCEngineServer service guide: Creating a new license</h1>
|
||||||
|
<h3 id="1-pripojenie-na-databazu-licencii-cez-adminer">1. Pripojenie na databazu licencii cez Adminer</h3>
|
||||||
|
<p><a href="https://license-admin.apis.sk/">https://license-admin.apis.sk/</a></p>
|
||||||
|
<p><img src="file:////var/home/petos/work/CCEngineServer/CCEngineServer/license_admin_connection.png" alt="license-admin connection"></p>
|
||||||
|
<h3 id="2-optional-zoznam-este-neaktivovanych-licencii-si-viem-pozriet-nasledovnym-query">2. (optional) Zoznam este neaktivovanych licencii si viem pozriet nasledovnym query:</h3>
|
||||||
|
<pre><code class="language-sql"><div><span class="hljs-keyword">Select</span> * <span class="hljs-keyword">From</span> License <span class="hljs-keyword">Where</span> productId=<span class="hljs-string">'cocserver'</span> <span class="hljs-keyword">and</span> licenseNum <span class="hljs-keyword">Not</span> <span class="hljs-keyword">In</span> (<span class="hljs-keyword">select</span> licenseNum <span class="hljs-keyword">FROM</span> ActiveActivationView)
|
||||||
|
</div></code></pre>
|
||||||
|
<p><img src="file:////var/home/petos/work/CCEngineServer/CCEngineServer/license_admin_query.png" alt="license-admin query"></p>
|
||||||
|
<h3 id="3-vygenerovanie-novej-licencie">3. Vygenerovanie novej licencie</h3>
|
||||||
|
<p>Pre vygenerovanie novej licencie nabrowsujem na
|
||||||
|
(<a href="https://license.apis.sk/temp/generate-new-license">https://license.apis.sk/temp/generate-new-license</a>)</p>
|
||||||
|
<p>kde najdem dve hlavne casti:</p>
|
||||||
|
<ol>
|
||||||
|
<li>Prva cast kde je licencia oddelena pomlckami pre jednoduchsi prepis (treba si niekde odlozit)</li>
|
||||||
|
<li>Druha cast kde je query aby sa ulozila nova licencia do databazy
|
||||||
|
<blockquote>
|
||||||
|
<p>Nepouzi vygenerovane SQL prikazy. Musis ich najprv upravit na taketo:</p>
|
||||||
|
<pre><code><code><div>coc -> cocserver
|
||||||
|
ccengine -> ccengineserver
|
||||||
|
posledny riadok vymaz
|
||||||
|
</div></code></code></pre>
|
||||||
|
</blockquote>
|
||||||
|
</li>
|
||||||
|
</ol>
|
||||||
|
<p>Pre pridanie licencie do databazy treba cez obrazovku "SQL Command" ako v kroku 2 skopirovat query (3 prikazy = samotna
|
||||||
|
licencia + pridelenie modulov ccengine a cndata) z druhej casti a spustit.
|
||||||
|
Ci bola licencia uspesne pridana sa da pozriet podla navodu v kroku 2.</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
43
docs/CCEngineServer/CREATING_LICENSE.md
Normal file
43
docs/CCEngineServer/CREATING_LICENSE.md
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
> Important: This file is confidential for APIS internal use
|
||||||
|
|
||||||
|
- [CCEngineServer service guide: Creating a new license](#ccengineserver-service-guide-creating-a-new-license)
|
||||||
|
- [1. Pripojenie na databazu licencii cez Adminer](#1-pripojenie-na-databazu-licencii-cez-adminer)
|
||||||
|
- [2. (optional) Zoznam este neaktivovanych licencii si viem pozriet nasledovnym query:](#2-optional-zoznam-este-neaktivovanych-licencii-si-viem-pozriet-nasledovnym-query)
|
||||||
|
- [3. Vygenerovanie novej licencie](#3-vygenerovanie-novej-licencie)
|
||||||
|
|
||||||
|
# CCEngineServer service guide: Creating a new license
|
||||||
|
|
||||||
|
### 1. Pripojenie na databazu licencii cez Adminer
|
||||||
|
|
||||||
|
[https://license-admin.apis.sk/](https://license-admin.apis.sk/)
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
### 2. (optional) Zoznam este neaktivovanych licencii si viem pozriet nasledovnym query:
|
||||||
|
|
||||||
|
```sql
|
||||||
|
Select * From License Where productId='cocserver' and licenseNum Not In (select licenseNum FROM ActiveActivationView)
|
||||||
|
```
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
|
||||||
|
### 3. Vygenerovanie novej licencie
|
||||||
|
|
||||||
|
Pre vygenerovanie novej licencie nabrowsujem na
|
||||||
|
(https://license.apis.sk/temp/generate-new-license)
|
||||||
|
|
||||||
|
kde najdem dve hlavne casti:
|
||||||
|
1. Prva cast kde je licencia oddelena pomlckami pre jednoduchsi prepis (treba si niekde odlozit)
|
||||||
|
2. Druha cast kde je query aby sa ulozila nova licencia do databazy
|
||||||
|
> Nepouzi vygenerovane SQL prikazy. Musis ich najprv upravit na taketo:
|
||||||
|
>
|
||||||
|
> ```
|
||||||
|
> coc -> cocserver
|
||||||
|
> ccengine -> ccengineserver
|
||||||
|
> posledny riadok vymaz
|
||||||
|
> ```
|
||||||
|
|
||||||
|
Pre pridanie licencie do databazy treba cez obrazovku "SQL Command" ako v kroku 2 skopirovat query (3 prikazy = samotna
|
||||||
|
licencia + pridelenie modulov ccengine a cndata) z druhej casti a spustit.
|
||||||
|
Ci bola licencia uspesne pridana sa da pozriet podla navodu v kroku 2.
|
||||||
54
docs/CCEngineServer/PROCESSING_ACTIVATION_REQUEST.html
Normal file
54
docs/CCEngineServer/PROCESSING_ACTIVATION_REQUEST.html
Normal file
@ -0,0 +1,54 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>CCEngineServer service guide: Processing activation request</title>
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body class="vscode-body vscode-light">
|
||||||
|
<blockquote>
|
||||||
|
<p>Important: This file is confidential for APIS internal use</p>
|
||||||
|
</blockquote>
|
||||||
|
<h1 id="ccengineserver-service-guide-processing-activation-request">CCEngineServer service guide: Processing activation request</h1>
|
||||||
|
<h2 id="1-prijatie-poziadavky-o-aktivaciu-od-zakaznika">1. Prijatie poziadavky o aktivaciu od zakaznika</h2>
|
||||||
|
<p>Tento process zacne prijatim poziadavky od zakaznika na offline aktivaciu (vid <a href="USER_GUIDE.html">User guide</a>).
|
||||||
|
Aktivacny request ma nasledovny format:</p>
|
||||||
|
<pre><code><code><div>-----BEGIN ACTIVATION REQUEST-----
|
||||||
|
ABCabc....
|
||||||
|
...
|
||||||
|
xyzXYZ==
|
||||||
|
-----END ACTIVATION REQUEST-----
|
||||||
|
</div></code></code></pre>
|
||||||
|
<h2 id="2-aktivacia">2. Aktivacia</h2>
|
||||||
|
<p><a href="https://license.apis.sk/temp/license-activator-tool/">https://license.apis.sk/temp/license-activator-tool/</a></p>
|
||||||
|
<ol>
|
||||||
|
<li>Aktivacny request treba nakopirovat do prveho okienka (Activation request):</li>
|
||||||
|
<li>Kliknes Parse activation request</li>
|
||||||
|
<li>Ak bol spravny mal by si v dalsom okienku vidiet zahashovane identifikatory</li>
|
||||||
|
<li>Vyplnis licencne cislo ktore bolo vygenerovanie podla <a href="CREATING_LICENSE.html">Creating license</a></li>
|
||||||
|
<li>Kliknes Activate</li>
|
||||||
|
<li>Po uspesnej aktivacii mozes stiahnut "license.dat"</li>
|
||||||
|
</ol>
|
||||||
|
<p><img src="file:////var/home/petos/work/CCEngineServer/CCEngineServer/license_activator_tool.png" alt="License activator tool"></p>
|
||||||
|
<h2 id="3-poslanie-vygenerovaneho-licensedat-naspat-zakaznikovi">3. Poslanie vygenerovaneho license.dat naspat zakaznikovi</h2>
|
||||||
|
<p>Vygenerovany <code>license.dat</code> treba dorucit zakaznikovi s instrukciou aby ho nakopiroval do hlavneho foldra kde ma applikaciu</p>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
32
docs/CCEngineServer/PROCESSING_ACTIVATION_REQUEST.md
Normal file
32
docs/CCEngineServer/PROCESSING_ACTIVATION_REQUEST.md
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
> Important: This file is confidential for APIS internal use
|
||||||
|
|
||||||
|
# CCEngineServer service guide: Processing activation request
|
||||||
|
|
||||||
|
## 1. Prijatie poziadavky o aktivaciu od zakaznika
|
||||||
|
|
||||||
|
Tento process zacne prijatim poziadavky od zakaznika na offline aktivaciu (vid [User guide](USER_GUIDE.md)).
|
||||||
|
Aktivacny request ma nasledovny format:
|
||||||
|
|
||||||
|
```
|
||||||
|
-----BEGIN ACTIVATION REQUEST-----
|
||||||
|
ABCabc....
|
||||||
|
...
|
||||||
|
xyzXYZ==
|
||||||
|
-----END ACTIVATION REQUEST-----
|
||||||
|
```
|
||||||
|
|
||||||
|
## 2. Aktivacia
|
||||||
|
|
||||||
|
[https://license.apis.sk/temp/license-activator-tool/](https://license.apis.sk/temp/license-activator-tool/)
|
||||||
|
1. Aktivacny request treba nakopirovat do prveho okienka (Activation request):
|
||||||
|
1. Kliknes Parse activation request
|
||||||
|
1. Ak bol spravny mal by si v dalsom okienku vidiet zahashovane identifikatory
|
||||||
|
1. Vyplnis licencne cislo ktore bolo vygenerovanie podla [Creating license](CREATING_LICENSE.md)
|
||||||
|
1. Kliknes Activate
|
||||||
|
1. Po uspesnej aktivacii mozes stiahnut "license.dat"
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
## 3. Poslanie vygenerovaneho license.dat naspat zakaznikovi
|
||||||
|
|
||||||
|
Vygenerovany `license.dat` treba dorucit zakaznikovi s instrukciou aby ho nakopiroval do hlavneho foldra kde ma applikaciu
|
||||||
159
docs/CCEngineServer/USER_GUIDE.html
Normal file
159
docs/CCEngineServer/USER_GUIDE.html
Normal file
@ -0,0 +1,159 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<meta charset="UTF-8">
|
||||||
|
<title>CCEngineServer User guide</title>
|
||||||
|
<style>
|
||||||
|
</style>
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/markdown.css">
|
||||||
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/Microsoft/vscode/extensions/markdown-language-features/media/highlight.css">
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe WPC', 'Segoe UI', system-ui, 'Ubuntu', 'Droid Sans', sans-serif;
|
||||||
|
font-size: 14px;
|
||||||
|
line-height: 1.6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
<style>
|
||||||
|
.task-list-item { list-style-type: none; } .task-list-item-checkbox { margin-left: -20px; vertical-align: middle; }
|
||||||
|
</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
<body class="vscode-body vscode-light">
|
||||||
|
<ul>
|
||||||
|
<li><a href="#ccengineserver-user-guide">CCEngineServer User guide</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#installation">Installation</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#extract-the-application">Extract the application</a></li>
|
||||||
|
<li><a href="#extract-application-data-into-data-folder">Extract application data into data folder</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#activation">Activation</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#option-a-online-activation">Option A: Online activation</a></li>
|
||||||
|
<li><a href="#option-b-offline-activation">Option B: Offline activation</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#running">Running</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#optional-create-a-non-root-user">Optional: Create a non-root user</a></li>
|
||||||
|
<li><a href="#run">Run</a></li>
|
||||||
|
<li><a href="#test-connection-with-browser">Test connection with browser</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
<li><a href="#starting-the-application-as-systemd-service">Starting the application as systemd service</a>
|
||||||
|
<ul>
|
||||||
|
<li><a href="#create-new-service-unit">Create new service unit</a></li>
|
||||||
|
<li><a href="#start-the-ccengineserver-service">Start the CCEngineServer service</a></li>
|
||||||
|
<li><a href="#enable-automatic-startup">Enable automatic startup</a></li>
|
||||||
|
<li><a href="#optional-stopping-application">Optional: Stopping application</a></li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<h1 id="ccengineserver-user-guide">CCEngineServer User guide</h1>
|
||||||
|
<h2 id="installation">Installation</h2>
|
||||||
|
<h3 id="extract-the-application">Extract the application</h3>
|
||||||
|
<p>Extract the application into /opt folder</p>
|
||||||
|
<pre><code class="language-bash"><div>mkdir /opt/CCEngineServer
|
||||||
|
tar -xvzf CCEngineServer-<VER>.tar.gz --directory /opt/CCEngineServer/
|
||||||
|
</div></code></pre>
|
||||||
|
<h3 id="extract-application-data-into-data-folder">Extract application data into data folder</h3>
|
||||||
|
<pre><code class="language-bash"><div>unzip data-<VER>.zip -d /opt/CCEngineServer/data
|
||||||
|
</div></code></pre>
|
||||||
|
<h2 id="activation">Activation</h2>
|
||||||
|
<p>There are two ways to activate the application. One is online activation if you have a license key and your target system
|
||||||
|
can access internet. The second options is for closed environments where internet access is not possible.</p>
|
||||||
|
<h3 id="option-a-online-activation">Option A: Online activation</h3>
|
||||||
|
<pre><code class="language-bash"><div><span class="hljs-built_in">cd</span> /opt/CCEngineServer
|
||||||
|
sudo ./bin/CCEngineServer --activate_online
|
||||||
|
</div></code></pre>
|
||||||
|
<p>When prompted, please enter provided license key and press enter.</p>
|
||||||
|
<blockquote>
|
||||||
|
<p>Note: In case of connection problems please check if your <code>/etc/ssl/certs/ca-certificates.crt</code> exists.
|
||||||
|
On some systems the ca-certificates bundle is not in the expected location. You can fix that by creating symbolic link
|
||||||
|
to the right location.
|
||||||
|
Example on fedora:</p>
|
||||||
|
<pre><code class="language-bash"><div>sudo ln -s /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
</div></code></pre>
|
||||||
|
</blockquote>
|
||||||
|
<h3 id="option-b-offline-activation">Option B: Offline activation</h3>
|
||||||
|
<pre><code class="language-bash"><div><span class="hljs-built_in">cd</span> /opt/CCEngineServer
|
||||||
|
sudo ./bin/CCEngineServer --activate_offline
|
||||||
|
</div></code></pre>
|
||||||
|
<p>Copy the generated request as in below example and send by email to customer support of Catalogue of Currencies</p>
|
||||||
|
<pre><code class="language-mail"><code><div>Subject: CCEngineServer activation request
|
||||||
|
|
||||||
|
-----BEGIN ACTIVATION REQUEST-----
|
||||||
|
ABCabc....
|
||||||
|
...
|
||||||
|
xyzXYZ==
|
||||||
|
-----END ACTIVATION REQUEST-----
|
||||||
|
</div></code></code></pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>Note: Please note that the activation request contains hardware fingerprints from the target device</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>The support will email you back <code>license.dat</code> file which should be copied to application installation directory
|
||||||
|
(i.e. its location should be <code>/opt/CCEngineServer/license.dat</code>).</p>
|
||||||
|
<h2 id="running">Running</h2>
|
||||||
|
<h3 id="optional-create-a-non-root-user">Optional: Create a non-root user</h3>
|
||||||
|
<p>Although the application needs to be started as root, it can swith to non-root user just after successfull startup.
|
||||||
|
You can use the commands below to create a new user.</p>
|
||||||
|
<pre><code class="language-bash"><div>sudo useradd -M ccengine
|
||||||
|
sudo usermod -L ccengine
|
||||||
|
</div></code></pre>
|
||||||
|
<p>Find the assigned uid and gid to the created user:</p>
|
||||||
|
<pre><code><code><div>id ccengine
|
||||||
|
> uid=1001(ccengine) gid=1001(ccengine) groups=1001(ccengine)
|
||||||
|
</div></code></code></pre>
|
||||||
|
<h3 id="run">Run</h3>
|
||||||
|
<p>If the application is successfully activate it can be started by following commands. Please note that <code>--set_uid 1001</code>
|
||||||
|
and <code>--set_gid 1001</code> are optional so these parameters can be either removed and in such case the application will be
|
||||||
|
running as <code>root</code>, or the numbers should be replaced by the uid and gid of the non-root user created in previous steps.</p>
|
||||||
|
<pre><code class="language-bash"><div><span class="hljs-built_in">cd</span> /opt/CCEngineServer
|
||||||
|
sudo /opt/CCEngineServer/bin/CCEngineServer --data_root ./data --set_uid 1001 --set_gid 1001
|
||||||
|
</div></code></pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>Note: The application by default bind all network interfaces and listens on port 8080. If a different port is needed
|
||||||
|
please refer to <code>CCEngineServer --help</code> to see how defaults can be changed.</p>
|
||||||
|
</blockquote>
|
||||||
|
<h3 id="test-connection-with-browser">Test connection with browser</h3>
|
||||||
|
<p>Open web browser and enter following into the addres bar <code>http://<server_address>:8080/</code>.</p>
|
||||||
|
<h2 id="starting-the-application-as-systemd-service">Starting the application as systemd service</h2>
|
||||||
|
<h3 id="create-new-service-unit">Create new service unit</h3>
|
||||||
|
<p>Example service unit file can look like this. Please note that uid 1001 and gid 1001 should be changed to your own prefered
|
||||||
|
user</p>
|
||||||
|
<pre><code class="language-ini"><div><span class="hljs-comment"># /etc/systemd/system/ccengineserver.service</span>
|
||||||
|
<span class="hljs-section">[Unit]</span>
|
||||||
|
<span class="hljs-attr">Description</span>=CCEngineServer data server for Catalogue of Currencies
|
||||||
|
|
||||||
|
<span class="hljs-section">[Service]</span>
|
||||||
|
<span class="hljs-attr">WorkingDirectory</span>=/opt/CCEngineServer
|
||||||
|
<span class="hljs-attr">User</span>=root
|
||||||
|
<span class="hljs-attr">ExecStart</span>=/opt/CCEngineServer/bin/CCEngineServer --data_root ./data --log_folder ./log --set_uid <span class="hljs-number">1001</span> --set_gid <span class="hljs-number">1001</span>
|
||||||
|
|
||||||
|
<span class="hljs-section">[Install]</span>
|
||||||
|
<span class="hljs-attr">WantedBy</span>=multi-user.target
|
||||||
|
</div></code></pre>
|
||||||
|
<blockquote>
|
||||||
|
<p>Note: Please note that in case of using SELinux, the following security context need to be set to the binary executable:
|
||||||
|
<code>sudo chcon -R -t bin_t /opt/CCEngineServer/bin/</code>.
|
||||||
|
The selinux status can be checked by <code>getenforce</code>, <code>sestatus</code> commands</p>
|
||||||
|
</blockquote>
|
||||||
|
<h3 id="start-the-ccengineserver-service">Start the CCEngineServer service</h3>
|
||||||
|
<pre><code class="language-bash"><div>sudo systemctl start ccengineserver
|
||||||
|
</div></code></pre>
|
||||||
|
<h3 id="enable-automatic-startup">Enable automatic startup</h3>
|
||||||
|
<pre><code class="language-bash"><div>sudo systemctl <span class="hljs-built_in">enable</span> ccengineserver
|
||||||
|
</div></code></pre>
|
||||||
|
<h3 id="optional-stopping-application">Optional: Stopping application</h3>
|
||||||
|
<pre><code class="language-bash"><div>sudo systemctl stop ccengineserver
|
||||||
|
</div></code></pre>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
150
docs/CCEngineServer/USER_GUIDE.md
Normal file
150
docs/CCEngineServer/USER_GUIDE.md
Normal file
@ -0,0 +1,150 @@
|
|||||||
|
|
||||||
|
- [CCEngineServer User guide](#ccengineserver-user-guide)
|
||||||
|
- [Installation](#installation)
|
||||||
|
- [Extract the application](#extract-the-application)
|
||||||
|
- [Extract application data into data folder](#extract-application-data-into-data-folder)
|
||||||
|
- [Activation](#activation)
|
||||||
|
- [Option A: Online activation](#option-a-online-activation)
|
||||||
|
- [Option B: Offline activation](#option-b-offline-activation)
|
||||||
|
- [Running](#running)
|
||||||
|
- [Optional: Create a non-root user](#optional-create-a-non-root-user)
|
||||||
|
- [Run](#run)
|
||||||
|
- [Test connection with browser](#test-connection-with-browser)
|
||||||
|
- [Starting the application as systemd service](#starting-the-application-as-systemd-service)
|
||||||
|
- [Create new service unit](#create-new-service-unit)
|
||||||
|
- [Start the CCEngineServer service](#start-the-ccengineserver-service)
|
||||||
|
- [Enable automatic startup](#enable-automatic-startup)
|
||||||
|
- [Optional: Stopping application](#optional-stopping-application)
|
||||||
|
|
||||||
|
# CCEngineServer User guide
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
### Extract the application
|
||||||
|
Extract the application into /opt folder
|
||||||
|
```bash
|
||||||
|
mkdir /opt/CCEngineServer
|
||||||
|
tar -xvzf CCEngineServer-<VER>.tar.gz --directory /opt/CCEngineServer/
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extract application data into data folder
|
||||||
|
```bash
|
||||||
|
unzip data-<VER>.zip -d /opt/CCEngineServer/data
|
||||||
|
```
|
||||||
|
|
||||||
|
## Activation
|
||||||
|
|
||||||
|
There are two ways to activate the application. One is online activation if you have a license key and your target system
|
||||||
|
can access internet. The second options is for closed environments where internet access is not possible.
|
||||||
|
|
||||||
|
### Option A: Online activation
|
||||||
|
```bash
|
||||||
|
cd /opt/CCEngineServer
|
||||||
|
sudo ./bin/CCEngineServer --activate_online
|
||||||
|
```
|
||||||
|
|
||||||
|
When prompted, please enter provided license key and press enter.
|
||||||
|
|
||||||
|
> Note: In case of connection problems please check if your `/etc/ssl/certs/ca-certificates.crt` exists.
|
||||||
|
> On some systems the ca-certificates bundle is not in the expected location. You can fix that by creating symbolic link
|
||||||
|
> to the right location.
|
||||||
|
> Example on fedora:
|
||||||
|
> ```bash
|
||||||
|
> sudo ln -s /etc/ssl/certs/ca-bundle.crt /etc/ssl/certs/ca-certificates.crt
|
||||||
|
> ```
|
||||||
|
|
||||||
|
### Option B: Offline activation
|
||||||
|
```bash
|
||||||
|
cd /opt/CCEngineServer
|
||||||
|
sudo ./bin/CCEngineServer --activate_offline
|
||||||
|
```
|
||||||
|
|
||||||
|
Copy the generated request as in below example and send by email to customer support of Catalogue of Currencies
|
||||||
|
```mail
|
||||||
|
Subject: CCEngineServer activation request
|
||||||
|
|
||||||
|
-----BEGIN ACTIVATION REQUEST-----
|
||||||
|
ABCabc....
|
||||||
|
...
|
||||||
|
xyzXYZ==
|
||||||
|
-----END ACTIVATION REQUEST-----
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: Please note that the activation request contains hardware fingerprints from the target device
|
||||||
|
|
||||||
|
The support will email you back `license.dat` file which should be copied to application installation directory
|
||||||
|
(i.e. its location should be `/opt/CCEngineServer/license.dat`).
|
||||||
|
|
||||||
|
## Running
|
||||||
|
|
||||||
|
### Optional: Create a non-root user
|
||||||
|
|
||||||
|
Although the application needs to be started as root, it can swith to non-root user just after successfull startup.
|
||||||
|
You can use the commands below to create a new user.
|
||||||
|
```bash
|
||||||
|
sudo useradd -M ccengine
|
||||||
|
sudo usermod -L ccengine
|
||||||
|
```
|
||||||
|
|
||||||
|
Find the assigned uid and gid to the created user:
|
||||||
|
```
|
||||||
|
id ccengine
|
||||||
|
> uid=1001(ccengine) gid=1001(ccengine) groups=1001(ccengine)
|
||||||
|
```
|
||||||
|
|
||||||
|
### Run
|
||||||
|
|
||||||
|
If the application is successfully activate it can be started by following commands. Please note that `--set_uid 1001`
|
||||||
|
and `--set_gid 1001` are optional so these parameters can be either removed and in such case the application will be
|
||||||
|
running as `root`, or the numbers should be replaced by the uid and gid of the non-root user created in previous steps.
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cd /opt/CCEngineServer
|
||||||
|
sudo /opt/CCEngineServer/bin/CCEngineServer --data_root ./data --set_uid 1001 --set_gid 1001
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: The application by default bind all network interfaces and listens on port 8080. If a different port is needed
|
||||||
|
> please refer to `CCEngineServer --help` to see how defaults can be changed.
|
||||||
|
|
||||||
|
### Test connection with browser
|
||||||
|
|
||||||
|
Open web browser and enter following into the addres bar `http://<server_address>:8080/`.
|
||||||
|
|
||||||
|
## Starting the application as systemd service
|
||||||
|
|
||||||
|
### Create new service unit
|
||||||
|
Example service unit file can look like this. Please note that uid 1001 and gid 1001 should be changed to your own prefered
|
||||||
|
user
|
||||||
|
|
||||||
|
```ini
|
||||||
|
# /etc/systemd/system/ccengineserver.service
|
||||||
|
[Unit]
|
||||||
|
Description=CCEngineServer data server for Catalogue of Currencies
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
WorkingDirectory=/opt/CCEngineServer
|
||||||
|
User=root
|
||||||
|
ExecStart=/opt/CCEngineServer/bin/CCEngineServer --data_root ./data --log_folder ./log --set_uid 1001 --set_gid 1001
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
|
```
|
||||||
|
|
||||||
|
> Note: Please note that in case of using SELinux, the following security context need to be set to the binary executable:
|
||||||
|
> `sudo chcon -R -t bin_t /opt/CCEngineServer/bin/`.
|
||||||
|
> The selinux status can be checked by `getenforce`, `sestatus` commands
|
||||||
|
|
||||||
|
### Start the CCEngineServer service
|
||||||
|
```bash
|
||||||
|
sudo systemctl start ccengineserver
|
||||||
|
```
|
||||||
|
|
||||||
|
### Enable automatic startup
|
||||||
|
```bash
|
||||||
|
sudo systemctl enable ccengineserver
|
||||||
|
```
|
||||||
|
|
||||||
|
### Optional: Stopping application
|
||||||
|
```bash
|
||||||
|
sudo systemctl stop ccengineserver
|
||||||
|
```
|
||||||
BIN
docs/CCEngineServer/license_activator_tool.png
Normal file
BIN
docs/CCEngineServer/license_activator_tool.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 140 KiB |
BIN
docs/CCEngineServer/license_admin_connection.png
Normal file
BIN
docs/CCEngineServer/license_admin_connection.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 5.1 KiB |
BIN
docs/CCEngineServer/license_admin_query.png
Normal file
BIN
docs/CCEngineServer/license_admin_query.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 15 KiB |
Loading…
Reference in New Issue
Block a user