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

initial support for Heroku deployment #85

Merged
merged 21 commits into from
Jul 14, 2020

Conversation

atomfrede
Copy link
Member

@atomfrede atomfrede commented Jun 8, 2020

This PR adds initial support for Heroku deployment of micronaut apps. It requires #84 and depends on upcoming changes in the main generator (thats why it is in draft mode).

  • Update procfile (disable deduction, use correct order)
  • Use environments constants
  • update to main generator 6.10.1
  • Make endsession endpoint provider agnostic (works with keycloak and okta)
  • Adapt heroku and okta script for micronaut

closes #82

waiting on jhipster/generator-jhipster#11919

generators/heroku/index.js Outdated Show resolved Hide resolved
@atomfrede atomfrede force-pushed the 82-support-heroku-deployment branch from e60fddb to 651faf9 Compare June 11, 2020 11:57
@atomfrede atomfrede linked an issue Jun 15, 2020 that may be closed by this pull request
@atomfrede atomfrede force-pushed the 82-support-heroku-deployment branch from b5574ee to 8f6fbe2 Compare June 18, 2020 19:26
@mraible
Copy link
Contributor

mraible commented Jun 18, 2020

@atomfrede I'd love to have this working for a blog post I hope to write when Micronaut 2.0 is released next week (and this blueprint shortly after). Do you have permission to add more labels so I can assign it a bug bounty?

@atomfrede
Copy link
Member Author

Let me check. We need to have a new main generator release for this and I would like to have jhipster/generator-jhipster#11712 merged so heroku has much more features.

@atomfrede
Copy link
Member Author

@mraible I can edit the labels. I will create our defined bounty labels here too.

@JasonTypesCodes
Copy link
Contributor

@atomfrede Is there anything I can do to help out with this PR?

@atomfrede
Copy link
Member Author

This basically waiting for the main generator release. Everything is working.

@mraible
Copy link
Contributor

mraible commented Jun 24, 2020

@pascalgrimaud Any chance of getting a new JHipster release so we can have Heroku + Okta in the main generator?

@pascalgrimaud
Copy link
Member

@mraible : just sent an email to our dev mailing list :)

@atomfrede atomfrede force-pushed the 82-support-heroku-deployment branch from 8f6fbe2 to 7d4714e Compare June 28, 2020 18:55
@atomfrede
Copy link
Member Author

atomfrede commented Jun 28, 2020

Following is tested and working:

  • mvn + jwt + git deploy ✔️
  • gradle + jwt + git deploy 🔴 (Client app not served, / gives 404, locally just working fine)
  • mvn + jwt + jar deploy ✔️
  • gradlew + jwt + jar deploy 🔴 (Client app not served, / gives 404, locally just working fine)
  • mvn + oauth + git deploy ✔️
  • mvn + oauth + jar deploy ✔️
  • gradle + oauth + git deploy 🔴
  • gradle + oauth + jar deploy 🔴

This is the route error in the logs when using gradle

2020-06-28T20:00:35.043483+00:00 heroku[router]: at=info method=GET path="/" host=mhipster-610-gradlejwtjar.herokuapp.com request_id=a01fdf18-fb48-439a-a3b7-a6ae0d4dc570 fwd="91.39.141.105" dyno=web.1 connect=1ms service=1213ms status=404 bytes=211 protocol=https

Using maven the same router logs give a 200.

Creating the logout redirect urls is done completely on the server now (making the endsession endpoint provider agnostic see #45. So we may rename it). Will do some final manual tests tomorrow. Regarding the gradle problem I still have no idea why the frontend is not delivered, but thats not preventing this to be merged.

@atomfrede
Copy link
Member Author

Good news. I have modified application working fine with okta both with login/logout and user sync. Will try to push the generator code tonight and test it again.

@atomfrede atomfrede marked this pull request as ready for review June 30, 2020 21:55
@JasonTypesCodes
Copy link
Contributor

This is great @atomfrede. There is a lot of good stuff here.

@JasonTypesCodes JasonTypesCodes linked an issue Jul 1, 2020 that may be closed by this pull request
@atomfrede
Copy link
Member Author

Regarding the gradle 404s on heroku I still have no clue. The jar works just fine locally. I will have a chat with the new heroku java language owner next week maybe he has an idea or hint how to further debug it.

@atomfrede
Copy link
Member Author

Somehow the builds are flaky on ci, but eventually all green here too. So from my side we could merge this after review (let's ignore the gradle app reachable on heroku for now).

Copy link
Contributor

@JasonTypesCodes JasonTypesCodes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't have experience with Heroku @atomfrede. If you feel good about this, I think it is alright. I was going to see if we could add CI for this, but it looks like you need an active Heroku account for it

@JasonTypesCodes
Copy link
Contributor

Somehow the builds are flaky on ci, but eventually all green here too. So from my side we could merge this after review (let's ignore the gradle app reachable on heroku for now).

If this is a known bug we should create an issue for it right away once we merge.

@atomfrede atomfrede merged commit 2d7af8b into jhipster:master Jul 14, 2020
@atomfrede atomfrede mentioned this pull request Jul 14, 2020
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💎 New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support Heroku deployment Support Okta as OIDC Refactor out Keycloak-specific EndSessionEndpoint
5 participants