Agent Push to use IP address instead of hostname

Is there a way to have TeamCIty server to use IP address instead of a host name during agent push? I've got my agents allocated in EC2, and using host names is not super practical.  I need this for Agent Push preset that I am applying to my EC2 cloud profile.

0
6 comments

When you are setting up an agent push profile it doesn't ask for a hostname (or ip address), it asks for it when you are trying to run the install and it does allow for ip addresses already. Am I missing something?

0

When TeamCity server instanciates TC instance it tries to push agent on it. TC server uses host name for connecting to the newly created EC2 instance.  I want TC server to use IP address instead of host name.   On the `Agent Push preset` dialog (screenshot below) SSH field says 'The port specified here can be overwtiten in a Host field', but I don't see Host field on this dialog.

0

When you run a basic "Agent push", not a profile, you will be displayed a "host" field. That's where you can overwrite the port defined in the profile.

0
Avatar
Permanently deleted user

Denis,

I don't believe that is what they are having a problem with. They is trying to use the cloud profiles which automatically initiate the agent push after a cloud instance is initiated. With an AWS EC2 instance this appears to be trying to use the private dns attribute rather than the private ip attribute and is causing problems. We are having the same issue. Our teamcity server is in a different vpc and it keeps trying to use the ip-10-164-9-182.ec2.internal private dns entries that it can't resolve. 

Having it be able to use the IPs instead would make it work all the time even if the dns resolution fails.

 

 

 

0

Yes, this is exactly the problem we are hitting.  Thanks John for explaining it in other words.

0

Guys, it's much better to bake buildAgent into AMI rather than use agent push. One of reasons (besides higher start time and lesser stability) is that Agent Push is a separate plugin (from Amazon EC2 plugin):

Agent Push is not aware of EC2 internals, so it has to work with the data EC2 publishes in scope of Cloud API (i.e. generic data for cloud providers). And public data contains only one field for this called NetworkIdentity that we want to be a hostname, not an IP address.

0

Please sign in to leave a comment.