Skip to content

Commit ec7ac81

Browse files
jschmid1gszr
authored andcommitted
release: 2.7.0
Signed-off-by: Joshua Schmid <[email protected]>
1 parent a658bc0 commit ec7ac81

File tree

4 files changed

+197
-9
lines changed

4 files changed

+197
-9
lines changed

CHANGELOG.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Table of Contents
22

3-
- [Unreleased](#Unreleased)
3+
- [2.7.0](#270)
44
- [2.6.0](#260)
55
- [2.5.1](#251)
66
- [2.5.0](#250)
@@ -60,13 +60,12 @@
6060
- [0.10.0](#0100---20170307)
6161
- [0.9.9 and prior](#099---20170202)
6262

63-
## [Unreleased]
63+
## [2.7.0]
6464

6565
### Dependencies
6666

6767
- Bumped `go-pdk` used in tests from v0.6.0 to v0.7.1 [#7964](https://github.com/Kong/kong/pull/7964)
6868
- Cassandra support is deprecated with 2.7 and will be fully removed with 4.0.
69-
https://konghq.com/blog/cassandra-support-deprecated
7069

7170
### Additions
7271

@@ -6635,7 +6634,7 @@ First version running with Cassandra.
66356634

66366635
[Back to TOC](#table-of-contents)
66376636

6638-
[Unreleased]: https://github.com/Kong/kong/compare/2.6.0...master
6637+
[2.7.0]: https://github.com/Kong/kong/compare/2.6.0...2.7.0
66396638
[2.6.0]: https://github.com/Kong/kong/compare/2.5.1...2.6.0
66406639
[2.5.1]: https://github.com/Kong/kong/compare/2.5.0...2.5.1
66416640
[2.5.0]: https://github.com/Kong/kong/compare/2.4.1...2.5.0

UPGRADE.md

Lines changed: 191 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,196 @@ $ kong migrations up [-c configuration_file]
2424

2525
If the command is successful, and no migration ran
2626
(no output), then you only have to
27-
[reload](https://docs.konghq.com/gateway-oss/2.6.x/cli/#kong-reload) Kong:
27+
[reload](https://docs.konghq.com/gateway-oss/2.7.x/cli/#kong-reload) Kong:
28+
29+
```shell
30+
$ kong reload [-c configuration_file]
31+
```
32+
33+
**Reminder**: `kong reload` leverages the Nginx `reload` signal that seamlessly
34+
starts new workers, which take over from old workers before those old workers
35+
are terminated. In this way, Kong will serve new requests via the new
36+
configuration, without dropping existing in-flight connections.
37+
38+
## Upgrade to `2.7.x`
39+
40+
Kong adheres to [semantic versioning](https://semver.org/), which makes a
41+
distinction between "major", "minor", and "patch" versions. The upgrade path
42+
will be different depending on which previous version from which you are migrating.
43+
44+
If you are migrating from 2.x.x, upgrading into 2.7.x is a
45+
minor upgrade, but read below for important instructions on database migration,
46+
especially for Cassandra users.
47+
48+
If you are migrating from 1.x, upgrading into 2.7.x is a major upgrade,
49+
so, in addition, be aware of any [breaking changes](https://github.com/Kong/kong/blob/master/UPGRADE.md#breaking-changes-2.0)
50+
between the 1.x and 2.x series below, further detailed in the
51+
[CHANGELOG.md](https://github.com/Kong/kong/blob/2.0.0/CHANGELOG.md#200) document.
52+
53+
54+
### Dependencies
55+
56+
If you are using the provided binary packages, all necessary dependencies
57+
for the gateway are bundled and you can skip this section.
58+
59+
If you are building your dependencies by hand, there are changes since the
60+
previous release, so you will need to rebuild them with the latest patches.
61+
62+
The required OpenResty version for kong 2.7.x is
63+
[1.19.9.1](https://openresty.org/en/changelog-1019003.html). This is more recent
64+
than the version in Kong 2.5.0 (which used `1.19.3.2`). In addition to an upgraded
65+
OpenResty, you will need the correct [OpenResty patches](https://github.com/Kong/kong-build-tools/tree/master/openresty-build-tools/openresty-patches)
66+
for this new version, including the latest release of [lua-kong-nginx-module](https://github.com/Kong/lua-kong-nginx-module).
67+
The [kong-build-tools](https://github.com/Kong/kong-build-tools)
68+
repository contains [openresty-build-tools](https://github.com/Kong/kong-build-tools/tree/master/openresty-build-tools),
69+
which allows you to more easily build OpenResty with the necessary patches and modules.
70+
71+
There is a new way to deploy Go using Plugin Servers.
72+
For more information, see [Developing Go plugins](https://docs.konghq.com/gateway-oss/2.6.x/external-plugins/#developing-go-plugins).
73+
74+
### Template changes
75+
76+
There are **Changes in the Nginx configuration file**, between kong 2.0.x,
77+
2.1.x, 2.2.x, 2.3.x, 2.4.x, 2.5.x, 2.6.x and 2.7.x
78+
79+
To view the configuration changes between versions, clone the
80+
[Kong repository](https://github.com/kong/kong) and run `git diff`
81+
on the configuration templates, using `-w` for greater readability.
82+
83+
Here's how to see the differences between previous versions and 2.7.x:
84+
85+
```
86+
git clone https://github.com/kong/kong
87+
cd kong
88+
git diff -w 2.0.0 2.7.0 kong/templates/nginx_kong*.lua
89+
```
90+
91+
**Note:** Adjust the starting version number
92+
(2.0.x, 2.1.x, 2.2.x, 2.3.x, 2.4.x, 2.5.x, 2.6.x, 2.7.x) to the version number you are currently using.
93+
94+
To produce a patch file, use the following command:
95+
96+
```
97+
git diff 2.0.0 2.7.0 kong/templates/nginx_kong*.lua > kong_config_changes.diff
98+
```
99+
100+
**Note:** Adjust the starting version number
101+
(2.0.x, 2.1.x, 2.2.x, 2.3.x, 2.4.x, 2.5.x, 2.6.x, 2.7.x) to the version number you are currently using.
102+
103+
104+
### Suggested upgrade path
105+
106+
**Version prerequisites for migrating to version 2.7.x**
107+
108+
The lowest version that Kong 2.7.x supports migrating from is 1.0.x.
109+
If you are migrating from a version lower than 0.14.1, you need to
110+
migrate to 0.14.1 first. Then, once you are migrating from 0.14.1,
111+
please migrate to 1.5.x first.
112+
113+
The steps for upgrading from 0.14.1 to 1.5.x are the same as upgrading
114+
from 0.14.1 to Kong 1.0. Please follow the steps described in the
115+
"Migration Steps from 0.14" in the
116+
117+
[Suggested Upgrade Path for Kong 1.0](https://github.com/Kong/kong/blob/master/UPGRADE.md#kong-1-0-upgrade-path)
118+
with the addition of the `kong migrations migrate-apis` command,
119+
which you can use to migrate legacy `apis` configurations.
120+
121+
Once you migrated to 1.5.x, you can follow the instructions in the section
122+
below to migrate to 2.7.x.
123+
124+
### Upgrade from `1.0.x` - `2.2.x` to `2.7.x`
125+
126+
**Postgres**
127+
128+
Kong 2.7.x supports a no-downtime migration model. This means that while the
129+
migration is ongoing, you will have two Kong clusters running, sharing the
130+
same database. (This is sometimes called the Blue/Green migration model.)
131+
132+
The migrations are designed so that the new version of Kong is able to use
133+
the database as it is migrated while the old Kong cluster keeps working until
134+
it is time to decommission it. For this reason, the migration is split into
135+
two steps, performed via commands `kong migrations up` (which does
136+
only non-destructive operations) and `kong migrations finish` (which puts the
137+
database in the final expected state for Kong 2.7.x).
138+
139+
1. Download 2.7.x, and configure it to point to the same datastore
140+
as your old (1.0 to 2.0) cluster. Run `kong migrations up`.
141+
2. After that finishes running, both the old (2.x.x) and new (2.7.x)
142+
clusters can now run simultaneously. Start provisioning 2.7.x nodes,
143+
but do not use their Admin API yet. If you need to perform Admin API
144+
requests, these should be made to the old cluster's nodes. The reason
145+
is to prevent the new cluster from generating data that is not understood
146+
by the old cluster.
147+
3. Gradually divert traffic away from your old nodes, and into
148+
your 2.7.x cluster. Monitor your traffic to make sure everything
149+
is going smoothly.
150+
4. When your traffic is fully migrated to the 2.7.x cluster,
151+
decommission your old nodes.
152+
5. From your 2.7.x cluster, run: `kong migrations finish`.
153+
From this point on, it will not be possible to start
154+
nodes in the old cluster pointing to the same datastore anymore. Only run
155+
this command when you are confident that your migration
156+
was successful. From now on, you can safely make Admin API
157+
requests to your 2.7.x nodes.
158+
159+
**Cassandra**
160+
161+
Deprecation notice:
162+
Cassandra as a backend database for Kong Gateway is deprecated. This means the feature will eventually be removed. Our target for Cassandra removal is the Kong Gateway 4.0 release, and some new features might not be supported with Cassandra in the Kong Gateway 3.0 release.
163+
164+
Due to internal changes, the table schemas used by Kong 2.7.x on Cassandra
165+
are incompatible with those used by Kong 2.1.x (or lower). Migrating using the usual commands
166+
`kong migrations up` and `kong migrations finish` will require a small
167+
window of downtime, since the old and new versions cannot use the
168+
database at the same time. Alternatively, to keep your previous version fully
169+
operational while the new one initializes, you will need to transfer the
170+
data to a new keyspace via a database dump, as described below:
171+
172+
1. Download 2.7.x, and configure it to point to a new keyspace.
173+
Run `kong migrations bootstrap`.
174+
2. Once that finishes running, both the old (pre-2.1) and new (2.7.x)
175+
clusters can now run simultaneously, but the new cluster does not
176+
have any data yet.
177+
3. On the old cluster, run `kong config db_export`. This will create
178+
a file `kong.yml` with a database dump.
179+
4. Transfer the file to the new cluster and run
180+
`kong config db_import kong.yml`. This will load the data into the new cluster.
181+
5. Gradually divert traffic away from your old nodes, and into
182+
your 2.7.x cluster. Monitor your traffic to make sure everything
183+
is going smoothly.
184+
6. When your traffic is fully migrated to the 2.7.x cluster,
185+
decommission your old nodes.
186+
187+
### Installing 2.7.x on a fresh datastore
188+
189+
The following commands should be used to prepare a new 2.7.x cluster from a
190+
fresh datastore. By default the `kong` CLI tool will load the configuration
191+
from `/etc/kong/kong.conf`, but you can optionally use the flag `-c` to
192+
indicate the path to your configuration file:
193+
194+
```
195+
$ kong migrations bootstrap [-c /path/to/your/kong.conf]
196+
$ kong start [-c /path/to/your/kong.conf]
197+
```
198+
Unless indicated otherwise in one of the upgrade paths of this document, it is
199+
possible to upgrade Kong **without downtime**.
200+
201+
Assuming that Kong is already running on your system, acquire the latest
202+
version from any of the available [installation methods](https://getkong.org/install/)
203+
and proceed to install it, overriding your previous installation.
204+
205+
**If you are planning to make modifications to your configuration, this is a
206+
good time to do so**.
207+
208+
Then, run migration to upgrade your database schema:
209+
210+
```shell
211+
$ kong migrations up [-c configuration_file]
212+
```
213+
214+
If the command is successful, and no migration ran
215+
(no output), then you only have to
216+
[reload](https://docs.konghq.com/gateway-oss/2.7.x/cli/#kong-reload) Kong:
28217

29218
```shell
30219
$ kong reload [-c configuration_file]
@@ -69,7 +258,7 @@ repository contains [openresty-build-tools](https://github.com/Kong/kong-build-t
69258
which allows you to more easily build OpenResty with the necessary patches and modules.
70259

71260
There is a new way to deploy Go using Plugin Servers.
72-
For more information, see [Developing Go plugins](https://docs.konghq.com/gateway-oss/2.6.x/external-plugins/#developing-go-plugins).
261+
For more information, see [Developing Go plugins](https://docs.konghq.com/gateway-oss/2.7.x/external-plugins/#developing-go-plugins).
73262

74263
### Template changes
75264

kong-2.6.0-0.rockspec renamed to kong-2.7.0-0.rockspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package = "kong"
2-
version = "2.6.0-0"
2+
version = "2.7.0-0"
33
rockspec_format = "3.0"
44
supported_platforms = {"linux", "macosx"}
55
source = {
66
url = "git://github.com/Kong/kong",
7-
tag = "2.6.0"
7+
tag = "2.7.0"
88
}
99
description = {
1010
summary = "Kong is a scalable and customizable API Management Layer built on top of Nginx.",

kong/meta.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
local version = setmetatable({
22
major = 2,
3-
minor = 6,
3+
minor = 7,
44
patch = 0,
55
--suffix = "rc.1"
66
}, {

0 commit comments

Comments
 (0)