<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I might be trying something which is not possible. </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I want the agent to be authorized automatically </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
That is why I entered the host key in the env file. But the agent is not authorized. It will come as unauthorized and I have to manually authorize it.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
As the client did not auto authorized I was using the register command trying to use my env file because it has all the settings
<span id="🙂">🙂</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<span><br>
</span></div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Am i doing this the wrong way ? </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Regards</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div id="appendonsend"></div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<hr style="display: inline-block; width: 98%;">
<div id="divRplyFwdMsg" dir="ltr"><span style="font-family: Calibri, sans-serif; font-size: 11pt; color: rgb(0, 0, 0);"><b>Van:</b> Slawek Figiel <slawek@isc.org><br>
<b>Verzonden:</b> donderdag 14 september 2023 17:10<br>
<b>Aan:</b> DDFR | Ronald Blaas <ronald.blaas@ddfr.nl>; stork-users@lists.isc.org <stork-users@lists.isc.org><br>
<b>Onderwerp:</b> Re: [stork-users] What does stork-install-agent.sh do?</span>
<div> </div>
</div>
<div><span style="font-size: 11pt;">Hello,<br>
<br>
The "register" command is incompatible with your environment file. The<br>
CLI framework expects the file to contain only command-specific<br>
arguments. But you use the environment file configured to run the agent<br>
without any command (standard run). The "commandless" handler and the<br>
"register" command handler support different parameters so your<br>
environment file<br>
<br>
I think this situation should be handled in a more user-friendly way.<br>
I've opened <a href="https://gitlab.isc.org/isc-projects/stork/-/issues/1160" id="OWA1a5eda52-2262-4426-425c-62eb84500355" class="OWAAutoLink" data-auth="NotApplicable">
https://gitlab.isc.org/isc-projects/stork/-/issues/1160</a> to<br>
address this issue.<br>
<br>
Regards<br>
Slawek<br>
<br>
On 14/09/2023 15:49, DDFR | Ronald Blaas wrote:<br>
> So I am trying to make the client authorized automatically but have no luck<br>
><br>
> When I run the command I get this error:<br>
> stork-agent --use-env-file register<br>
> FATA[2023-09-14 15:44:08] main.go:402 the<br>
> '/etc/stork/agent.env' environment file is invalid: cannot set<br>
> 'STORK_AGENT_HOST=xxx.xxx.xxx' environment variable: no such flag<br>
> -STORK_AGENT_HOST<br>
><br>
> But the env file should be correct.<br>
> When I just restart the service the client will be listed as<br>
> unauthorized (and I can authorized the client manually)<br>
><br>
> Here is the contents of the agent.env<br>
><br>
> cat /etc/stork/agent.env<br>
> ### the IP or hostname to listen on for incoming Stork server connections<br>
> STORK_AGENT_HOST=xxx.xxx.xxx<br>
><br>
> ### the TCP port to listen on for incoming Stork server connections<br>
> STORK_AGENT_PORT=8090<br>
><br>
> ### listen for commands from the Stork server only, but not for<br>
> Prometheus requests<br>
> STORK_AGENT_LISTEN_STORK_ONLY=true<br>
><br>
> ### Stork Server URL used by the agent to send REST commands to the<br>
> server during agent registration<br>
> STORK_AGENT_SERVER_URL=https://yyy.yyy.yyy:8080/<br>
> STORK_AGENT_SERVER_TOKEN=qwertyuiop123456<br>
><br>
> ### skip TLS certificate verification when the Stork Agent connects<br>
> ### to Kea over TLS and Kea uses self-signed certificates<br>
> STORK_AGENT_SKIP_TLS_CERT_VERIFICATION=true<br>
><br>
><br>
> ### Logging parameters<br>
><br>
> ### Set logging level. Supported values are: DEBUG, INFO, WARN, ERROR<br>
> STORK_LOG_LEVEL=INFO<br>
><br>
> ### disable output colorization<br>
> # CLICOLOR=false<br>
><br>
> ### path to the hook directory<br>
> # STORK_AGENT_HOOK_DIRECTORY=<br>
><br>
><br>
><br>
> So am I missing something or doing it wrong?<br>
><br>
> Any help is apreciated<br>
><br>
> Regards,<br>
><br>
><br>
><br>
><br>
> ------------------------------------------------------------------------<br>
> *Van:* Slawek Figiel <slawek@isc.org><br>
> *Verzonden:* maandag 11 september 2023 16:04<br>
> *Aan:* DDFR | Ronald Blaas <ronald.blaas@ddfr.nl>;<br>
> stork-users@lists.isc.org <stork-users@lists.isc.org><br>
> *Onderwerp:* Re: [stork-users] What does stork-install-agent.sh do?<br>
> Sure. Please check these references:<br>
><br>
> -<br>
> <a href="https://stork.readthedocs.io/en/latest/install.html#installation-from-cloudsmith-and-registration-with-a-server-token" id="OWA2a6b1303-8af2-0250-a522-cf02417d6e0b" class="OWAAutoLink" data-auth="NotApplicable">
https://stork.readthedocs.io/en/latest/install.html#installation-from-cloudsmith-and-registration-with-a-server-token</a> <<a href="https://stork.readthedocs.io/en/latest/install.html#installation-from-cloudsmith-and-registration-with-a-server-token" id="OWAd0975906-05e5-2020-aea4-c1c667e9338f" class="OWAAutoLink" data-auth="NotApplicable">https://stork.readthedocs.io/en/latest/install.html#installation-from-cloudsmith-and-registration-with-a-server-token</a>><br>
> - <a href="https://stork.readthedocs.io/en/latest/man/stork-agent.8.html" id="OWAeee8e317-be3f-0a96-5e5e-c2edacd295bd" class="OWAAutoLink" data-auth="NotApplicable">
https://stork.readthedocs.io/en/latest/man/stork-agent.8.html</a><br>
> <<a href="https://stork.readthedocs.io/en/latest/man/stork-agent.8.html" id="OWAf9263f63-f669-3944-4b36-6941e2cdba88" class="OWAAutoLink" data-auth="NotApplicable">https://stork.readthedocs.io/en/latest/man/stork-agent.8.html</a>><br>
> - stork-agent register --help<br>
><br>
> In short:<br>
><br>
> 1. Running the register command without argument will prompt<br>
> interactively for server token<br>
><br>
> stork-agent register --server-url=...<br>
><br>
> 2. Running the register command with server token argument will<br>
> authorize agent on server right away:<br>
><br>
> stork-agent register --server-url=... --server-token=...<br>
><br>
> 3. The server token may also be provided in the STORK_AGENT_SERVER_TOKEN<br>
> environment variable. In this case, the server token will be used during<br>
> the register command call or the initial run if the registration has not<br>
> been performed yet.<br>
><br>
> On 11/09/2023 15:47, DDFR | Ronald Blaas wrote:<br>
>> is there a syntax available ?<br>
>><br>
>> Would love to see that 🙂<br>
>><br>
>><br>
>><br>
>> ------------------------------------------------------------------------<br>
>> *Van:* Slawek Figiel <slawek@isc.org><br>
>> *Verzonden:* maandag 11 september 2023 15:35<br>
>> *Aan:* DDFR | Ronald Blaas <ronald.blaas@ddfr.nl><br>
>> *Onderwerp:* Re: [stork-users] What does stork-install-agent.sh do?<br>
>> If you want to register an agent without manually authorizing it, you<br>
>> can pass the server token to the register command. The agent will be<br>
>> authorized on the server right away.<br>
>><br>
>> Regards,<br>
>> Slawek<br>
>><br>
>> On 11/09/2023 15:28, DDFR | Ronald Blaas wrote:<br>
>>> a yes, i see.<br>
>>><br>
>>> So the script will not authorized the agent in the server.<br>
>>> This is still a manual task i guess.<br>
>>><br>
>>> We install the agent via the repository so no need for a script in that<br>
>>> part.<br>
>>> Config can be handy 🙂<br>
>>><br>
>>> Regards,<br>
>>><br>
>>> *Van:* Stork-users <stork-users-bounces@lists.isc.org> namens Slawek<br>
>>> Figiel <slawek@isc.org><br>
>>> *Verzonden:* maandag 11 september 2023 15:22<br>
>>> *Aan:* stork-users@lists.isc.org <stork-users@lists.isc.org><br>
>>> *Onderwerp:* Re: [stork-users] What does stork-install-agent.sh do?<br>
>>> Hello Ronald!<br>
>>><br>
>>> The script is available if you provide the Stork agent binary packages<br>
>>> in the /assets/pkgs directory in your WWW root (by default:<br>
>>> /usr/share/stork/www , so the full path is:<br>
>>> /usr/share/stork/www/assets/pkgs).<br>
>>><br>
>>> The script should be executed on the machine where you want to install<br>
>>> the Stork agent.<br>
>>><br>
>>> It downloads and installs the binary package appropriate for a given<br>
>>> operating system. Next, it uses systemctl to set up Stork agent as a<br>
>>> daemon. After that, it registers a new Stork agent in the Stork server.<br>
>>><br>
>>> The script is generated from the template available in the<br>
>>> backend/server/restservice/middleware.go:151 file:<br>
>>> <a href="https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151" id="OWA57b38363-c9b4-c25f-56ce-5bf9e9451990" class="OWAAutoLink" data-auth="NotApplicable">
https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151</a> <<a href="https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151" id="OWAf7d0917f-1653-e6a9-3833-c80540ec60f6" class="OWAAutoLink" data-auth="NotApplicable">https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151</a>> <https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151
<<a href="https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151" id="OWAfeb14b08-9a16-1c37-27c4-24c02a817b07" class="OWAAutoLink" data-auth="NotApplicable">https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151</a>>>
<https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151 <https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151 <<a href="https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151" id="OWAc711e3c4-b7d9-5ed0-c451-bcd066cf9baf" class="OWAAutoLink" data-auth="NotApplicable">https://gitlab.isc.org/isc-projects/stork/-/blob/master/backend/server/restservice/middleware.go#L151</a>>>><br>
>>><br>
>>> Best regards<br>
>>> Slawek<br>
>>><br>
>>><br>
>>> On 11/09/2023 15:07, DDFR | Ronald Blaas wrote:<br>
>>>> So I know there is an issue/bug with this script not being available but<br>
>>>> what does this script do?<br>
>>>><br>
>>>> I wonder if I can use this script to auto add an agent to stork.<br>
>>>><br>
>>>> Would anyone care to share the contents of the script ?<br>
>>>><br>
>>>> Regards,<br>
>>>><br>
>>>> Ronald<br>
>>>><br>
>>> --<br>
>>> Stork-users mailing list<br>
>>> Stork-users@lists.isc.org<br>
>>> <a href="https://lists.isc.org/mailman/listinfo/stork-users" id="OWAf1bfed45-c591-0a59-c94b-29b3fdace811" class="OWAAutoLink" data-auth="NotApplicable">
https://lists.isc.org/mailman/listinfo/stork-users</a><br>
> <<a href="https://lists.isc.org/mailman/listinfo/stork-users" id="OWA3f0f16c8-1cf4-7169-cd7d-cd926c328cd9" class="OWAAutoLink" data-auth="NotApplicable">https://lists.isc.org/mailman/listinfo/stork-users</a>><br>
>> <https://lists.isc.org/mailman/listinfo/stork-users<br>
> <<a href="https://lists.isc.org/mailman/listinfo/stork-users" id="OWA318873ce-a630-6709-9c3e-bb1377bdc7ae" class="OWAAutoLink" data-auth="NotApplicable">https://lists.isc.org/mailman/listinfo/stork-users</a>>><br>
>>> <https://lists.isc.org/mailman/listinfo/stork-users<br>
>> <https://lists.isc.org/mailman/listinfo/stork-users<br>
> <<a href="https://lists.isc.org/mailman/listinfo/stork-users" id="OWA90ecdaf6-68ce-d86c-bfb6-92165626a737" class="OWAAutoLink" data-auth="NotApplicable">https://lists.isc.org/mailman/listinfo/stork-users</a>>>></span></div>
</body>
</html>