Thearas commented on code in PR #47697: URL: https://github.com/apache/doris/pull/47697#discussion_r1948835993
########## docker/thirdparties/docker-compose/ranger/ranger_official.yaml.tpl: ########## @@ -0,0 +1,68 @@ +# +# 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: + ranger-zk: + image: apache/ranger-zk:${RANGER_VERSION} + container_name: ${CONTAINER_UID}-ranger-zk + hostname: doris--ranger-zk + restart: always + ports: + - ${RANGER_ZK_PORT}:2181 + networks: + - doris--ranger + ranger-solr: + image: apache/ranger-solr:${RANGER_VERSION} + container_name: ${CONTAINER_UID}-ranger-solr + hostname: doris--ranger-solr + restart: always + ports: + - ${RANGER_SOLAR_PORT}:8983 + command: solr-precreate ranger_audits /opt/solr/server/solr/configsets/ranger_audits/ + networks: + - doris--ranger + ranger-db: + image: apache/ranger-db:${RANGER_VERSION} + container_name: ${CONTAINER_UID}-ranger-db + hostname: doris--ranger-db + restart: always + healthcheck: + test: ["CMD-SHELL", "su -c 'pg_isready -q' postgres"] + interval: 10s + timeout: 2s + retries: 30 + networks: + - doris--ranger + ranger: Review Comment: Add healthy check. ########## docker/thirdparties/docker-compose/ranger/ranger-admin/ranger-entrypoint.sh: ########## @@ -0,0 +1,36 @@ +#!/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. + +################################################################ +# This script will restart all thirdparty containers +################################################################ + +# Wait for MySQL becomes available +sleep 30 Review Comment: Use healthy check. ########## docker/thirdparties/docker-compose/ranger/script/install_doris_ranger_plugins.sh: ########## @@ -0,0 +1,22 @@ +# 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. + +#!/bin/bash +if [ ! -d "${RANGER_HOME}/ews/webapp/WEB-INF/classes/ranger-plugins/doris" ]; then + mkdir -p "${RANGER_HOME}/ews/webapp/WEB-INF/classes/ranger-plugins/doris" +fi +cd "${RANGER_HOME}/ews/webapp/WEB-INF/classes/ranger-plugins/doris" +curl -O https://doris-regression-bj.oss-cn-beijing.aliyuncs.com/regression/docker/ranger-plugins/mysql-connector-java-8.0.25.jar Review Comment: Use `-internal` domain in CI? ########## docker/thirdparties/docker-compose/ranger/ranger-admin/ranger-entrypoint.sh: ########## @@ -0,0 +1,36 @@ +#!/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. + +################################################################ +# This script will restart all thirdparty containers +################################################################ + +# Wait for MySQL becomes available +sleep 30 + +cd $RANGER_HOME Review Comment: Add `set -ex`. ########## docker/thirdparties/docker-compose/ranger/script/install_doris_service_def.sh: ########## @@ -0,0 +1,25 @@ +# 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. + +curl -O https://doris-regression-bj.oss-cn-beijing.aliyuncs.com/regression/docker/ranger-plugins/ranger-servicedef-doris.json Review Comment: Add `set -ex`. ########## docker/thirdparties/docker-compose/ranger/ranger_official.yaml.tpl: ########## @@ -0,0 +1,68 @@ +# +# 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: + ranger-zk: + image: apache/ranger-zk:${RANGER_VERSION} Review Comment: What's the difference between this file and `ranger.yaml.tpl`? ########## docker/thirdparties/run-thirdparties-docker.sh: ########## @@ -649,6 +652,19 @@ start_minio() { fi } +start_ranger() { + echo "RUN_RANGER" + export CONTAINER_UID=${CONTAINER_UID} + find "${ROOT}/docker-compose/ranger/script" -type f -exec sed -i "s/s3Endpoint/${s3Endpoint}/g" {} \; Review Comment: What's the difference between `s3Endpoint` and `${s3Endpoint}`? ########## docker/thirdparties/docker-compose/ranger/ranger_official.yaml.tpl: ########## @@ -0,0 +1,68 @@ +# +# 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: + ranger-zk: + image: apache/ranger-zk:${RANGER_VERSION} Review Comment: Forgot to add `RANGER_VERSION` into `ranger_settings.env`? ########## docker/thirdparties/docker-compose/ranger/script/install_doris_ranger_plugins.sh: ########## @@ -0,0 +1,22 @@ +# 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. + +#!/bin/bash +if [ ! -d "${RANGER_HOME}/ews/webapp/WEB-INF/classes/ranger-plugins/doris" ]; then + mkdir -p "${RANGER_HOME}/ews/webapp/WEB-INF/classes/ranger-plugins/doris" +fi +cd "${RANGER_HOME}/ews/webapp/WEB-INF/classes/ranger-plugins/doris" +curl -O https://doris-regression-bj.oss-cn-beijing.aliyuncs.com/regression/docker/ranger-plugins/mysql-connector-java-8.0.25.jar Review Comment: Add `set -ex`. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
