Problem with non-interactive install

I am trying to deploy automatically buddy on a GCE instance. This VM has port 22 already in use so the command “buddy --yes install” fails because of this.
Is there a way to tell buddy to install using a different port? Actually, is there a way to provide a configuration file or similar with the basic stuff like ports, IP, etc.?

Hi Jose,
Unfortunately, it’s not possible to do that during the installation – you’d have to change the SSH port. At the moment you can change configuration after Buddy has been installed.

I will add your request to the backlog. We will implement it if more users ask for it.

Cheers
Alex

This is indeed unfortunate because it may completely prevent us from using your product in our current architecture.
I will think about the options we have.
Thanks for the quick turnaround.

So, I came with a script that works, although if far from ideal. In case someone can find it useful in the future. This is specific for CentOS which does not include /usr/local/bin in the sudoers secure_path variable by default.
Note the variable buddy_git_ssh_port which must be defined previously with a suitable value that does not collide with the port 22 of SSH.

echo "Defaults    secure_path = /sbin:/bin:/usr/sbin:/usr/bin:/usr/local/bin" > /etc/sudoers.d/buddy_path
ls -l /etc/sudoers.d/buddy_path
systemctl stop sshd
curl -sSL https://get.buddy.works | sh && sudo buddy --yes install
buddy stop
buddy set ipsandports --portssh ${buddy_git_ssh_port}
buddy start
systemctl start sshd

HI Jose,

We’re happy to hear that you have managed to solve this. On our end, we will consider adding a SSH port selection during the installation.

Thanks Jarek.
IMHO it is naïve to believe that port 22 will be available in general, although I am not a systems engineer so I may be doing something wrong.
Good to hear that you listen to your potential users.
Cheers.