This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch docker-dev
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/docker-dev by this push:
new f03c42b67c [feauture-wip](docker) Submitted shell script code for
Dockerfile, Docker-Compose and related registers. (#12502)
f03c42b67c is described below
commit f03c42b67c2b509361c88567703fa373f5ed0073
Author: FreeOnePlus <[email protected]>
AuthorDate: Fri Sep 9 15:47:15 2022 +0800
[feauture-wip](docker) Submitted shell script code for Dockerfile,
Docker-Compose and related registers. (#12502)
Co-authored-by: Yijia Su <[email protected]>
---
.../single_fe-nulti_be/docker-compose.yaml | 93 ++++++++++++++++++++++
.../single_fe-single_be/docker-compose.yaml | 64 +++++++++++++++
.../docker-file/local-doris/BELocalDockerfile | 43 ++++++++++
.../docker-file/local-doris/FELocalDockerfile | 44 ++++++++++
.../docker-file/register/Dockerfile | 33 ++++++++
.../register/single_fe-single_be/shell/init_be.sh | 22 +++++
.../register/single_fe-single_be/shell/init_fe.sh | 22 +++++
.../register/single_fe-single_be/shell/register.sh | 28 +++++++
.../docker-file/remote-doris/BERemoteDockerfile | 41 ++++++++++
.../docker-file/remote-doris/FERemoteDockerfile | 42 ++++++++++
10 files changed, 432 insertions(+)
diff --git
a/docker/rapid-deployment/docker-compose/single_fe-nulti_be/docker-compose.yaml
b/docker/rapid-deployment/docker-compose/single_fe-nulti_be/docker-compose.yaml
new file mode 100644
index 0000000000..199a7859cc
--- /dev/null
+++
b/docker/rapid-deployment/docker-compose/single_fe-nulti_be/docker-compose.yaml
@@ -0,0 +1,93 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+version: '3'
+services:
+ docker-fe:
+ image: "FE-Docker-Image" # E.g "apache/doris:1.1.2-rc06-jdk8-fe"
+ container_name: "doris-fe"
+ tty: true
+ hostname: "fe"
+ restart: always
+ ports:
+ - 8030:8030
+ - 9030:9030
+ networks:
+ doris_net:
+ ipv4_address: 172.20.80.2
+ docker-be-01:
+ image: "BE-Docker-Image" # E.g "apache/doris:1.1.2-rc06-jdk8-be"
+ container_name: "doris-be-01"
+ tty: true
+ hostname: "be-01"
+ restart: always
+ ports:
+ - 8041:8040
+ - 9001:9000
+ - 9051:9050
+ networks:
+ doris_net:
+ ipv4_address: 172.20.80.3
+ docker-be-02:
+ image: "BE-Docker-Image" # E.g "apache/doris:1.1.2-rc06-jdk8-be"
+ container_name: "doris-be-02"
+ tty: true
+ hostname: "be-02"
+ restart: always
+ ports:
+ - 8042:8040
+ - 9002:9000
+ - 9052:9050
+ networks:
+ doris_net:
+ ipv4_address: 172.20.80.4
+ docker-be-03:
+ image: "BE-Docker-Image" # E.g "apache/doris:1.1.2-rc06-jdk8-be"
+ container_name: "doris-be-03"
+ tty: true
+ hostname: "be-03"
+ restart: always
+ ports:
+ - 8043:8040
+ - 9003:9000
+ - 9053:9050
+ networks:
+ doris_net:
+ ipv4_address: 172.20.80.5
+ # 请看注意事项!
+ register:
+ image: "Register-Image" # E.g "apache/doris:single_fe-nulti_be-register"
+ container_name: "doris-register"
+ hostname: "register"
+ privileged: true
+ command: ["sh","-c","/root/register.sh"]
+ depends_on:
+ - docker-fe
+ - docker-be-01
+ - docker-be-02
+ - docker-be-03
+ volumes:
+ - /etc/localtime:/etc/localtime:ro
+ - /var/run/docker.sock:/var/run/docker.sock
+ networks:
+ doris_net:
+ ipv4_address: 172.20.80.6
+networks:
+ doris_net:
+ ipam:
+ config:
+ - subnet: 172.20.80.0/16
diff --git
a/docker/rapid-deployment/docker-compose/single_fe-single_be/docker-compose.yaml
b/docker/rapid-deployment/docker-compose/single_fe-single_be/docker-compose.yaml
new file mode 100644
index 0000000000..675787496c
--- /dev/null
+++
b/docker/rapid-deployment/docker-compose/single_fe-single_be/docker-compose.yaml
@@ -0,0 +1,64 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+version: '3'
+services:
+ docker-fe:
+ image: "FE-Docker-Image" # E.g "apache/doris:1.1.2-rc06-jdk8-fe"
+ container_name: "doris-fe"
+ tty: true
+ hostname: "fe"
+ restart: always
+ ports:
+ - 8030:8030
+ - 9030:9030
+ networks:
+ doris_net:
+ ipv4_address: 172.20.80.2
+ docker-be:
+ image: "BE-Docker-Image" # E.g "apache/doris:1.1.2-rc06-jdk8-be"
+ container_name: "doris-be"
+ tty: true
+ hostname: "be"
+ restart: always
+ ports:
+ - 8041:8040
+ - 9001:9000
+ - 9051:9050
+ networks:
+ doris_net:
+ ipv4_address: 172.20.80.3
+ register:
+ image: "Register-Image" # E.g "apache/doris:single_fe-single_be-register"
+ container_name: "doris-register"
+ hostname: "register"
+ privileged: true
+ command: ["sh","-c","/root/register.sh"]
+ depends_on:
+ - docker-fe
+ - docker-be-01
+ volumes:
+ - /etc/localtime:/etc/localtime:ro
+ - /var/run/docker.sock:/var/run/docker.sock
+ networks:
+ doris_net:
+ ipv4_address: 172.20.80.4
+networks:
+ doris_net:
+ ipam:
+ config:
+ - subnet: 172.20.80.0/16
diff --git a/docker/rapid-deployment/docker-file/local-doris/BELocalDockerfile
b/docker/rapid-deployment/docker-file/local-doris/BELocalDockerfile
new file mode 100644
index 0000000000..3178982b24
--- /dev/null
+++ b/docker/rapid-deployment/docker-file/local-doris/BELocalDockerfile
@@ -0,0 +1,43 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Choose a base image
+# E.g FROM bitnami/minideb:latest
+FROM openjdk
+
+# Replace according to your needs
+# E.g ARG package_url=./
+ARG package_url=Local binary package path, concatenated with package_name to
get the complete directory
+
+# E.g ARG package_name=apache-doris-1.1.1-bin-x86.tar.gz
+ARG package_name=binary package filename
+
+# E.g ARG package_path=apache-doris-1.1.1-bin-x86
+ARG package_path=File directory name after decompression
+
+# Set environment variables
+ENV
PATH="/usr/local/apache-doris/be/bin:/usr/local/apache-doris/apache_hdfs_broker/bin:$PATH"
+
+# Download the software to the mirror, which can be replaced as needed
+COPY $package_url/$package_name /usr/local/
+
+# Deploy software
+RUN tar -zxvf /usr/local/$package_name -C /usr/local/ && \
+ mv /usr/local/$package_path /usr/local/apache-doris && \
+ rm -rf /usr/local/$package_name /usr/local/apache-doris/fe
/usr/local/apache-doris/udf
+
+CMD ["bash"]
diff --git a/docker/rapid-deployment/docker-file/local-doris/FELocalDockerfile
b/docker/rapid-deployment/docker-file/local-doris/FELocalDockerfile
new file mode 100644
index 0000000000..bf84e5cf94
--- /dev/null
+++ b/docker/rapid-deployment/docker-file/local-doris/FELocalDockerfile
@@ -0,0 +1,44 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Choose a base image
+# E.g FROM bitnami/minideb:latest
+FROM openjdk
+
+# Replace according to your needs
+# E.g ARG package_url=./
+ARG package_url=Local binary package path, concatenated with package_name to
get the complete directory
+
+# E.g ARG package_name=apache-doris-1.1.1-bin-x86.tar.gz
+ARG package_name=binary package filename
+
+# E.g ARG package_path=apache-doris-1.1.1-bin-x86
+ARG package_path=File directory name after decompression
+
+# Set environment variables
+ENV JAVA_HOME="/usr/local/openjdk-8/" \
+ PATH="/usr/local/apache-doris/fe/bin:$PATH"
+
+# Download the software to the mirror, which can be replaced as needed
+COPY $package_url/$package_name /usr/local/
+
+# Deploy software
+RUN tar -zxvf /usr/local/$package_name -C /usr/local/ && \
+ mv /usr/local/$package_path /usr/local/apache-doris && \
+ rm -rf /usr/local/$package_name /usr/local/apache-doris/be
/usr/local/apache-doris/udf /usr/local/apache-doris/apache_hdfs_broker
+
+CMD ["bash"]
diff --git a/docker/rapid-deployment/docker-file/register/Dockerfile
b/docker/rapid-deployment/docker-file/register/Dockerfile
new file mode 100644
index 0000000000..2cf16154b4
--- /dev/null
+++ b/docker/rapid-deployment/docker-file/register/Dockerfile
@@ -0,0 +1,33 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Base Images
+FROM bash:latest
+
+# add script file
+ADD *.sh /root/
+
+# set working directory
+WORKDIR /root/
+
+# Set the mirror source and basic environment
+RUN /bin/sh -c echo 'http://mirrors.sjtug.sjtu.edu.cn/alpine/v3.15/main' >
/etc/apk/repositories && \
+ echo 'http://mirrors.sjtug.sjtu.edu.cn/alpine/v3.15/community' >>
/etc/apk/repositories && \
+ apk update && \
+ apk add --no-cache mysql-client docker && \
+ rm -rf /usr/bin/docker-proxy /usr/bin/docker-init /usr/bin/dockerd && \
+ chmod 755 *.sh
diff --git
a/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/init_be.sh
b/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/init_be.sh
new file mode 100644
index 0000000000..abdb22a15b
--- /dev/null
+++
b/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/init_be.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+echo "Start initializing Apache-Doris BE!"
+perl -pi -e "s|# priority_networks =
10.10.10.0/24;192.168.0.0/16|priority_networks = 172.20.80.0/16|g"
/usr/local/apache-doris/be/conf/be.conf
+start_be.sh --daemon
+echo "Apache-Doris BE initialized successfully!"
diff --git
a/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/init_fe.sh
b/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/init_fe.sh
new file mode 100644
index 0000000000..5e5522a67e
--- /dev/null
+++
b/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/init_fe.sh
@@ -0,0 +1,22 @@
+#!/bin/bash
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+echo "Start initializing Apache-Doris FE!"
+perl -pi -e "s|# priority_networks =
10.10.10.0/24;192.168.0.0/16|priority_networks = 172.20.80.0/16|g"
/usr/local/apache-doris/fe/conf/fe.conf
+start_fe.sh --daemon
+echo "Apache-Doris FE initialized successfully!"
diff --git
a/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/register.sh
b/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/register.sh
new file mode 100644
index 0000000000..9f86d28afe
--- /dev/null
+++
b/docker/rapid-deployment/docker-file/register/single_fe-single_be/shell/register.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+echo "Welcome to Apache-Doris Docker-Compose to quickly build test images!"
+echo "Start modifying the configuration files of FE and BE and run FE and BE!"
+docker cp /root/init_fe.sh doris-fe:/root/init_fe.sh
+docker exec doris-fe bash -c "/root/init_fe.sh"
+docker cp /root/init_be.sh doris-be:/root/init_be.sh
+docker exec doris-be bash -c "/root/init_be.sh"
+sleep 30
+echo "Get started with the Apache Doris registration steps!"
+mysql -h 172.20.80.2 -P 9030 -uroot -e "ALTER SYSTEM ADD BACKEND
\"172.20.80.3:9050\";"
+echo "The initialization task of Apache-Doris has been completed, please start
to experience it!"
diff --git
a/docker/rapid-deployment/docker-file/remote-doris/BERemoteDockerfile
b/docker/rapid-deployment/docker-file/remote-doris/BERemoteDockerfile
new file mode 100644
index 0000000000..12d0a67e6a
--- /dev/null
+++ b/docker/rapid-deployment/docker-file/remote-doris/BERemoteDockerfile
@@ -0,0 +1,41 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Choose a base image
+# E.g FROM openjdk:8u342-jdk
+FROM openjdk
+
+# Replace according to your needs
+# E.g ARG package_url=./
+ARG package_url=Local binary package path, concatenated with package_name to
get the complete directory
+
+# E.g ARG package_name=apache-doris-1.1.1-bin-x86.tar.gz
+ARG package_name=binary package filename
+
+# E.g ARG package_path=apache-doris-1.1.1-bin-x86
+ARG package_path=File directory name after decompression
+
+# Set environment variables
+ENV
PATH="/usr/local/apache-doris/be/bin:/usr/local/apache-doris/apache_hdfs_broker/bin:$PATH"
+
+# Deploy software
+RUN curl -o /usr/local/apache-doris.tar.gz $package_url && \
+ tar -zxvf /usr/local/apache-doris.tar.gz -C /usr/local/ && \
+ mv /usr/local/$package_path /usr/local/apache-doris && \
+ rm -rf /usr/local/$package_name /usr/local/apache-doris/fe
/usr/local/apache-doris/udf
+
+CMD ["bash"]
diff --git
a/docker/rapid-deployment/docker-file/remote-doris/FERemoteDockerfile
b/docker/rapid-deployment/docker-file/remote-doris/FERemoteDockerfile
new file mode 100644
index 0000000000..9ae24380bc
--- /dev/null
+++ b/docker/rapid-deployment/docker-file/remote-doris/FERemoteDockerfile
@@ -0,0 +1,42 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Choose a base image
+# E.g FROM openjdk:8u342-jdk
+FROM openjdk
+
+# Replace according to your needs
+# E.g ARG package_url=./
+ARG package_url=Local binary package path, concatenated with package_name to
get the complete directory
+
+# E.g ARG package_name=apache-doris-1.1.1-bin-x86.tar.gz
+ARG package_name=binary package filename
+
+# E.g ARG package_path=apache-doris-1.1.1-bin-x86
+ARG package_path=File directory name after decompression
+
+# Set environment variables
+ENV JAVA_HOME="/usr/local/openjdk-8/" \
+ PATH="/usr/local/apache-doris/fe/bin:$PATH"
+
+# Deploy software
+RUN curl -o /usr/local/apache-doris.tar.gz $package_url && \
+ tar -zxvf /usr/local/apache-doris.tar.gz -C /usr/local/ && \
+ mv /usr/local/$package_path /usr/local/apache-doris && \
+ rm -rf /usr/local/$package_name /usr/local/apache-doris/be
/usr/local/apache-doris/udf /usr/local/apache-doris/apache_hdfs_broker
+
+CMD ["bash"]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]