(some of them are to be automated using hocho)
-
Add the ssh configuration to
~/.ssh/config
for your machine as follows. TheHost <ip address>
is used as an argument of thehocho apply
later.Host debian.rubyci.org User=<user> IdentityFile <path to key>
-
Install
which
,curl
,git
andrsync
commands in the target VM server. -
Add the
NOPASSWD
option to/etc/sudoers
for your logined user in the target VM server.
You should enable CodeReady Linux Builder repository.
sudo yum-config-manager --enable codeready-builder-for-rhel-9-rhui-rpms
You can confirm these repos with the following command.
sudo yum repolist --all
(to be automated using hocho)
pkg install sudo # then add NOPASSWD with visudo
pkg install bash
(to be automated using hocho)
doas pkg_add rsync
doas pkg_add bash
doas pkg_add sudo # then add NOPASSWD to /etc/sudoers
# Try adding `package 'eix'` before all other `package` next time
sudo emerge eix
sudo eix-update # to be automated too
The specified domain is equivalent with the Host <ip address>
in the ~/.ssh/config
.
# check if you can login
bash -cx "ssh debian.rubyci.org echo OK"
# dry-run
bin/hocho apply -n debian.rubyci.org
# apply
bin/hocho apply debian.rubyci.org
# check if you can login
for i in $(bin/hosts); do bash -cx "ssh ${i} echo OK"; done
# dry-run
for i in $(bin/hosts); do bundle exec hocho apply -n "${i}"; done
# apply
for i in $(bin/hosts); do bundle exec hocho apply "${i}"; done