fedvova.blogg.se

Teamcity aws
Teamcity aws













teamcity aws
  1. #TEAMCITY AWS INSTALL#
  2. #TEAMCITY AWS FULL#
  3. #TEAMCITY AWS ZIP#

If it doesn't, you'll need to SSH into the machine and look at the agent log files to try and work out what's going wrong. Reboot the machine and after a couple of minutes it should appear on the "Unauthorized Agents" page on your TeamCity.

#TEAMCITY AWS ZIP#

The exact structure is that the "" directory should be inside the zip file:Īt this point, it's probably worth performing a simple smoke test.

teamcity aws

Zip up the contents of the "C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\MSBuild\Sdks\" directory (or wherever you have Visual Studio 2017 installed) and put this into the bucket as "".

teamcity aws

Unfortunately, as these are part of the Visual Studio distribution, I can't make them available here.

#TEAMCITY AWS INSTALL#

To work around this, you need to install a couple of files from the Visual Studio 2017 distribution onto the build agent. As of April 2017, there is currently an issue that adding Docker support to a Visual Studio 2017 project breaks the command-line build tools. This is potentially the one thing that you may need to significantly change if you're using a different Linux distribution, particularly one which uses systemd rather than SysV init.

  • buildAgent: a very slightly modified version of the script from the TeamCity documentation to start the TeamCity agent when the machine boots.
  • If you're using a Linux distribution which uses apt rather than yum, you'll need to make some minor changes to the "Install the packages we need" section.
  • On the other hand, if you don't need any certificates, you can remove the " sudo update-ca-trust extract" line.
  • If you need any SSL certificates installed on the agent (we need a couple for the TeamCity server and our local NuGet package source), upload them into the bucket and modify the appropriate lines in the "Get the necessary SSL certificates and install" section.
  • Replace both instances of " " with the DNS name of your TeamCity server.
  • Replace all instances of " /" with the appropriate details for your S3 bucket.
  • Note that you will need to customize this script for your environment:
  • make-build-agent: this is the primary script which runs to install everything needed on the agent.
  • txt extension from 'make-build-agent' and 'buildAgent' before uploading them to the S3 bucket): You'll need to upload at least three files into the bucket (note: please remove the.

    teamcity aws

  • An EC2 key pair to allow you to SSH into the build agent.Įverything the build agent needs to bootstrap itself is stored in the S3 bucket.
  • You'll also at least temporarily want to allow SSH access from your IP address - this can be removed once you've set up the machine: The best practice way to do this is to add a security group to your TeamCity server, and then create a Custom TCP rule with protocol TCP, port range 9090 and a source of the security group on your TeamCity server.
  • A security group which allows the server access to the build agent on port 9090.
  • From the AWS console, create an "AWS Service Role" of type "Amazon EC2", and attach the policy you just created to the role:
  • An IAM role to give the build agent access to the policy you just created.
  • Hopefully it's fairly obvious what that policy does, but if not it just allows access to any objects in the specified folder in the S3 bucket. We have a bucket we use for a number of devops-related bits, so created a subfolder in the bucket for the artifacts we need.Īn IAM policy which allows access to the artifacts in the S3 bucket:
  • An S3 bucket to store the artifacts needed to bootstrap the build agent.
  • You'll need to create (or reuse) a number of bits in AWS: I've tried to point out where changes may be needed.Ĭheck out Snowflake Training Online here! Creating your AWS infrastructure
  • The work we've done here uses Amazon Linux, but should be relatively easy to port to your Linux distribution of choice.
  • Hopefully everything here will also work for TeamCity 2017 - we just haven't quite upgraded our server yet.
  • A TeamCity 10.x server, configured to allow on-demand EC2 agents.
  • #TEAMCITY AWS FULL#

    An AWS account! You'll need full administrator rights or very close to them as we need to create some IAM objects.Some stuff I'm assuming you've already set up: However, actually getting everything to build in TeamCity Training wasn't quite as easy as we would have hoped due to a few minor niggles, so I've put together this blog post to capture everything that we needed to do. We always like all our projects to have continuous integration to ensure a consistent and repeatable build process - in our case, we use a TeamCity instance running in AWS for this. NET development, so we've recently been looking at the newly released Visual Studio 2017, along with .NET Core 1.1 and combining this with our ongoing use of Docker to create microservices. At Control F1, we're always evaluating the latest technologies to see if and how they'll fit with our clients needs.















    Teamcity aws