Skip to content

Commit

Permalink
[Issue 6274][Test] Fixed integration Pulsar SQL test failed (apache#6279
Browse files Browse the repository at this point in the history
)

* Delete no use docker image

* Add get docker images for delete docker images

* Add command for get space size

* Add delete docker images

* Fixed error

* Upgrade postgresql from version 9.6 to 11

* Delete no used image first

* Fixed delete image

* Fixed docker images order

* Add maven install step

* Add option docker.nocache=true

* Fixed correct docker image

* Fixed integration test failed

* Delete debug info
  • Loading branch information
tuteng authored Feb 9, 2020
1 parent fed8c30 commit 04ed23c
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 20 deletions.
22 changes: 10 additions & 12 deletions .github/workflows/ci-integration-sql.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,27 +46,25 @@ jobs:
with:
java-version: 1.8

- name: Set up Maven
uses: aahmed-se/setup-maven@v3
- name: remove docker node image
if: steps.docs.outputs.changed_only == 'no'
with:
maven-version: 3.6.1
run: docker rmi -f node:10 && docker rmi -f node:12 && docker rmi -f buildpack-deps:stretch

- name: build artifacts and docker image
- name: remove docker builder and microsoft image
if: steps.docs.outputs.changed_only == 'no'
run: mvn -B install -Dorg.slf4j.simpleLogger.defaultLogLevel=ERROR -Pdocker -DskipTests
run: docker rmi -f jekyll/builder:latest && docker rmi -f mcr.microsoft.com/azure-pipelines/node8-typescript:latest

- name: clean docker container
- name: run install by skip tests
if: steps.docs.outputs.changed_only == 'no'
run: docker system prune -f
run: mvn clean install -DskipTests

- name: remove docker node image
- name: build artifacts and docker pulsar latest test image
if: steps.docs.outputs.changed_only == 'no'
run: docker rmi -f node:10 && docker rmi -f node:12 && docker rmi -f buildpack-deps:stretch
run: mvn -B -f tests/docker-images/pom.xml install -am -Pdocker -DskipTests

- name: remove docker builder and microsoft image
- name: clean docker container
if: steps.docs.outputs.changed_only == 'no'
run: docker rmi -f jekyll/builder:latest && docker rmi -f mcr.microsoft.com/azure-pipelines/node8-typescript:latest
run: docker system prune -f

- name: run integration tests
if: steps.docs.outputs.changed_only == 'no'
Expand Down
2 changes: 1 addition & 1 deletion dashboard/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ RUN apt-get update
RUN apt-get -y install postgresql python sudo nginx supervisor

# Postgres configuration
COPY conf/postgresql.conf /etc/postgresql/9.6/main/
COPY conf/postgresql.conf /etc/postgresql/11/main/

# Configure nginx and supervisor
RUN echo "daemon off;" >> /etc/nginx/nginx.conf
Expand Down
8 changes: 4 additions & 4 deletions dashboard/conf/postgresql.conf
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@ synchronous_commit = off

# Default configs
data_directory = '/data'
hba_file = '/etc/postgresql/9.6/main/pg_hba.conf'
ident_file = '/etc/postgresql/9.6/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/9.6-main.pid'
hba_file = '/etc/postgresql/11/main/pg_hba.conf'
ident_file = '/etc/postgresql/11/main/pg_ident.conf'
external_pid_file = '/var/run/postgresql/11-main.pid'

port = 5432
max_connections = 100

datestyle = 'iso, mdy'
default_text_search_config = 'pg_catalog.english'
stats_temp_directory = '/var/run/postgresql/9.6-main.pg_stat_tmp'
stats_temp_directory = '/var/run/postgresql/11-main.pg_stat_tmp'
timezone = 'UTC'
log_timezone = 'UTC'
2 changes: 1 addition & 1 deletion dashboard/init-postgres.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ set -x -e
rm -rf /data/*
chown -R postgres: /data
chmod 700 /data
sudo -u postgres /usr/lib/postgresql/9.6/bin/initdb /data/
sudo -u postgres /usr/lib/postgresql/11/bin/initdb /data/
sudo -u postgres /etc/init.d/postgresql start
sudo -u postgres psql --command "CREATE USER docker WITH PASSWORD 'docker';"
sudo -u postgres createdb -O docker pulsar_dashboard
Expand Down
4 changes: 2 additions & 2 deletions docker/pulsar-standalone/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,13 @@ COPY --from=dashboard /pulsar/conf/* /pulsar/conf/
# Note that the libpq-dev package is needed here in order to install
# the required python psycopg2 package (for postgresql) later
RUN apt-get update
RUN apt-get -y install python2.7 python-pip postgresql-9.6 sudo nginx supervisor libpq-dev
RUN apt-get -y install python2.7 python-pip postgresql sudo nginx supervisor libpq-dev

# Python dependencies
RUN pip2 install -r /pulsar/django/requirements.txt

# Postgres configuration
COPY --from=dashboard /etc/postgresql/9.6/main/postgresql.conf /etc/postgresql/9.6/main/postgresql.conf
COPY --from=dashboard /etc/postgresql/11/main/postgresql.conf /etc/postgresql/11/main/postgresql.conf

# Configure supervisor
COPY --from=dashboard /etc/supervisor/conf.d/supervisor-app.conf /etc/supervisor/conf.d/supervisor-app.conf
Expand Down

0 comments on commit 04ed23c

Please sign in to comment.