Skip to content

Commit 0bcea77

Browse files
authored
[DPE-7067] Kafka 4 (#30)
* update to use kafka 4 snap * update base and user * update license * update tracked branches for CI
1 parent 3d9c4e7 commit 0bcea77

5 files changed

Lines changed: 96 additions & 104 deletions

File tree

.github/workflows/publish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ on:
44
push:
55
branches:
66
- 3-22.04
7+
- 4-24.04
78

89
jobs:
910

.github/workflows/trivy.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,15 @@ on:
33
push:
44
branches:
55
- 3-22.04
6+
- 4-24.04
67
pull_request:
78
jobs:
89
build:
910
uses: ./.github/workflows/build.yaml
1011
scan:
1112
name: Trivy scan and SBOM Generation
1213
needs: build
13-
runs-on: ubuntu-22.04
14+
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout code
1617
uses: actions/checkout@v4

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ If you are using another version of Ubuntu or another operating system, the proc
1313
To avoid any issue with other operating systems you can simply build the image with [multipass](https://multipass.run/):
1414
```bash
1515
sudo snap install multipass
16-
multipass launch 22.04 -n rock-dev
16+
multipass launch 24.04 -n rock-dev
1717
multipass shell rock-dev
1818
```
1919

licenses/LICENSE-kafka-binary

Lines changed: 80 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -205,66 +205,54 @@
205205
This project bundles some components that are also licensed under the Apache
206206
License Version 2.0:
207207

208-
audience-annotations-0.5.0
209-
commons-cli-1.4
210-
commons-lang3-3.8.1
211-
jackson-annotations-2.13.4
212-
jackson-core-2.13.4
213-
jackson-databind-2.13.4.2
214-
jackson-dataformat-csv-2.13.4
215-
jackson-dataformat-yaml-2.13.4
216-
jackson-datatype-jdk8-2.13.4
217-
jackson-datatype-jsr310-2.13.4
218-
jackson-jaxrs-base-2.13.4
219-
jackson-jaxrs-json-provider-2.13.4
220-
jackson-module-jaxb-annotations-2.13.4
221-
jackson-module-scala_2.13-2.13.4
222-
jackson-module-scala_2.12-2.13.4
223-
jakarta.validation-api-2.0.2
224-
javassist-3.27.0-GA
225-
jetty-client-9.4.48.v20220622
226-
jetty-continuation-9.4.48.v20220622
227-
jetty-http-9.4.48.v20220622
228-
jetty-io-9.4.48.v20220622
229-
jetty-security-9.4.48.v20220622
230-
jetty-server-9.4.48.v20220622
231-
jetty-servlet-9.4.48.v20220622
232-
jetty-servlets-9.4.48.v20220622
233-
jetty-util-9.4.48.v20220622
234-
jetty-util-ajax-9.4.48.v20220622
235-
jersey-common-2.34
236-
jersey-server-2.34
237-
jose4j-0.7.9
238-
lz4-java-1.8.0
239-
maven-artifact-3.8.4
240-
metrics-core-4.1.12.1
241-
metrics-core-2.2.0
242-
netty-buffer-4.1.78.Final
243-
netty-codec-4.1.78.Final
244-
netty-common-4.1.78.Final
245-
netty-handler-4.1.78.Final
246-
netty-resolver-4.1.78.Final
247-
netty-transport-4.1.78.Final
248-
netty-transport-classes-epoll-4.1.78.Final
249-
netty-transport-native-epoll-4.1.78.Final
250-
netty-transport-native-unix-common-4.1.78.Final
251-
plexus-utils-3.3.0
252-
reload4j-1.2.19
253-
rocksdbjni-7.1.2
254-
scala-collection-compat_2.13-2.6.0
255-
scala-library-2.13.10
256-
scala-logging_2.13-3.9.4
257-
scala-reflect-2.13.10
258-
scala-java8-compat_2.13-1.0.2
259-
snakeyaml-1.30
260-
snappy-java-1.1.8.4
261-
swagger-annotations-2.2.0
262-
swagger-core-2.2.0
263-
swagger-integration-2.2.0
264-
swagger-jaxrs2-2.2.0
265-
swagger-models-2.2.0
266-
zookeeper-3.6.4
267-
zookeeper-jute-3.6.4
208+
- caffeine-3.1.1
209+
- commons-beanutils-1.9.4
210+
- commons-collections-3.2.2
211+
- commons-digester-2.1
212+
- commons-lang3-3.12.0
213+
- commons-logging-1.3.2
214+
- commons-validator-1.9.0
215+
- error_prone_annotations-2.14.0
216+
- jackson-annotations-2.16.2
217+
- jackson-core-2.16.2
218+
- jackson-databind-2.16.2
219+
- jackson-dataformat-csv-2.16.2
220+
- jackson-dataformat-yaml-2.16.2
221+
- jackson-datatype-jdk8-2.16.2
222+
- jackson-jakarta-rs-base-2.16.2
223+
- jackson-jakarta-rs-json-provider-2.16.2
224+
- jackson-module-blackbird-2.16.2
225+
- jackson-module-jakarta-xmlbind-annotations-2.16.2
226+
- jakarta.inject-api-2.0.1
227+
- jakarta.validation-api-3.0.2
228+
- javassist-3.29.2-GA
229+
- jetty-alpn-client-12.0.15
230+
- jetty-client-12.0.15
231+
- jetty-ee10-servlet-12.0.15
232+
- jetty-ee10-servlets-12.0.15
233+
- jetty-http-12.0.15
234+
- jetty-io-12.0.15
235+
- jetty-security-12.0.15
236+
- jetty-server-12.0.15
237+
- jetty-session-12.0.15
238+
- jetty-util-12.0.15
239+
- jose4j-0.9.4
240+
- log4j-api-2.24.3
241+
- log4j-core-2.24.3
242+
- log4j-slf4j-impl-2.24.3
243+
- log4j-1.2-api-2.24.3
244+
- lz4-java-1.8.0
245+
- maven-artifact-3.9.6
246+
- metrics-core-2.2.0
247+
- opentelemetry-proto-1.0.0-alpha
248+
- plexus-utils-3.5.1
249+
- rocksdbjni-9.7.3
250+
- scala-library-2.13.15
251+
- scala-logging_2.13-3.9.5
252+
- scala-reflect-2.13.15
253+
- snappy-java-1.1.10.5
254+
- snakeyaml-2.2
255+
- swagger-annotations-2.2.25
268256

269257
===============================================================================
270258
This product bundles various third-party components under other open source
@@ -275,59 +263,60 @@ See licenses/ for text of these licenses.
275263
Eclipse Distribution License - v 1.0
276264
see: licenses/eclipse-distribution-license-1.0
277265

278-
jakarta.activation-api-1.2.2
279-
jakarta.xml.bind-api-2.3.3
266+
- jakarta.activation-api-2.1.0
267+
- jakarta.xml.bind-api-3.0.1
280268

281269
---------------------------------------
282270
Eclipse Public License - v 2.0
283271
see: licenses/eclipse-public-license-2.0
284272

285-
jakarta.annotation-api-1.3.5
286-
jakarta.ws.rs-api-2.1.6
287-
javax.annotation-api-1.3.2
288-
javax.ws.rs-api-2.1.1
289-
hk2-api-2.6.1
290-
hk2-locator-2.6.1
291-
hk2-utils-2.6.1
292-
osgi-resource-locator-1.0.3
293-
aopalliance-repackaged-2.6.1
294-
jakarta.inject-2.6.1
295-
jersey-container-servlet-2.34
296-
jersey-container-servlet-core-2.34
297-
jersey-client-2.34
298-
jersey-hk2-2.34
299-
jersey-media-jaxb-2.31
273+
- jakarta.annotation-api-2.1.1
274+
- jakarta.ws.rs-api-3.1.0
275+
- hk2-api-3.0.6
276+
- hk2-locator-3.0.6
277+
- hk2-utils-3.0.6
278+
- osgi-resource-locator-1.0.3
279+
- aopalliance-repackaged-3.0.6
280+
- jersey-client-3.1.9
281+
- jersey-common-3.1.9
282+
- jersey-container-servlet-3.1.9
283+
- jersey-container-servlet-core-3.1.9
284+
- jersey-hk2-3.1.9
285+
- jersey-server-3.1.9
300286

301287
---------------------------------------
302288
CDDL 1.1 + GPLv2 with classpath exception
303289
see: licenses/CDDL+GPL-1.1
304290

305-
javax.servlet-api-3.1.0
306-
jaxb-api-2.3.0
307-
activation-1.1.1
291+
- jakarta.servlet-api-6.0.0
292+
- javax.activation-api-1.2.0
293+
- javax.annotation-api-1.3.2
294+
- jaxb-api-2.3.1
295+
- activation-1.1.1
308296

309297
---------------------------------------
310298
MIT License
311299

312-
argparse4j-0.7.0, see: licenses/argparse-MIT
313-
jopt-simple-5.0.4, see: licenses/jopt-simple-MIT
314-
slf4j-api-1.7.36, see: licenses/slf4j-MIT
315-
slf4j-reload4j-1.7.36, see: licenses/slf4j-MIT
316-
classgraph-4.8.138, see: license/classgraph-MIT
300+
- argparse4j-0.7.0, see: licenses/argparse-MIT
301+
- classgraph-4.8.173, see: licenses/classgraph-MIT
302+
- jopt-simple-5.0.4, see: licenses/jopt-simple-MIT
303+
- slf4j-api-1.7.36, see: licenses/slf4j-MIT
304+
- pcollections-4.0.1, see: licenses/pcollections-MIT
317305

318306
---------------------------------------
319307
BSD 2-Clause
320308

321-
zstd-jni-1.5.2-1 see: licenses/zstd-jni-BSD-2-clause
309+
- zstd-jni-1.5.6-6, see: licenses/zstd-jni-BSD-2-clause
310+
- HdrHistogram-2.2.2, see: licenses/hdrHistogram-BSD-2-clause
322311

323312
---------------------------------------
324313
BSD 3-Clause
325314

326-
jline-3.21.0, see: licenses/jline-BSD-3-clause
327-
paranamer-2.8, see: licenses/paranamer-BSD-3-clause
315+
- jline-3.25.1, see: licenses/jline-BSD-3-clause
316+
- protobuf-java-3.25.5, see: licenses/protobuf-java-BSD-3-clause
317+
- jakarta.activation-2.0.1, see: licenses/jakarta-BSD-3-clause
328318

329319
---------------------------------------
330-
Do What The F*ck You Want To Public License
331-
see: licenses/DWTFYWTPL
320+
Go License
332321

333-
reflections-0.9.12
322+
- re2j-1.7, see: licenses/re2j-GO

rockcraft.yaml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# See LICENSE file for licensing details.
33
---
44
name: charmed-kafka # the name of your ROCK
5-
base: ubuntu@22.04 # the base environment for this ROCK
6-
version: '3.9.0' # just for humans. Semantic versioning is recommended
5+
base: ubuntu@24.04 # the base environment for this ROCK
6+
version: '4.0.0' # just for humans. Semantic versioning is recommended
77
summary: Charmed Kafka ROCK OCI # 79 char long summary
88
description: |
99
This is an OCI image that bundles Apache Kafka together with other tools
@@ -25,7 +25,7 @@ services:
2525
user: kafka
2626
group: kafka
2727
environment:
28-
JAVA_HOME: /usr/lib/jvm/java-18-openjdk-amd64
28+
JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64
2929
KAFKA_OPTS: "-javaagent:/opt/kafka/libs/jmx_prometheus_javaagent.jar=\n
3030
9101:/etc/kafka/jmx_prometheus.yaml\n
3131
-Djava.security.auth.login.config=\n
@@ -35,17 +35,17 @@ parts:
3535
kafka:
3636
plugin: nil
3737
stage-packages:
38-
- openjdk-18-jre-headless
38+
- openjdk-21-jre-headless
3939
- libpsl5
4040
- curl
4141
build-environment:
42-
- JAVA_HOME: /usr/lib/jvm/java-18-openjdk-amd64
42+
- JAVA_HOME: /usr/lib/jvm/java-21-openjdk-amd64
4343
stage-snaps:
44-
- charmed-kafka/3/edge
44+
- charmed-kafka/4/edge
4545
override-build: |
46-
ln -s /usr/lib/jvm/java-18-openjdk-amd64/bin/java \
46+
ln -s /usr/lib/jvm/java-21-openjdk-amd64/bin/java \
4747
$CRAFT_PART_INSTALL/usr/bin/java
48-
ln -s /usr/lib/jvm/java-18-openjdk-amd64/bin/keytool \
48+
ln -s /usr/lib/jvm/java-21-openjdk-amd64/bin/keytool \
4949
$CRAFT_PART_INSTALL/usr/bin/keytool
5050
5151
# making core dirs
@@ -64,12 +64,13 @@ parts:
6464
after: [kafka]
6565
overlay-script: |
6666
# Create a user in the $CRAFT_OVERLAY chroot
67-
groupadd -R $CRAFT_OVERLAY -g 1000 kafka
68-
useradd -R $CRAFT_OVERLAY -M -r -g kafka -u 1000 kafka
67+
# This user is the same as the one in the snap
68+
groupadd -R $CRAFT_OVERLAY -g 584792 kafka
69+
useradd -R $CRAFT_OVERLAY -M -r -g kafka -u 584792 kafka
6970
override-prime: |
7071
craftctl default
7172
# Give permission ot the required folders
72-
install -d -o 1000 -g 1000 -m 770 \
73+
install -d -o 584792 -g 584792 -m 770 \
7374
opt/kafka \
7475
var/lib/kafka \
7576
var/log/kafka \

0 commit comments

Comments
 (0)