Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] The docker-push.yml ENV syntax bug fixed #4190

Merged
merged 10 commits into from
Feb 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/docker-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ on:
push:
branches:
- release-*
tags:
- v*

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down
19 changes: 12 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,20 +50,25 @@ Apache StreamPark

## 🚀 QuickStart

```shell
curl -L https://streampark.apache.org/quickstart.sh | sh
#### 🐳 Play StreamPark in Docker

```shell
docker run -d -p 10000:10000 apache/streampark:latest
```

https://github.com/user-attachments/assets/dd7d5a89-bc28-4ccc-9ad5-258925fc4f34
---

#### 🖥️ Local Quick Installation Experience

more:
- [Start with Docker](docker/README.md)
- [Start with Kubernetes](helm/README.md)
```shell
curl -L https://streampark.apache.org/quickstart.sh | sh
```
https://github.com/user-attachments/assets/dd7d5a89-bc28-4ccc-9ad5-258925fc4f34

## 🔨 How to Build

```shell
./build.sh
./build.sh
```

🗄 how to [Development](https://streampark.apache.org/docs/development/development)
Expand Down
90 changes: 48 additions & 42 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,62 +18,68 @@ FROM ubuntu:22.04

USER root

# Install basic tools
RUN apt update && apt install -y wget curl vim net-tools iputils-ping \
&& apt install software-properties-common -y \
&& add-apt-repository ppa:openjdk-r/ppa -y
RUN apt update && apt install -y openjdk-8-jdk
RUN JAVA_PATH=$(ls -l /usr/lib/jvm | grep java-8-openjdk | grep ^d | awk -F ' ' '{print $9}'); \
if [ -z "${JAVA_PATH}" ];then \
echo "JAVA_PATH not found: $JAVA_PATH"; \
exit 2; \
else \
ln -s /usr/lib/jvm/$JAVA_PATH/ /usr/lib/jvm/jdk8; \
fi
ENV JAVA_HOME=/usr/lib/jvm/jdk8
ENV LANG=C.UTF-8 \
JAVA_HOME=/usr/lib/jvm/jdk8

# Build arguments for version management
ARG JAVA_MAJOR_VERSION=8
ARG TINI_VERSION=v0.19.0

# Base system setup
RUN apt-get update -qq && \
apt-get install -y --no-install-recommends \
software-properties-common \
ca-certificates \
curl \
gnupg \
iputils-ping \
net-tools \
vim \
wget && \
add-apt-repository -y ppa:openjdk-r/ppa && \
apt-get update -qq && \
apt-get install -y "openjdk-${JAVA_MAJOR_VERSION}-jdk" && \
rm -rf /var/lib/apt/lists/*

# Configure Java environment
RUN ARCH=$(dpkg --print-architecture); \
ln -sv "/usr/lib/jvm/java-${JAVA_MAJOR_VERSION}-openjdk-${ARCH}" "${JAVA_HOME}"

# Install docker
RUN \
# Add Docker's official GPG key:
apt update && \
apt install -y ca-certificates curl gnupg && \
install -m 0755 -d /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | \
gpg --dearmor -o /etc/apt/keyrings/docker.gpg && \
chmod a+r /etc/apt/keyrings/docker.gpg && \
# Add the repository to Apt sources:
echo \
"deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
"$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \
tee /etc/apt/sources.list.d/docker.list > /dev/null && \
apt update && \
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] \
https://download.docker.com/linux/ubuntu $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
tee /etc/apt/sources.list.d/docker.list >/dev/null && \
apt-get update -qq && \
# Install the Docker packages.
apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

apt-get install -y --no-install-recommends \
docker-ce \
docker-ce-cli \
containerd.io \
docker-buildx-plugin \
docker-compose-plugin && \
rm -rf /var/lib/apt/lists/*

# Install Tini
ARG TARGETPLATFORM
ENV TINI_VERSION v0.19.0
RUN echo "TARGETPLATFORM: $TARGETPLATFORM"
RUN \
if [ "$TARGETPLATFORM" = "linux/amd64" ];then \
TINI_PLATFORM=amd64; \
wget --no-check-certificate -O /usr/sbin/tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-$TINI_PLATFORM; \
elif [ "$TARGETPLATFORM" = "linux/arm64" ];then \
TINI_PLATFORM=arm64; \
wget --no-check-certificate -O /usr/sbin/tini https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-$TINI_PLATFORM; \
else \
echo "unknown TARGETPLATFORM: $TARGETPLATFORM"; \
exit 2; \
fi
RUN chmod +x /usr/sbin/tini

RUN case "${TARGETPLATFORM}" in \
"linux/amd64") ARCH=amd64 ;; \
"linux/arm64") ARCH=arm64 ;; \
*) echo "Unsupported platform: ${TARGETPLATFORM}"; exit 1 ;; \
esac; \
wget --no-check-certificate \
-O /usr/sbin/tini \
"https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini-${ARCH}" && \
chmod +x /usr/sbin/tini

# Install StreamPark
COPY dist/apache-streampark*-*-bin.tar.gz /
RUN tar -zxvf apache-streampark*-*-bin.tar.gz \
&& mv apache-streampark*-*-bin streampark \
&& rm -f apache-streampark*-*-bin.tar.gz


ENTRYPOINT ["/usr/sbin/tini", "--", "/streampark/bin/streampark.sh", "start_docker"]
23 changes: 0 additions & 23 deletions docker/README.md

This file was deleted.

43 changes: 21 additions & 22 deletions docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,31 @@ version: '3.8'

services:
streampark:
image: apache/streampark:2.2.0
image: apache/streampark:latest
ports:
- "10000:10000"
- "10030:10030"
- "10000:10000" # Map port 10000 of the container to port 10000 of the host to allow access to the service on that port
environment:
- TZ=Asia/Shanghai
- DATASOURCE_DIALECT=h2 # h2, mysql, pgsql
# If use mysql or pgsql, please set the following parameters
# - DATASOURCE_URL=jdbc:mysql://localhost:3306/streampark?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
# - DATASOURCE_URL=jdbc:postgresql://localhost:5432/streampark?stringtype=unspecified
# - DATASOURCE_USERNAME=root
# - DATASOURCE_PASSWORD=streampark
- TZ=Asia/Shanghai # Container's timezone
- DATASOURCE_DIALECT=h2 # Set the datasource dialect, supports h2, mysql, pgsql, default: h2
# If using MySQL or postgresql, please set the parameters:
# - DATASOURCE_URL=jdbc:mysql://localhost:3306/streampark?useSSL=false&useUnicode=true&characterEncoding=UTF-8&allowPublicKeyRetrieval=false&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=GMT%2B8
# - DATASOURCE_URL=jdbc:postgresql://localhost:5432/streampark?stringtype=unspecified
# - DATASOURCE_USERNAME=root # Database username
# - DATASOURCE_PASSWORD=streampark # Database password
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /etc/hosts:/etc/hosts:ro
- ~/.kube:/root/.kube:ro
privileged: true
restart: always
- /var/run/docker.sock:/var/run/docker.sock # Mount the host's Docker socket inside the container to allow interaction with Docker
- /etc/hosts:/etc/hosts:ro # Mount the host's /etc/hosts file inside the container, read-only access
- ~/.kube:/root/.kube:ro # Mount the host's kube configuration directory inside the container to access the Kubernetes cluster
privileged: true # Grant the container higher privileges, typically for scenarios requiring interaction with host resources
restart: always # Ensure the container always restarts after crashes or host reboots
networks:
- streampark
healthcheck:
test: [ "CMD", "curl", "http://streampark:10000" ]
interval: 5s
timeout: 5s
retries: 120
- streampark # Use a custom network named streampark
healthcheck: # Set a health check
test: [ "CMD", "curl", "http://streampark:10000" ] # Use curl to check if port 10000 of the container is accessible
interval: 5s # Health check interval is 5 seconds
timeout: 5s # Timeout for each health check is 5 seconds
retries: 120 # The container will be considered unhealthy after 120 failed health checks

networks:
streampark:
driver: bridge
driver: bridge # Use the bridge network driver
19 changes: 0 additions & 19 deletions helm/README.md

This file was deleted.

23 changes: 0 additions & 23 deletions helm/streampark/.helmignore

This file was deleted.

24 changes: 0 additions & 24 deletions helm/streampark/Chart.yaml

This file was deleted.

This file was deleted.

30 changes: 0 additions & 30 deletions helm/streampark/conf/streampark-console-config/application-h2.yml

This file was deleted.

This file was deleted.

Loading
Loading