Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfb73e5a

Browse files
committed
Merge branch 'oneslash-ci_cd'
2 parents69c29ec +8d63399 commitfb73e5a

File tree

12 files changed

+132
-87
lines changed

12 files changed

+132
-87
lines changed

‎.github/workflows/rust.yml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name:Rust
2+
3+
on:
4+
push:
5+
branches:[ "main", "master" ]
6+
pull_request:
7+
branches:[ "main", "master" ]
8+
9+
env:
10+
CARGO_TERM_COLOR:always
11+
RUST_TEST_THREADS:1
12+
DOCKER_HUB_USER:${{ secrets.DOCKER_HUB_USER }}
13+
DOCKER_HUB_TOKEN:${{ secrets.DOCKER_HUB_TOKEN }}
14+
15+
jobs:
16+
test:
17+
runs-on:ubuntu-latest
18+
strategy:
19+
matrix:
20+
include:
21+
-KAFKA_VER:3.4.0
22+
COMPRESSIONS:NONE
23+
SECURES:""
24+
-KAFKA_VER:3.4.0
25+
COMPRESSIONS:NONE
26+
SECURES:secure
27+
-KAFKA_VER:3.4.0
28+
COMPRESSIONS:SNAPPY
29+
SECURES:""
30+
-KAFKA_VER:3.4.0
31+
COMPRESSIONS:SNAPPY
32+
SECURES:secure
33+
-KAFKA_VER:3.4.0
34+
COMPRESSIONS:GZIP
35+
SECURES:""
36+
-KAFKA_VER:3.4.0
37+
COMPRESSIONS:GZIP
38+
SECURES:secure
39+
-KAFKA_VER:3.8.0
40+
COMPRESSIONS:NONE
41+
SECURES:""
42+
-KAFKA_VER:3.8.0
43+
COMPRESSIONS:NONE
44+
SECURES:secure
45+
-KAFKA_VER:3.8.0
46+
COMPRESSIONS:SNAPPY
47+
SECURES:""
48+
-KAFKA_VER:3.8.0
49+
COMPRESSIONS:SNAPPY
50+
SECURES:secure
51+
-KAFKA_VER:3.8.0
52+
COMPRESSIONS:GZIP
53+
SECURES:""
54+
-KAFKA_VER:3.8.0
55+
COMPRESSIONS:GZIP
56+
SECURES:secure
57+
steps:
58+
-uses:actions/checkout@v4
59+
-name:Login to Docker Hub
60+
run:echo "${{ secrets.DOCKER_HUB_TOKEN }}" | docker login -u "${{ secrets.DOCKER_HUB_USER }}" --password-stdin
61+
62+
-name:Set up Rust
63+
uses:actions-rs/toolchain@v1
64+
with:
65+
profile:minimal
66+
toolchain:stable
67+
68+
-name:Build
69+
run:cargo build
70+
71+
-name:Run tests
72+
run:./tests/run-all-tests ${{ matrix.KAFKA_VER }}
73+
env:
74+
KAFKA_VER:${{ matrix.KAFKA_VER }}
75+
COMPRESSIONS:${{ matrix.COMPRESSIONS }}
76+
SECURES:${{ matrix.SECURES }}
77+
78+
-name:Generate documentation
79+
run:cargo doc

‎.travis.yml

Lines changed: 0 additions & 55 deletions
This file was deleted.

‎Cargo.toml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,26 @@ repository = "https://github.com/kafka-rust/kafka-rust"
1212
description ="Rust client for Apache Kafka"
1313

1414
[dependencies]
15-
byteorder ="1.4.3"
16-
crc ="3.0.0"
15+
byteorder ="1.5"
16+
crc ="3.2"
1717
fnv ="1.0.7"
1818
ref_slice ="1.2.1"
1919
twox-hash ="1.6.3"
2020

21-
flate2 = {version ="1.0.23",optional =true }
22-
openssl = {version ="0.10.40",optional =true }
23-
openssl-sys = {version ="0.9.73",optional =true }
24-
snap = {version ="1.0.5",optional =true }
25-
thiserror ="1.0.31"
26-
tracing ="0.1.34"
21+
flate2 = {version ="1.0",optional =true }
22+
openssl = {version ="0.10",optional =true }
23+
openssl-sys = {version ="0.9",optional =true }
24+
snap = {version ="1.1",optional =true }
25+
thiserror ="1.0"
26+
tracing ="0.1"
2727

2828
[dev-dependencies]
2929
getopts ="0.2.21"
3030
tracing-subscriber ="0.3"
31-
time ="0.3.7"
31+
time ="0.3"
3232
rand ="0.8.5"
33-
lazy_static ="1.4.0"
34-
anyhow ="1.0.55"
33+
lazy_static ="1.5"
34+
anyhow ="1.0"
3535

3636
[features]
3737
default = ["snappy","gzip","security"]

‎README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#Kafka Rust Client
22

