Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Click to Deploy to Heroku Button #42

Closed
tbuckl opened this issue Oct 21, 2014 · 3 comments · Fixed by #86
Closed

Add Click to Deploy to Heroku Button #42

tbuckl opened this issue Oct 21, 2014 · 3 comments · Fixed by #86

Comments

@tbuckl
Copy link
Member

tbuckl commented Oct 21, 2014

the IT department would like to deploy this way.

@techieshark
Copy link
Contributor

You can test what will happen when you click the button by going to this link:

https://dashboard-next.heroku.com/new?template=https://github.com/codeforamerica/MuniciPal/tree/feature/deploy-to-heroku-button

Unfortunately, it currently fails in the build process with an error; see output below (basically it looks like https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.1.1.tgz should exist but doesn't). If anyone sees something I don't, let me know.

-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/cyberdelia/heroku-geo-buildpack.git
=====> Detected Framework: geos/gdal/proj
      Using geos version: 3.4.1
      Using gdal version: 1.11.0
      Using proj version: 4.8.0
-----> Fetching and vendoring geos
-----> Fetching and vendoring gdal
-----> Fetching and vendoring proj
-----> Vendoring geo libraries done
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby
-----> Compiling Ruby/Rails
!
!     Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.1.1.tgz -s -o - | tar zxf - ' failed unexpectedly:
!     
!     gzip: stdin: unexpected end of file
!     tar: Child returned status 1
!     tar: Error is not recoverable: exiting now
!

!     Push rejected, failed to compile Multipack app

techieshark added a commit that referenced this issue Oct 31, 2014
- stack must be cedar for this to work (see #42).
- region is almost always going to be in the US, at least for now.
@techieshark
Copy link
Contributor

This appears to happen because the cedar-14 build pack is being used instead of cedar.

To reproduce:

git clone [email protected]:codeforamerica/MuniciPal.git
cd MuniciPal
# ... then follow deploy-to-heroku instructions in the README and note that it works... but then:
heroku stack:set cedar-14
touch .foo && git commit -m 'add empty file to force rebuilding on heroku' .foo; 
git push heroku master

And the output should something look like:

~/MuniciPal(master)$ git push heroku master
Fetching repository, done.
Counting objects: 3, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (3/3), done.
Writing objects: 100% (3/3), 298 bytes | 0 bytes/s, done.
Total 3 (delta 2), reused 0 (delta 0)

-----> Fetching custom git buildpack... done
-----> Multipack app detected
=====> Downloading Buildpack: https://github.com/cyberdelia/heroku-geo-buildpack.git
=====> Detected Framework: geos/gdal/proj
       Using geos version: 3.4.1
       Using gdal version: 1.11.0
       Using proj version: 4.8.0
-----> Vendoring geo libraries done
=====> Downloading Buildpack: https://github.com/heroku/heroku-buildpack-ruby.git
=====> Detected Framework: Ruby
-----> Compiling Ruby/Rails
 !
 !     Command: 'set -o pipefail; curl --fail --retry 3 --retry-delay 1 --connect-timeout 3 --max-time 30 https://s3-external-1.amazonaws.com/heroku-buildpack-ruby/cedar-14/ruby-2.1.1.tgz -s -o - | tar zxf - ' failed unexpectedly:
 !     
 !     gzip: stdin: unexpected end of file
 !     tar: Child returned status 1
 !     tar: Error is not recoverable: exiting now
 !

 !     Push rejected, failed to compile Multipack app

To [email protected]:mesamunicipal.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:mesamunicipal.git'

@techieshark
Copy link
Contributor

Switching to Ruby 2.1.2 helps (thanks, Heroku support!).

Commit:
cfbd9b6

Potentially related docs:
https://devcenter.heroku.com/articles/cedar-14-migration

Message from Heroku support:

I would recommend upgrading to Cedar-14. The build fails as Ruby 2.1.1 is now available [sic? I think that is 'unavailable' -PW] on Cedar-14, so you only need to upgrade to 2.1.2 for it to work. Can you try that?

And it works!

image

... wait for it...
... wait for it...
... wait for it...
(No seriously, you'll have to wait for it for a while, since the deployment includes the process of pulling in all the needed Legistar data over that API and it's not the quickest thing; plan on as much as 15 minutes for that.)

But then, BAM! Success:

image

techieshark added a commit that referenced this issue Oct 31, 2014
- stack must be cedar for this to work (see #42).
- region is almost always going to be in the US, at least for now.
@tbuckl tbuckl closed this as completed in #86 Nov 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants