Since the Katello-Agent has been deprecated. remote-execution is the recommended successor. The setup is fairly simple since a few arguments passed to the foreman-installer will set everything up automatically.
First I'm going to create a new ssh-key pair:
[archy@foreman ~]$ sudo su foreman-proxy -s /usr/bin/sh -c 'ssh-keygen -a 128 -t ecdsa -b 521 -C "foreman-proxy $(date +%F)" -f /var/lib/foreman-proxy/ssh/id_ecdsa_foreman_proxy -N "" -Z "chacha20-poly1305@openssh.com"'
Next, let's enable the remote-execution plugin and the remote-execution-ssh plugin. Also I will configure the directory where the ssh-key is stored ('/var/lib/foreman-proxy/ssh') as well as the key-name ('id_ecdsa').
[archy@foreman ~]$ sudo foreman-installer --scenario katello \
--enable-foreman-plugin-remote-execution \
--enable-foreman-proxy-plugin-remote-execution-ssh \
--foreman-proxy-plugin-remote-execution-script-generate-keys \
--foreman-proxy-plugin-remote-execution-ssh-ssh-identity-dir '/var/lib/foreman-proxy/ssh' \
--foreman-proxy-plugin-remote-execution-ssh-ssh-identity-file 'id_ecdsa_foreman_proxy'
The config might take a while to complete. Make sure to add the contents of '/var/lib/foreman-proxy/ssh/id_ecdsa' to the target user's authorized keys / keys in IPA.
Speaking of users, let's configure the remote-execution user settings in foreman. I will use the 'executor' user on the target systems:
[archy@foreman ~]$ hammer --no-use-defaults settings set --name remote_execution_ssh_user --value 'executor'
Now with foreman being configured, you should be able to launch remote-execution jobs in the webui.
Freel free to comment and / or suggest a topic.
Comments
Post a Comment