gocd / go-cookbook

Cookbook that installs and configures the open-source ThoughtWorks Studios GoCD product
http://www.gocd.org/
Apache License 2.0
44 stars 66 forks source link

Issue with apt repository + binary.com #57

Closed mjuszczak closed 8 years ago

mjuszczak commented 9 years ago

It seems that a recent 301 redirect for the debian repository broke the server package installation. Ended up having to resolve with something like this to force the bintray.com URL. Anyone else experiencing this? If so, I can resolve and open a PR.

chef_gem 'chef-rewind'
require 'chef/rewind'

rewind 'apt_repository[thoughtworks]' do
  uri 'http://dl.bintray.com/gocd/gocd-deb/'
  key 'https://bintray.com/user/downloadSubjectPublicKey?username=gocd'
  only_if { node['platform_family'] == 'debian' }
end
tomzo commented 9 years ago

@mjuszczak which cookbook version are you using?

I have rerun kitchen tests few hours ago and none of them failed.

mjuszczak commented 9 years ago

@tomzo I'm trying again now, but you're not testing off of master. I'm forcing master via:

cookbook 'go', github: 'gocd-contrib/go-cookbook', ref: '84eb2d00948eee581e55a44421929329e61d2157'

in my Berksfile. Keep getting:

   "Err http://download.go.cd  Packages
         server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
   Ign http://download.go.cd  Translation-en
       STDERR: W: Failed to fetch http://download.go.cd/gocd-deb/Packages  server certificate verification failed. CAfile: /etc/ssl/certs/ca-certificates.crt CRLfile: none
   E: Some index files failed to download. They have been ignored, or old ones used instead."
mjuszczak commented 9 years ago

Per the go docs:

http://www.go.cd/documentation/user/current/installation/install/agent/linux.html#debian-based-distributions-ie-ubuntu

versus what's in the code now:

https://github.com/gocd-contrib/go-cookbook/blob/master/recipes/server_linux.rb#L5-L8

tomzo commented 9 years ago

I'd really would not want to work on old master anymore. I suggest you switch to the one where tests passed.

If you insist on staying with old cookbook then you could try with

  apt_repository 'thoughtworks' do
    uri 'http://dl.bintray.com/gocd/gocd-deb/'
    keyserver "pgp.mit.edu"
    key "0x9149B0A6173454C7"
    components ['/']
  end

I have created a branch with this applied but did not test yet. You could try it - https://github.com/gocd-contrib/go-cookbook/tree/57-fixapt

mjuszczak commented 9 years ago

Ah, I wasn't aware that master wasn't actively maintained. Where is the actively maintained branch? Don't insist on staying with the old cookbook, but the chef rewind is working for now.

tomzo commented 9 years ago

I have merged all we did so far and pushed just now to https://github.com/gocd-contrib/go-cookbook/tree/develop

When you make PRs I'll merge these to develop branch first. I do not plan to touch master until cookbook is in sensible state again.

I'd appreciate if you checked if you have this apt problem when running from develop branch.

mjuszczak commented 9 years ago

OK, I'll take a peek soon. Thanks!

tomzo commented 8 years ago

@mjuszczak I think this is solved. Let me know if it is not.