6/20/2023 0 Comments Teamcity awsgo to the Administration page, and click the upper right link “Install agents”. Now, instead of installing teamcity, browse using the browser to the teamcity homepage (from within the remote machine). downloading VS 2010 from MSDN (2 GB took less than 10 min!) On that machine, I installed what I needed (VS 2010, PostSharp etc.). ![]() I selected Instance type – Hihg-CPU medium machine, that is much faster. Repeat steps 1-9, but this time, make sure you select a machine that fits what an agent might do. You should now have a working instance of teamcity. Allocate and set one through the”Elastic IP” link on the EC2 dashboard. I also set an elastic IP for the machine: so I always have the same IP for the machine instance.if you can’t see it, add it or you won’t be able to browse to the machine’s teamcity server home page. Also make sure you can see “HTTP” tcp 80 in that list. source ip is 0.0.0.0/0 (every ip is allowed). To add a rule, click on the empty list under the ‘protocol’ header. Now configure the security group (TC) to enable talking to agents: IN the EC2 dashboard click on “Security Groups” and select your group.I also enabled ports 9090 since I will use this machine to create an agent image later as well. Once you do that, you should be able to see the machine from the outside. To be able to see TeamCity from the outside, you will need to open the advanced firewall settings inside the remote machine, and add incoming and outgoing rules for port 80 (HTTP).I first downloaded chrome and using chrome I downloaded TeamCity. Once you’re inside the instance – you’ll need to open IE (it is in hardened mode so you’ll have to relax its security settings to download stuff).It’s address is a dns address shown below the list under “Public DNS”. Once you have the password, you will remote desktop (start-run-‘mstsc’) into the instance.You might have to wait about 10 minutes or so for the password to be generated for you. To do that, we’ll get the admin password for that instance: Check it on the list, and click “Instance Actions” - “Get Windows Admin Password”. To do that, you’ll need to Remote desktop into that instance. Now, you need to install stuff on that instance (TeamCity!).Now you’ll be able to see the new instance in the running instances list on your site. Click continue, review and then click “Launch”.each group is a bunch of settings on which ports can be let through into and out of a hosted machine. Now you’ll be prompted to create a security group.If you don’t have a key pair, you will be prompted to create one.No need to enable monitoring for now (you can do that later). Select the default kernel, RAM disk and all.We want to “Launch instances” so click continue.You might want to choose a close availability zone based on where you are. ![]() In the instance details, I used the default (Small instance, 1.7 GB mem).From the “Quick Start” tab I selected from the list: “ Getting Started on Microsoft Windows Server 2008 (AMI Id: ami-c5e40dac)”.Open the EC2 dashboard, and click “Launch Instance”.Create an account on amazon EC2 (BTW, amazon’s sites works better in IE than it does in chrome.The first step was setting up the teamcity server. ![]() I also setup TeamCity to automatically instantiate agents on EC2 and shut them down based upon availability of free agents. I set up a server running TeamCity, and an image of a server that just runs a TeamCity agent. The checkout directory is configured in the Checkout Settings section on the Version Control Settings page the default Auto (recommended) value is strongly advised, but it is also possible to configure a custom checkout directory.I’ve been having fun playing with the amazon EC2 cloud service. The files are pulled into the build checkout directory. What location are the repo files pulled into on the agent? I have the repo connected via Version Control Settings already. I will need to access the setup.py from my repository and then upload the the generated files. For example, you could have a build configuration or build step to produce a docker image with python installed, then use the Docker Wrapper with this image in your command line step to run your python script. This would save you from having to rebuild and administer the agent every time. If you go this far down the rabbit hole, you may also want to explore using the Docker Wrapper to run your commands within a specific docker image while the agent runs on the docker host or in another container with 'docker-in-docker'. Then you could add an extra build configuration to automate it using the Docker Runner to build the image with the dockerfile. It may be easier to use a dockerfile to make your image so you don't have to rebuild it by hand every time. Well, you would need to do it anytime you wish to update the base image or make any changes to the environment. Will I have to do this every time I update to the latest team city docker version?
0 Comments
Leave a Reply. |