hashicorp / vault-service-broker

The official HashiCorp Vault broker integration to the Open Service Broker API. This service broker provides support for secure secret storage and encryption-as-a-service to HashiCorp Vault.
https://www.vaultproject.io/
Mozilla Public License 2.0
84 stars 38 forks source link

GO Buildpack Issue - Staging failed Bluemix CF #2

Closed gokulk04 closed 7 years ago

gokulk04 commented 7 years ago

Hi there! Im trying to deploy your vault service broker on Bluemix cloud foundry. I followed the steps shown on your github readme but, but could not get the vault-broker to start after pushing to cf.

after running cf start for the first time, I received the following error during the staging process:

Staging... -------> Buildpack version 1.7.5 file:///tmp/buildpacks/6ac565cf5df70e40a10479c1f20d4b09/dependencies/https___pivotal-buildpacks.s3.amazonaws.com_concourse-binaries_godep_godep-v62-linux-x64.tgz DEPENDENCY MISSING IN MANIFEST: go 1.7 It looks like you're trying to use go 1.7. Unfortunately, that version of go is not supported by this build pack. The versions of go supported in this buildpack are: - 1.6.1 - 1.6 - 1.5.3 - 1.4.3 If you need further help, start by reading: http://github.com/cloudfoundry/go-buildpack/releases. Failed to compile droplet Exit status 223 Destroying container Successfully destroyed container

FAILED BuildpackCompileFailed

I then changed the manifest.yml so that the GOVERSION env variable was go1.6.1 instead of go1.7. I also changed the GOVERSION variable in the Makefile to go1.6.1.

However, running the broker like this resulted in another error:

Staging... -------> Buildpack version 1.7.5 file:///tmp/buildpacks/6ac565cf5df70e40a10479c1f20d4b09/dependencies/https___pivotal-buildpacks.s3.amazonaws.com_concourse-binaries_godep_godep-v62-linux-x64.tgz -----> Installing go1.6.1... done  !     Error: Cloud Foundry does not support the govendor package manager  !     We currently only support the 'Godep' package manager for go apps  !     For support please file an issue: https://github.com/cloudfoundry/go-buildpack/issues  !      Failed to compile droplet Exit status 223 Staging failed: Exited with status 223 Destroying container Successfully destroyed container

FAILED BuildpackCompileFailed

I found someone post a similar error here: https://github.com/cloudfoundry/go-buildpack/issues/40. I followed a suggestion to push the app with an updated go build pack like so:

cf push my_app -b https://github.com/cloudfoundry/go-buildpack

This led to the following error here:

2017-02-28T14:39:16.14-0500 [API/4]      OUT Created app with guid 68055fce-cc25-47a7-a8fe-20430fdf723d 2017-02-28T14:39:18.52-0500 [API/8]      OUT Updated app with guid 68055fce-cc25-47a7-a8fe-20430fdf723d ({"route"=>"f7ca19bf-1564-403f-98a3-33fbfaf87393"}) 2017-02-28T14:39:49.23-0500 [API/9]      OUT Updated app with guid 68055fce-cc25-47a7-a8fe-20430fdf723d ({"environment_json"=>"PRIVATE DATA HIDDEN"}) 2017-02-28T14:39:57.92-0500 [API/2]      OUT Updated app with guid 68055fce-cc25-47a7-a8fe-20430fdf723d ({"environment_json"=>"PRIVATE DATA HIDDEN"}) 2017-02-28T14:40:56.72-0500 [API/1]      OUT Updated app with guid 68055fce-cc25-47a7-a8fe-20430fdf723d ({"environment_json"=>"PRIVATE DATA HIDDEN"}) 2017-02-28T14:41:18.43-0500 [API/0]      OUT Updated app with guid 68055fce-cc25-47a7-a8fe-20430fdf723d ({"environment_json"=>"PRIVATE DATA HIDDEN"}) 2017-02-28T14:41:26.52-0500 [API/5]      OUT Updated app with guid 68055fce-cc25-47a7-a8fe-20430fdf723d ({"environment_json"=>"PRIVATE DATA HIDDEN"}) 2017-02-28T14:41:45.88-0500 [API/5]      OUT Updated app with guid 68055fce-cc25-47a7-a8fe-20430fdf723d ({"state"=>"STARTED"}) 2017-02-28T14:41:46.46-0500 [STG/0]      OUT Creating container 2017-02-28T14:41:54.51-0500 [STG/0]      OUT Successfully created container 2017-02-28T14:41:54.51-0500 [STG/0]      OUT Downloading app package... 2017-02-28T14:41:54.73-0500 [STG/0]      OUT Downloaded app package (212.1K) 2017-02-28T14:41:54.73-0500 [STG/0]      OUT Staging... 2017-02-28T14:41:57.43-0500 [STG/0]      OUT -------> Buildpack version 1.7.19 2017-02-28T14:41:57.84-0500 [STG/0]      OUThttps://buildpacks.cloudfoundry.org/dependencies/godep/godep-v79-linux-x64-9e37ce0f.tgz 2017-02-28T14:41:58.49-0500 [STG/0]      OUT https://buildpacks.cloudfoundry.org/dependencies/glide/glide-v0.12.3-linux-x64-5b2e71ff.tgz 2017-02-28T14:42:29.31-0500 [STG/0]      ERR Failed to compile droplet 2017-02-28T14:42:29.32-0500 [STG/0]      OUT Exit status 223 2017-02-28T14:42:29.37-0500 [STG/0]      ERR Staging failed: Exited with status 223 2017-02-28T14:42:29.55-0500 [API/6]      ERR Failed to stage application: staging failed`

