Octopus Client Machine Discovery

Hi,

I have a machine that is configured as a listening tentacle and it can be connected by machine discovery fine, however, the Octopus server sits behind a proxy and as such in Octopus we have to select the appropriate proxy.

I’m currently attempting to add a deployment target to an environment via the Octopus Client and all works well if the proxy isn’t required. I can’t find an obvious way to do the Octopus Client equivalent of ticking the ‘Use a proxy’ option.

Without the proxy simply using:

_repository.Machines.Discover(“host”, 12345);

works, I thought there may have been an overload for Discover that accepts a ProxyResource but I can’t find anything.

Could you please advise how I might achieve this?

We’re using Octopus 3.13.3 (looking to upgrade very soon though!).

Thanks in advance,
Tyler.

Hi Tyler,

Thank you for getting in touch. If you are using the synchronous client, the OctopusServerEndpoint type has a Proxy property that takes an implementation of IWebProxy. For some reason .NET doesn’t include a default implementation, so you will have to write your own (example)

If you are using the AsyncClient, the OctopusAsyncClient.Create method takes an options object that contains the proxy details.

Rob W

Hi Robert,

I ran across this issue as well, and I think there’s a misunderstanding about what Tyler is asking for (assuming I understand it correctly).
I’ve opened the following issue with the Octopus Client to point out what needs to be done to allow for discovery via a proxy between Octopus and a listening tentacle.

Also, I’ve included a workaround in the issue as well, so Tyler maybe that will work for you until the update is made to the Octopus Client.

Thanks,
Andrew

Thanks both - I was meant to be come back and respond sooner. Andrew, that’s exactly what I was after, that’s got me round the issue.

Thanks loads.

Regards,
Tyler.

Ah I understand now, thanks. I’ve added PR and will merge and release once it’s reviewed

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.