Setting up TeamCity on AWS Ec2 - amazon-ec2

I have set up a Server and a BuildAgent on Amazon Ec2. I have configured the build agent to sit in the /home/ec2-user/build-agent directory (will this cause problems due to permissions?)
I then configured the build agent to point to the server through the public dns and port 8111. I have then started the build agent.
I used the Cloud Tab on the TC Web interface to setup the Build Agent on the server. I can see on the build agent host machine that a connection with the server has been established. Yet in the web interface I can see no build agents in either the unauthorized tab or the compatible tabs.
In short I cannot connect a build agent to the server?
Any help or ideas on this one would be greatly appreciated.
many thanks
Dermot

Related

Use AWS Spot instances for build agents?

Use AWS Spot instances for build agents?
Our infra setup is in AWS but we use Azure DevOps for repo, boards & pipelines. To run automated tests like cucumber, we need private agent. if there's a way to utilize spot instances for builds instead of having to have agents always on?
or
can we have a Master slave setup, like how Jenkins has?
In the self-hosted agent configuration, we can set the agent to run as service, If you configured the agent to run as a service, it starts automatically. You can view and control the agent running status from the services snap-in.
If we configured the agent to run interactively, open org settings->Agent pools->select agent pool and click the tab Agents, we can see the agent status is Offline if we do not open the run.cmd, if we need to use the agent, we can open the agent file run.cmd to run the agent.
Please refer this link for more details: Self-hosted Windows agents

The Jenkins tunnel address which I specify in the Jenkins->Configure Cloud does not seem to work. Can someone help me with the same?

I have a kubernetes cluster running on GKE and a Jenkins server running on a GCP instance.
I am using the Kubernetes plugin to dynamically create pods on the kubernetes cluster. I created a pipeline(Declarative syntax) for the same.
So I am aware that the Jenkins slave agents communicates with the Jenkins master on port 50000.
A snip of the configuration
But for some reason when I viewed the logs for the JNLP container creates by Jenkins, I received an exception - tcpSlaveAgentListener not found.
A snip of the container log
According to the above image, I assume the tunneling is unsuccessful as it is trying to connect to http://34.90.46.204:8080/tcpSlaveAgentListener/ whereas it should connect to http://34.90.46.204:50000/tcpSlaveAgentListener/.
It was a lazy question for me to ask, but I solved the issue.
In the Manage Jenkins-> Configure Global Security settings:
For the option on setting a port for TCP inbound agents: unselect the disable option which is selected by default and then provide a port for the inbound agents to interact on (50000).
A snip of the configuration
Jenkins uses a TCP port to communicate with agents connected inbound. If you're going to use inbound agents, you can allow the system to randomly select a port at launch (this avoids interfering with other programs, including other Jenkins instances). As it's hard for firewalls to secure a random port, you can instead specify a fixed port number and configure your firewall accordingly.
Hope this helps someone.

cloudfoundry NoHostAvailableException while deploying app

I have deplyed my local cloudfoundry instance. When I try to deploy my application , my app requires cassandra to be up and running. I have cassandra host setup on independant server. Cloud foundry throws com.datastax.driver.core.exceptions.NoHostAvailableException
Whereas when I try to ping this host from the machine on which CF is installed , Ping is successful. Even this cassandra host is accessible from my local computer and works fine with my eclipse deployment.
How can I make cloudfoundry recognize this host?
You will need to make sure that (a) your application has access to the information about the address and credentials to access the cassandra server, and that (b) networking (and maybe DNS) are such that your application instances will actually be able to reach the cassandra server.
For (a), you will want to bind your application to a "user-provided service instance". For (b), you need to make sure your application's running security groups allow it to reach your cassandra server.

VS2013 Test agent and controller not communicating

I have a Windows Azure VM running VS2013 Load Test Controller and a second Azure VM running 2013 Load Test Agent.
I have not been able to get the two communicating successfully. I added the hostname and IP of each VM to the other's HOSTS file. I also created a local admin account with the same username and password on both machines. Neither machine is joined to a domain. I have also created endpoints for each VM to port 6901/TCP. I am able to telnet from the agent VM to port 6901 on the controller VM.
When I apply the test agent configuration settings, it fails on "Test agent could not connect to the test controller." In the agent configuration log, I see:
Could not get the status from the test agent. Exception: Failed to
connect to an IPC Port: The system cannot find the file specified.
In the event viewer, I see:
Unable to connect to the controller on 'controllerVM:6901'. The agent
can connect to the controller but the controller cannot connect to the
agent because of following reason: A connection attempt failed because
the connected party did not properly respond after a period of time,
or established connection failed because connected host has failed to
respond 168.62.XX.XX:6910. Make sure that the firewall on the test
agent machine is not blocking the connection.
I have been completely unable to work around this issue so far. I need help please.
Can you Check your c:\windows\system32\drivers\etc\hosts file both agent and controler .
If there is an entry assigned to 127.0.0.1 remove that.
When you install the Agent/Controller, be sure to use the same user (Admin) Account (Run as...). This account have to be in the group TeamTestAgentService on the controller.
In addition, after setup, the wizard will try to connect agent to the test controller. What's the status ?
MSDN explains here how to install/configure the test rig in a workgroup.
There is also a complete troubleshoot guide here.

Octopus Deploy and VPN

Does anyone know if its possible to deploy to a server in a VPN using Octopus Deploy?
If the tentacle is on the server in the VPN is there a way Octopus Deploy to connect/disconnect to a VPN?
Cheers
UPDATE
We think we've found a work around by:
Installing a tentacle on the same server as our Octopus is running on, then adding a first step that executes a Powershell script to create the VPN connection.
The next step is then deploying the NuGet package to the tentacle server within the VPN.
The final step is another Powershell script executed on the same tentacle server as the first step to close the connection
Early tests seem to show this works!
Kudos to my colleague Rachel for coming up with it!
There's no way to do this at the moment short of establishing the VPN connection yourself and then triggering the Octopus deployment using Octo.exe, followed by disconnecting.
In future it would be nice to have support for opening a VPN connection within Octopus. Is your VPN session established using the Windows remote access server components (i.e., would a toolkit like http://dotras.codeplex.com/ be able to open the connection?) or is it through some custom software?
You could use Hamachi for VPN - I decided to place any servers which are targets for deployment into a Hamachi group.
It's really simple to use and probably only useful for those who are not governed by strict IT policies etc.
But probably good for most.
See https://secure.logmein.com/products/hamachi/download.aspx

Resources