update base code
balexandre opened this issue · 5 comments
Is there an easy way to keep the base code updated with Kong versions?
for example, as today, 0.12.1 is the latest version, but upon auto-deploy to Heroku, we're installing 0.11...
just wonder if I can easily update to 12.1 and get all the latest changes...
thinking about going into production with this and want to know if it will be an easy task to upgrade once Kong has it's own updates.
The Kong buildpack compiles from source on Github. Updating may be as simple as setting the KONG_GIT_COMMITISH
configure var to 0.12.1
, a release tag.
If you test this successfully & report back, I’d be happy to update the default.
@mars thank you for the reply, I really don't mind to test (its a good tutorial on how to do it and I can easily do a PR with all the needed steps) but I think I'm way over my head on the task :(
so I've added the env var to Heroku
went to bash
to try build the project again but I have some doubts and I don't want to screw things up yet
-
as I already have a postgrees db will this re-create a new database?
I saw that I already have a./config/kong.conf
where the database is already specified I can only assume that as I have akong.conf
file it will not override it. -
what is the right command to re-build the code?
I saw there's some scripts inside./bin
but checking them all I was not sure if any will do the trick ...
Thanks.
Setting config vars does not automatically rebuild. It only triggers a new release. To force a rebuild, you'll need to work from a local git repo.
If you used the Deploy to Heroku button for this app, first clone it to your computer and connect it to your Kong Heroku app's git remote:
git clone https://github.com/heroku/heroku-kong
cd heroku-kong
heroku git:remote --app YOUR_KONG_APP_NAME
Then, force a rebuild:
git commit --allow-empty -m 'Rebuild for config var change'
git push heroku master
🚨 I just found that upgrading to 0.12 includes breaking changes, so follow the upgrade steps documented in Kong's repo: database migrations and Nginx config (if you implemented a custom config).
You could also deploy a fresh Kong app with that KONG_GIT_COMMITISH=0.12.1
to verify that it works before trying to migrate a pre-existing app.
I'm happy to continue to answer questions, but don't have the bandwidth to try this myself. Please let me know how it goes. Since there are migration steps, I'm not sure how best to handle upgrading this repo for folks with pre-existing deployments. I'll try to carve out some time for this in the next few weeks.
I've created a PR for Kong 0.14.0.
Feel free to try it out and please give feedback on the PR.
This app now deploys Kong 0.14.1 from master!