Skip to content

Commit f4bc373

Browse files
Merge pull request #46 from oslabs-beta/mx/testingBranch
Mx/testing branch
2 parents cb9e4ed + d3beefd commit f4bc373

33 files changed

+30649
-118
lines changed

.github/workflows/integration-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,23 @@ jobs:
3030
- uses: actions/checkout@v3
3131

3232
- name: Start Containers
33-
run: docker-compose -f "docker-compose.yml" up -d --build
33+
run: docker-compose -f "./ksqljs/docker-compose.yml" up -d --build
3434

3535
- name: Install node
3636
uses: actions/setup-node@v1
3737
with:
3838
node-version: 16.x
3939

4040
- name: Install dependencies
41-
run: npm install
41+
run: npm install --prefix "./ksqljs"
4242

4343
- name: Sleep for 30 seconds
4444
run: sleep 30s
4545
shell: bash
4646

4747
- name: Run tests
48-
run: npm run test
48+
run: npm run test --prefix "./ksqljs"
4949

5050
- name: Stop containers
5151
if: always()
52-
run: docker-compose -f "docker-compose.yml" down
52+
run: docker-compose -f "./ksqljs/docker-compose.yml" down

.github/workflows/npm-publish.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Node.js Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish-npm:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 16
15+
registry-url: https://registry.npmjs.org/
16+
- run: npm publish --access public
17+
env:
18+
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}

.gitignore

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

ksqLight/.gitignore

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
/node_modules
5+
/.pnp
6+
.pnp.js
7+
8+
# testing
9+
/coverage
10+
11+
# production
12+
/build
13+
14+
# misc
15+
.DS_Store
16+
.env.local
17+
.env.development.local
18+
.env.test.local
19+
.env.production.local
20+
21+
npm-debug.log*
22+
yarn-debug.log*
23+
yarn-error.log*

ksqLight/docker-compose.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
---
2+
version: "3.2"
3+
4+
services:
5+
prometheus:
6+
image: prom/prometheus
7+
container_name: prometheus
8+
ports:
9+
- 9090:9090
10+
- 8080:8080
11+
volumes:
12+
- ./prometheus/:/etc/prometheus/
13+
zookeeper:
14+
image: confluentinc/cp-zookeeper:7.0.1
15+
hostname: zookeeper
16+
container_name: zookeeper
17+
ports:
18+
- "2181:2181"
19+
environment:
20+
ZOOKEEPER_CLIENT_PORT: 2181
21+
ZOOKEEPER_TICK_TIME: 2000
22+
23+
broker:
24+
image: confluentinc/cp-kafka:7.0.1
25+
hostname: broker
26+
container_name: broker
27+
depends_on:
28+
- zookeeper
29+
ports:
30+
- "29092:29092"
31+
environment:
32+
KAFKA_BROKER_ID: 1
33+
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
34+
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT
35+
KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://broker:9092,PLAINTEXT_HOST://localhost:29092
36+
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
37+
KAFKA_GROUP_INITIAL_REBALANCE_DELAY_MS: 0
38+
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
39+
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1
40+
41+
ksqldb-server:
42+
image: confluentinc/ksqldb-server:0.25.1
43+
hostname: ksqldb-server
44+
container_name: ksqldb-server
45+
volumes:
46+
- ./jmx_exporter:/usr/share/jmx_exporter/
47+
- type: bind
48+
source: ./
49+
target: /home/appuser
50+
depends_on:
51+
- broker
52+
ports:
53+
- "8088:8088"
54+
- "1090:1099"
55+
environment:
56+
KSQL_LISTENERS: http://0.0.0.0:8088
57+
KSQL_BOOTSTRAP_SERVERS: broker:9092
58+
KSQL_KSQL_LOGGING_PROCESSING_STREAM_AUTO_CREATE: "true"
59+
KSQL_KSQL_LOGGING_PROCESSING_TOPIC_AUTO_CREATE: "true"
60+
# KSQL_KSQL_OPTS: "-Djava.security.auth.login.config=/jaas_config.file"
61+
# KSQL_AUTHENTICATION_METHOD: BASIC
62+
# KSQL_AUTHENTICATION_REALM: KsqlServer-Props
63+
# KSQL_AUTHENTICATION_ROLES: admin,developer,user
64+
# KSQL_SSL_CLIENT_AUTHENTICATION: NONE
65+
# KSQL_SSL_TRUSTSTORE_LOCATION: ksqldb_server_config/kafka.server.truststore.jks
66+
# KSQL_SSL_TRUSTSTORE_PASSWORD: ${SSL_PASSWORD}
67+
# KSQL_SSL_KEYSTORE_LOCATION: ksqldb_server_config/kafka.server.keystore.jks
68+
# KSQL_SSL_KEYSTORE_PASSWORD: ${SSL_PASSWORD}
69+
# KSQL_SSL_KEY_PASSWORD: ${SSL_PASSWORD}
70+
KSQL_KSQL_HEARTBEAT_ENABLE: "true"
71+
KSQL_KSQL_LAG_REPORTING_ENABLE: "true"
72+
KSQL_KSQL_PULL_METRICS_ENABLED: "true"
73+
KSQL_JMX_OPTS: >
74+
-Dcom.sun.management.jmxremote.authenticate=false
75+
-Dcom.sun.management.jmxremote.ssl=false
76+
-Djava.util.logging.config.file=logging.properties
77+
-javaagent:/usr/share/jmx_exporter/jmx_prometheus_javaagent-0.17.0.jar=7010:/usr/share/jmx_exporter/ksqldb.yml
78+
ksqldb-cli:
79+
image: confluentinc/ksqldb-cli:0.25.1
80+
container_name: ksqldb-cli
81+
depends_on:
82+
- broker
83+
- ksqldb-server
84+
entrypoint: /bin/sh
85+
tty: true
86+
prometheus:
87+
image: prom/prometheus
88+
container_name: prometheus
89+
ports:
90+
- 9090:9090
91+
- 8080:8080
92+
volumes:
93+
- ./prometheus/:/etc/prometheus/
94+
95+
# Possible JMX OPT alternative?
96+
# -Djava.rmi.server.hostname=localhost
97+
# -Dcom.sun.management.jmxremote
98+
# -Dcom.sun.management.jmxremote.port=1099
99+
# -Dcom.sun.management.jmxremote.authenticate=false
100+
# -Dcom.sun.management.jmxremote.ssl=false
101+
# -Dcom.sun.management.jmxremote.rmi.port=1099docke
Binary file not shown.

0 commit comments

Comments
 (0)