Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
Skier
Apr 24, 2003

Fuck yeah.
Fan of Britches

Dietrich posted:

Ok so I'm trying to set up a TeamCity build agent for tackling Go. What am I getting myself into here? Go wants a GOPATH "work space" environment variable, but the build agent is going to be checking out everything into a workdir which won't have the requisite folder structure. Should I be scripting a move of all the sourcecode to the work space (after clearing it), triggering the build and the tests, and then pulling the resulting bin back to become an artifact?

As wwb states you'll likely have to set the environment variables for go in a step before compiling. I've used a shell script that sets the Go workspace to the directory the Teamcity agent is running in, using the variables provided by Teamcity, then running go get and then go build.

Things get easier when you vendor your dependencies: not running go get means it doesn't grab the latest from whatever your deps are. We used godeps for this (https://github.com/tools/godep) but there's some experimental versioning tooling built into the latest versions of go. Also gb (http://getgb.io/) is an option but I've no experience with that. Once things are vendored I think you can just run godep go build, possibly without needing the environment variable setting the go workspace.

Then you can save the build artifacts easily.

It's been a year since I last worked with TC and Go so details may be a bit off.

Adbot
ADBOT LOVES YOU

Skier
Apr 24, 2003

Fuck yeah.
Fan of Britches

Erwin posted:

Does anybody have any strong opinions on Thoughtworks' Go? I was initially planning to move from Hudson to Jenkins (we went with Hudson back when it wasn't overshadowed by Jenkins), but I set up a test GoCD server and agents and I'm liking it so far. The thing I really dig is the pipeline visualizations, as we have dozens of separate repos in several different languages that all interact with each other, and in Hudson we do have some chaining set up, but not like it should be.

The concern I have with GoCD is that the community doesn't seem huge (one of the factors I take into account when choosing products, because of our team size, is whether the product's community is large enough - in other words, if I have a problem, is there someone out there that has already solved it?). I'm also not sure if it's grown much since they open-sourced it, or if it'll just wither and I'll be migrating again in a year.

I've seen companies looking at GoCD and ended up with Jenkins + a pipeline plugin due to the big question mark around GoCD's future. Not that Jenkins is superb, but it worked after tweaking and experimenting. Much better community around it.

If Jenkins 2.0 gets traction it'd probably be the best solution.

Skier
Apr 24, 2003

Fuck yeah.
Fan of Britches
As far as I know, Terraform wants to own all state of resources which prevents using it with Cloudformation templates.

Troposphere ( https://github.com/cloudtools/troposphere ) works well enough for making Cloudformation templates from Python code instead of hand-coding Cloudformation. The past few jobs we've checked in the Troposphere code to do infra as code.

A few years ago I've used Route53 CNAMEs to do slow deploys. New stack comes up with a CNAME matching the existing one (fooservice.whatever.io). The old service has a weight of 100, new service has 0. Adjust the weights to the new stack and eventually remove the old service version's Cloudformation stack.

This is a bit of an old way of doing things, but would work well for blue/green deploys. AWS CodeDeploy has rolling deploys and ECS does as well. I think CodeDeploy has more nuanced options available for deploys. This video from reinvent 2015 has good info: https://www.youtube.com/watch?v=A4NSyUbAEkw .

Skier
Apr 24, 2003

Fuck yeah.
Fan of Britches

fletcher posted:

I've got my Jenkinsfile going now and building AMIs on every commit. Next step is to run the terraform apply at certain times of the day to actually deploy the new AMIs to a test environment. What's the right approach for doing that? I had done something kinda similar previously with the Copy Artifact Plugin.

The AWS process is usually making a new launch configuration that specifies the new AMI and updating the autoscaling group to use the new launch config. So whatever terraform calls those is probably what you're looking for.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply