Skip to content

Commit

Permalink
Update rex pull mode based on yggdrasil version
Browse files Browse the repository at this point in the history
  • Loading branch information
asteflova committed Dec 10, 2024
1 parent e5f1b86 commit 08badbd
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,13 @@ Hosts do not require an SSH connection from their {SmartProxyServer}.
* The {SmartProxy} through which the host is registered is configured to use `pull-mqtt` mode.
For more information, see {InstallingSmartProxyDocURL}configuring-remote-execution-for-pull-client_{smart-proxy-context}[Configuring pull-based transport for remote execution] in _{InstallingSmartProxyDocTitle}_.
include::snip_prerequisite-project-client-repository-enabled.adoc[]
ifdef::foreman-el[]
* The AppStream repository is available for the host.
endif::[]
ifndef::foreman-el[]
* The AppStream repository for the operating system version of the host is synchronized on {ProjectServer}, available in the content view and the lifecycle environment of the host, and enabled for the host.
For more information, see {ContentManagementDocURL}Changing_the_Repository_Sets_Status_for-a-Host-in_{project-context}_content-management[Changing the repository sets status for a host in {Project}] in _{ContentManagementDocTitle}_.
endif::[]
* The host can communicate with its {SmartProxy} over MQTT using port `1883`.
* The host can communicate with its {SmartProxy} over HTTPS.

Expand Down Expand Up @@ -47,13 +54,43 @@ ifdef::client-content-zypper[]
----
endif::[]

+
The package installs `foreman_ygg_worker` and `yggdrasil` as dependencies, configures the `yggdrasil` client, and starts the pull client worker on the host.

.Verification
* Check the status of the `yggdrasild` service:
. Determine which version of the `yggdrasil` package is installed on the host:
+
ifdef::satellite[]
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
$ rpm --query yggdrasil
----
endif::[]
ifndef::satellite[]
* On {EL} and {SLES} hosts:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
$ rpm --query yggdrasil
----
endif::[]
ifdef::client-content-apt[]
* On {DL} hosts:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
$ dpkg-query --show yggdrasil-mqtt
----
endif::[]
. Check the status of the Yggdrasil services:
* If your host has `yggdrasil` version 0.4.z or later installed:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# systemctl status yggdrasil com.redhat.Yggdrasil1.Worker1.foreman
----
* If your host has `yggdrasil` version 0.2.z or earlier installed:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# systemctl status yggdrasild
----

If the services are running, you have successfully configured the host to use the pull client.
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,50 @@

By default, {Project} uses the `/run` directory on hosts for remote execution jobs in pull mode.
If the `/run` directory on your host is mounted with the `noexec` flag, {Project} cannot execute remote execution job scripts in this directory.
You can use the `yggdrasild` service to set an alternative directory for executing remote execution jobs in pull mode.
You can use the Yggdrasil service to set an alternative directory for executing remote execution jobs in pull mode.

.Prerequisite
* Determine which version of the `yggdrasil` package is installed on the host:
ifdef::satellite[]
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
$ rpm --query yggdrasil
----
endif::[]
ifndef::satellite[]
** On {EL} and {SLES} hosts:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
$ rpm --query yggdrasil
----
endif::[]
ifdef::client-content-apt[]
** On {DL} hosts:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
$ dpkg-query --show yggdrasil-mqtt
----
endif::[]

.Procedure
On your host, perform these steps:

. Create a new directory:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# mkdir _/My_Remote_Working_Directory_
----
. Access the `yggdrasild` service configuration:
. Access the Yggdrasil service configuration:
* If your host has `yggdrasil` version 0.4.z or later installed:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# systemctl edit com.redhat.Yggdrasil1.Worker1.foreman
----
* If your host has `yggdrasil` version 0.2.z or earlier installed:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
Expand All @@ -26,7 +58,14 @@ On your host, perform these steps:
----
Environment=FOREMAN_YGG_WORKER_WORKDIR=_/My_Remote_Working_Directory_
----
. Restart the `yggdrasild` service:
. Restart the Yggdrasil services:
* If your host has `yggdrasil` version 0.4.z or later installed:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
# systemctl restart yggdrasil com.redhat.Yggdrasil1.Worker1.foreman
----
* If your host has `yggdrasil` version 0.2.z or earlier installed:
+
[options="nowrap", subs="+quotes,verbatim,attributes"]
----
Expand Down

0 comments on commit 08badbd

Please sign in to comment.