Not sure where to go from here. Any help would be appreciated!

sethvargo commented 7 years ago

Hi @gokulk04

It looks like you may be running an outdated version of CloudFoundry or the buildpack. The newest buildpack supports go 1.7. Can you try updating your buildpack? The broker requires Go 1.7+.

gokulk04 commented 7 years ago

Hi @sethvargo! Looks like i was running the updated build pack incorrectly. I got past that error, but I ran into this

  OUT broker.go:15:2: cannot find package "github.com/pkg/errors" in any of:
  2017-03-01T15:50:20.97-0500 [STG/0]      OUT        /tmp/tmp.SfWBVS7tu7/.go/src/github.com/hashicorp/cf-vault-service-      broker/vendor/github.com/pkg/errors (vendor tree)
  2017-03-01T15:50:20.97-0500 [STG/0]      OUT  /tmp/cache/go1.7.5/go/src/github.com/pkg/errors (    (from $GOROOT)
  2017-03-01T15:50:20.97-0500 [STG/0]      OUT    /tmp/tmp.SfWBVS7tu7/.go/src/github.com/pkg/errors (from $GOPATH)
  2017-03-01T15:50:20.97-0500 [STG/0]      OUT Exit status 223

In your broker.go file, you guys are importing "github.com/pkg/errors" on line 15, but that errors package is missing from your github.com folder i think. Anyways, I downloaded it from https://github.com/pkg/errors and copied it into the broker app manually and i got past the error fine. Thanks again!

sethvargo commented 7 years ago

I just pushed that up. Thanks!

trepein commented 7 years ago

I am facing the same issue -------> Buildpack version 1.7.15 file:///tmp/buildpacks/b8f79db7c026134bbd4c6fbf5ed2c184/dependencies/https_buildpacks.cloudfoundry.org_concourse-binaries_godepgodep-v75-linux-x64.tgz file:///tmp/buildpacks/b8f79db7c026134bbd4c6fbf5ed2c184/dependencies/httpsbuildpacks.cloudfoundry.org_concourse-binaries_glide_glide-v0.12.3-linux-x64.tgz -----> Installing go1.7.3... done Downloaded [file:///tmp/buildpacks/b8f79db7c026134bbd4c6fbf5ed2c184/dependencies/https___buildpacks.cloudfoundry.org_concourse-binaries_go_go1.7.3.linux-amd64.tar.gz] !! Installing package '.' (default) -----> Running: go install -v -tags cloudfoundry . broker.go:15:2: cannot find package "github.com/pkg/errors" in any of: /tmp/tmp.SLoKUz5MqV/.go/src/github.com/hashicorp/cf-vault-service-broker/vendor/github.com/pkg/errors (vendor tree) /tmp/cache/go1.7.3/go/src/github.com/pkg/errors (from $GOROOT) /tmp/tmp.SLoKUz5MqV/.go/src/github.com/pkg/errors (from $GOPATH) Failed to compile droplet Exit status 223 Staging failed: Exited with status 223 Destroying container Successfully destroyed container

FAILED BuildpackCompileFailed

armon commented 7 years ago

@trepein Looks like a package was missing from the vendor dir, should be fixed by 1ddb665

trepein commented 7 years ago

Thanks.