blob: 924f125cfaf298b12eb252501aa50a6045312276 [file]
# 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.
services:
# Core Audit Server Service - Receives audits from plugins and produces to Kafka
ranger-audit-server:
build:
context: .
dockerfile: Dockerfile.ranger-audit-server
args:
- RANGER_BASE_IMAGE=${RANGER_BASE_IMAGE}
- RANGER_BASE_VERSION=${RANGER_BASE_VERSION}
- RANGER_VERSION=${RANGER_VERSION}
- KERBEROS_ENABLED=${KERBEROS_ENABLED}
image: ranger-audit-server:latest
container_name: ranger-audit-server
hostname: ranger-audit-server.rangernw
stdin_open: true
tty: true
depends_on:
ranger-kdc:
condition: service_started
ranger-kafka:
condition: service_started
ports:
- "7081:7081"
- "7182:7182"
environment:
JAVA_HOME: /opt/java/openjdk
AUDIT_SERVER_HOME_DIR: /opt/ranger/audit-server
AUDIT_SERVER_CONF_DIR: /opt/ranger/audit-server/conf
AUDIT_SERVER_LOG_DIR: /var/log/ranger/audit-server
AUDIT_SERVER_HEAP: "-Xms512m -Xmx2g"
RANGER_VERSION: ${RANGER_VERSION}
KERBEROS_ENABLED: ${KERBEROS_ENABLED}
KAFKA_BOOTSTRAP_SERVERS: ranger-kafka.rangernw:9092
networks:
- ranger
volumes:
- ./dist/keytabs/ranger-audit-server:/etc/keytabs
- ranger-audit-server-logs:/var/log/ranger/audit-server
- ranger-audit-server-spool:/var/log/ranger/audit-server/audit
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7081/api/audit/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# Solr Consumer Service - Consumes from Kafka and indexes to Solr
ranger-audit-consumer-solr:
build:
context: .
dockerfile: Dockerfile.ranger-audit-consumer-solr
args:
- RANGER_BASE_IMAGE=${RANGER_BASE_IMAGE}
- RANGER_BASE_VERSION=${RANGER_BASE_VERSION}
- RANGER_VERSION=${RANGER_VERSION}
- KERBEROS_ENABLED=${KERBEROS_ENABLED}
image: ranger-audit-consumer-solr:latest
container_name: ranger-audit-consumer-solr
hostname: ranger-audit-consumer-solr.rangernw
stdin_open: true
tty: true
depends_on:
ranger-kdc:
condition: service_started
ranger-kafka:
condition: service_started
ranger-solr:
condition: service_started
ranger-audit-server:
condition: service_healthy
ports:
- "7091:7091"
environment:
JAVA_HOME: /opt/java/openjdk
AUDIT_CONSUMER_HOME_DIR: /opt/ranger/audit-consumer-solr
AUDIT_CONSUMER_CONF_DIR: /opt/ranger/audit-consumer-solr/conf
AUDIT_CONSUMER_LOG_DIR: /var/log/ranger/audit-consumer-solr
AUDIT_CONSUMER_HEAP: "-Xms512m -Xmx2g"
RANGER_VERSION: ${RANGER_VERSION}
KERBEROS_ENABLED: ${KERBEROS_ENABLED}
KAFKA_BOOTSTRAP_SERVERS: ranger-kafka.rangernw:9092
SOLR_URL: http://ranger-solr.rangernw:8983/solr
networks:
- ranger
volumes:
- ./dist/keytabs/ranger-audit-consumer-solr:/etc/keytabs
- ranger-audit-consumer-solr-logs:/var/log/ranger/audit-consumer-solr
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7091/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
# HDFS Consumer Service - Consumes from Kafka and writes to HDFS
ranger-audit-consumer-hdfs:
build:
context: .
dockerfile: Dockerfile.ranger-audit-consumer-hdfs
args:
- RANGER_BASE_IMAGE=${RANGER_BASE_IMAGE}
- RANGER_BASE_VERSION=${RANGER_BASE_VERSION}
- RANGER_VERSION=${RANGER_VERSION}
- KERBEROS_ENABLED=${KERBEROS_ENABLED}
image: ranger-audit-consumer-hdfs:latest
container_name: ranger-audit-consumer-hdfs
hostname: ranger-audit-consumer-hdfs.rangernw
stdin_open: true
tty: true
depends_on:
ranger-kdc:
condition: service_started
ranger-kafka:
condition: service_started
ranger-hadoop:
condition: service_healthy
ranger-audit-server:
condition: service_healthy
ports:
- "7092:7092"
environment:
JAVA_HOME: /opt/java/openjdk
AUDIT_CONSUMER_HOME_DIR: /opt/ranger/audit-consumer-hdfs
AUDIT_CONSUMER_CONF_DIR: /opt/ranger/audit-consumer-hdfs/conf
AUDIT_CONSUMER_LOG_DIR: /var/log/ranger/audit-consumer-hdfs
AUDIT_CONSUMER_HEAP: "-Xms512m -Xmx2g"
RANGER_VERSION: ${RANGER_VERSION}
KERBEROS_ENABLED: ${KERBEROS_ENABLED}
KAFKA_BOOTSTRAP_SERVERS: ranger-kafka.rangernw:9092
HDFS_NAMENODE: ranger-hadoop.rangernw:9000
networks:
- ranger
volumes:
- ./dist/keytabs/ranger-audit-consumer-hdfs:/etc/keytabs
- ranger-audit-consumer-hdfs-logs:/var/log/ranger/audit-consumer-hdfs
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:7092/api/health"]
interval: 30s
timeout: 10s
retries: 3
start_period: 60s
volumes:
ranger-audit-server-logs:
ranger-audit-server-spool:
ranger-audit-consumer-solr-logs:
ranger-audit-consumer-hdfs-logs:
networks:
ranger:
name: rangernw
external: true