Use 1c1d docker to run python and influxdb protocal IT (#7703)

This commit is contained in:
Haonan 2022-10-24 22:00:49 +08:00 committed by GitHub
parent 22e0c55a27
commit e9a5850eb4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 143 additions and 7 deletions

View File

@ -19,3 +19,4 @@
*
!distribution
!docker/src/main/DockerCompose/start-1c1d.sh

View File

@ -53,11 +53,11 @@ jobs:
run: mvn -B clean install -pl distribution,client-py -am -DskipTests
- name: Build IoTDB server docker image
run: |
docker build . -f docker/src/main/Dockerfile-single -t "iotdb:dev"
docker build . -f docker/src/main/Dockerfile-1c1d -t "iotdb:dev"
docker images
- name: Install IoTDB python client requirements
run: pip3 install -r client-py/requirements_dev.txt
- name: Integration test
shell: bash
run: |
cd client-py && pytest .
cd client-py && pytest --ignore=tests/test_template.py

View File

@ -61,7 +61,7 @@ jobs:
- name: Build Docker Image
run: |
docker build . -f docker/src/main/Dockerfile-single-influxdb -t "apache/iotdb:influxdb-protocol-on"
docker build . -f docker/src/main/Dockerfile-1c1d-influxdb -t "apache/iotdb:influxdb-protocol-on"
docker images
- name: IT Test

View File

@ -17,10 +17,10 @@
#
# Pandas Export
pandas~=1.3.5
pandas>=1.3.5
# Testcontainer
testcontainers==3.3.0
numpy~=1.21.4
numpy>=1.21.4
# SQLAlchemy Dialect
sqlalchemy == 1.3.20
sqlalchemy-utils == 0.36.8

View File

@ -78,8 +78,8 @@ def test_non_time_query():
"FLOAT",
"GORILLA",
"SNAPPY",
None,
None,
"null",
"null",
]
],
)

View File

@ -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.
#
nohup /iotdb/sbin/start-confignode.sh > /dev/null 2>&1 &
sleep 5
/iotdb/sbin/start-datanode.sh

View File

@ -0,0 +1,56 @@
#
# 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.
#
# docker build context is the root path of the repository
FROM openjdk:11-jre-slim
ADD distribution/target/apache-iotdb-*-all-bin.zip /
ADD docker/src/main/DockerCompose/start-1c1d.sh /
RUN apt update \
&& apt install lsof dos2unix procps unzip -y \
&& unzip /apache-iotdb-*-bin.zip -d / \
&& rm /apache-iotdb-*-bin.zip \
&& mv /apache-iotdb-* /iotdb \
&& mv /start-1c1d.sh /iotdb/sbin \
&& apt remove unzip -y \
&& apt autoremove -y \
&& apt purge --auto-remove -y \
&& apt clean -y \
RUN dos2unix /iotdb/sbin/start-1c1d.sh
RUN dos2unix /iotdb/sbin/start-confignode.sh
RUN dos2unix /iotdb/sbin/../conf/confignode-env.sh
RUN dos2unix /iotdb/sbin/start-datanode.sh
RUN dos2unix /iotdb/sbin/../conf/datanode-env.sh
EXPOSE 6667
EXPOSE 31999
EXPOSE 5555
EXPOSE 8086
EXPOSE 8181
EXPOSE 22278
EXPOSE 22277
EXPOSE 8777
EXPOSE 9003
EXPOSE 40010
EXPOSE 50010
VOLUME /iotdb/data
VOLUME /iotdb/logs
ENV PATH="/iotdb/sbin/:/iotdb/tools/:${PATH}"
ENTRYPOINT ["/iotdb/sbin/start-1c1d.sh"]

View File

@ -0,0 +1,57 @@
#
# 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.
#
# docker build context is the root path of the repository
FROM openjdk:11-jre-slim
ADD distribution/target/apache-iotdb-*-all-bin.zip /
ADD docker/src/main/DockerCompose/start-1c1d.sh /
RUN apt update \
&& apt install lsof dos2unix procps unzip -y \
&& unzip /apache-iotdb-*-bin.zip -d / \
&& rm /apache-iotdb-*-bin.zip \
&& mv /apache-iotdb-* /iotdb \
&& mv /start-1c1d.sh /iotdb/sbin \
&& sed -i '/^# enable_influxdb_rpc_service=false/a enable_influxdb_rpc_service=true' /iotdb/sbin/../conf/iotdb-datanode.properties \
&& apt remove unzip -y \
&& apt autoremove -y \
&& apt purge --auto-remove -y \
&& apt clean -y
RUN dos2unix /iotdb/sbin/start-1c1d.sh
RUN dos2unix /iotdb/sbin/start-confignode.sh
RUN dos2unix /iotdb/sbin/../conf/confignode-env.sh
RUN dos2unix /iotdb/sbin/start-datanode.sh
RUN dos2unix /iotdb/sbin/../conf/datanode-env.sh
EXPOSE 6667
EXPOSE 31999
EXPOSE 5555
EXPOSE 8086
EXPOSE 8181
EXPOSE 22278
EXPOSE 22277
EXPOSE 8777
EXPOSE 9003
EXPOSE 40010
EXPOSE 50010
VOLUME /iotdb/data
VOLUME /iotdb/logs
ENV PATH="/iotdb/sbin/:/iotdb/tools/:${PATH}"
ENTRYPOINT ["/iotdb/sbin/start-1c1d.sh"]