3-
[![Build Status](https://travis-ci.org/spicavigo/kafka-rust.svg?branch=master)](https://travis-ci.org/spicavigo/kafka-rust)[![](http://meritbadge.herokuapp.com/kafka)](https://crates.io/crates/kafka)
43

54
##Project Status
65

@@ -24,7 +23,7 @@ expect the version number to grow quickly).
2423

2524
```toml
2625
[dependencies]
27-
kafka ="0.9"
26+
kafka ="0.10"
2827
```
2928

3029
To build kafka-rust the usual`cargo build` should suffice. The crate

‎kafka-rust-image.png

-22.5 KB
Binary file not shown.

‎tests/.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
KAFKA_VER=1.0.0
2-
SCALA_VER=2.12
1+
KAFKA_VER=3.4.0
2+
SCALA_VER=2.13

‎tests/docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
zookeeper:
3-
image:wurstmeister/zookeeper:3.4.6
3+
image:zookeeper:3.7.2
44
ports:
55
-"2181:2181"
66

‎tests/kafka-rust-image/Dockerfile

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM ubuntu:xenial
1+
FROM ubuntu:latest
22

33
RUN apt-get update && apt-get install -y wget jq coreutils net-tools openjdk-8-jre
44

@@ -21,7 +21,7 @@ COPY start-kafka.sh /usr/bin/start-kafka.sh
2121
COPY create-topics.sh /usr/bin/create-topics.sh
2222

2323
ENV KAFKA_ZOOKEEPER_CONNECT zookeeper
24-
COPY server.properties secure.server.properties /opt/kafka/config/
24+
COPY server.properties secure.server.propertiesclient-ssl.properties/opt/kafka/config/
2525

2626
# set up an SSL certificate for secure mode
2727
RUN keytool \
@@ -34,6 +34,10 @@ RUN keytool \
3434
-storepass xxxxxx \
3535
-keypass xxxxxx
3636

37+
RUN keytool -exportcert -alias localhost -keystore /server.keystore.jks -file server-cert.pem -storepass xxxxxx -noprompt
38+
RUN keytool -importcert -file server-cert.pem -alias server-cert -keystore client.truststore.jks -storepass xxxxxx -noprompt
39+
RUN keytool -list -v -keystore client.truststore.jks -storepass xxxxxx -noprompt
40+
3741
EXPOSE 9092
3842

3943
# Use "exec" form so that it runs as PID 1 (useful for graceful shutdown)
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
security.protocol=SSL
2+
ssl.enabled.protocols=TLSv1.2,TLSv1.3
3+
ssl.endpoint.identification.algorithm=
4+
ssl.truststore.location=/client.truststore.jks
5+
ssl.truststore.password=xxxxxx
6+
ssl.keystore.location=/client.truststore.jks
7+
ssl.keystore.password=xxxxxx
8+
ssl.key.password=xxxxxx
9+

‎tests/kafka-rust-image/create-topics.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
#!/bin/bash
22

3-
43
if [[-z"$START_TIMEOUT" ]];then
54
START_TIMEOUT=600
65
fi
@@ -23,14 +22,22 @@ if $start_timeout_exceeded; then
2322
exit 1
2423
fi
2524

25+
if [[!-z"$KAFKA_CLIENT_SECURE" ]];then
26+
SECURE_PARAM_NAME="--command-config"
27+
SECURE_PARAM_VALUE="$KAFKA_HOME/config/client-ssl.properties"
28+
else
29+
SECURE_PARAM_NAME=""
30+
SECURE_PARAM_VALUE=""
31+
fi
32+
2633
if [[-n$KAFKA_CREATE_TOPICS ]];then
2734
IFS=',';fortopicToCreatein$KAFKA_CREATE_TOPICS;do
2835
echo"creating topics:$topicToCreate"
2936
IFS=':'read -a topicConfig<<<"$topicToCreate"
3037
if [${topicConfig[3]} ];then
31-
JMX_PORT=''$KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper$KAFKA_ZOOKEEPER_CONNECT--replication-factor${topicConfig[2]} --partitions${topicConfig[1]} --topic"${topicConfig[0]}" --config cleanup.policy="${topicConfig[3]}"
38+
JMX_PORT=''$KAFKA_HOME/bin/kafka-topics.sh --create --bootstrap-server localhost:$KAFKA_PORT$SECURE_PARAM_NAME$SECURE_PARAM_VALUE--replication-factor${topicConfig[2]} --partitions${topicConfig[1]} --topic"${topicConfig[0]}" --config cleanup.policy="${topicConfig[3]}"
3239
else
33-
JMX_PORT=''$KAFKA_HOME/bin/kafka-topics.sh --create --zookeeper$KAFKA_ZOOKEEPER_CONNECT--replication-factor${topicConfig[2]} --partitions${topicConfig[1]} --topic"${topicConfig[0]}"
40+
JMX_PORT=''$KAFKA_HOME/bin/kafka-topics.sh --create --bootstrap-server localhost:$KAFKA_PORT$SECURE_PARAM_NAME$SECURE_PARAM_VALUE--replication-factor${topicConfig[2]} --partitions${topicConfig[1]} --topic"${topicConfig[0]}"
3441
fi
3542
done
3643
fi

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp