Skip to content

Commit

Permalink
[ADH-5361] Actualize Docker demo stand
Browse files Browse the repository at this point in the history
  • Loading branch information
tigrulya-exe committed Nov 20, 2024
1 parent 4155b18 commit 1b53bcc
Show file tree
Hide file tree
Showing 6 changed files with 81 additions and 17 deletions.
40 changes: 40 additions & 0 deletions supports/tools/docker/multihost/conf/smart-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -655,4 +655,44 @@
Whether to enable unsuccessful REST server auth attempts.
</description>
</property>

<property>
<name>smart.metrics.enabled</name>
<value>true</value>
<description>
Whether to enable metrics collection and export.
</description>
</property>

<property>
<name>smart.metrics.jmx.enabled</name>
<value>true</value>
<description>
Whether to enable JMX metrics exporter.
</description>
</property>

<property>
<name>smart.metrics.jmx.domain</name>
<value>metrics</value>
<description>
Default domain for JMX exporter.
</description>
</property>

<property>
<name>smart.metrics.prometheus.enabled</name>
<value>true</value>
<description>
Whether to enable Prometheus metrics exporter.
</description>
</property>

<property>
<name>smart.metrics.db.queries.enabled</name>
<value>true</value>
<description>
Whether to enable SQL queries statistics export.
</description>
</property>
</configuration>
34 changes: 34 additions & 0 deletions supports/tools/docker/multihost/conf/smart-env.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#!/usr/bin/env 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.

# It's better to have JAVA_HOME configured through this file in the following way
# when starting a distributed SSM cluster. Or in some cases, it may leads to some
# error (cases reported on Ubuntu OS).
#export JAVA_HOME=


# Parameters used to start SSM Server JVM
export SSM_SERVER_JAVA_OPT="-Dcom.sun.management.jmxremote.rmi.port=3333 -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.port=3333 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

# Parameters used to start SSM Agent JVM
export SSM_AGENT_JAVA_OPT="-Dcom.sun.management.jmxremote.rmi.port=3334 -Djava.rmi.server.hostname=localhost -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.port=3334 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false"

# Common parameters used to start JVM both for SSM Server and Agent
#export SSM_JAVA_OPT=

# Set Hadoop native lib path for SSM compression use. Generally, the path is $HADOOP_HOME/lib/native
# export LD_LIBRARY_PATH=
8 changes: 0 additions & 8 deletions supports/tools/docker/multihost/conf/smart-site.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,6 @@
<name>smart.server.rpc.address</name>
<value>ssm-server.demo:7042</value>
</property>
<property>
<name>smart.agent.address</name>
<value>hadoop-datanode.demo:7048</value>
</property>
<property>
<name>smart.agent.master.address</name>
<value>hadoop-datanode.demo:7051</value>
</property>
<property>
<name>smart.rule.executors</name>
<value>5</value>
Expand Down
6 changes: 6 additions & 0 deletions supports/tools/docker/multihost/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ services:
- "9864:9864"
- "7048:7048"
- "7051:7051"
# SSM Agent web server port
- "18081:8081"
# JMX port
- "3334:3334"
env_file:
- hadoop.env
healthcheck:
Expand All @@ -67,6 +71,8 @@ services:
ports:
- "7042:7042"
- "8081:8081"
# JMX port
- "3333:3333"
healthcheck:
test: curl http://ssm-server.demo:8081 || exit 1
interval: 30s
Expand Down
2 changes: 0 additions & 2 deletions supports/tools/docker/multihost/kerberos/kdc-init.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ kadmin.local -q "add_principal -randkey HTTP/ssm-server.demo@DEMO"
kadmin.local -q "add_principal -randkey HTTP/hadoop-datanode.demo@DEMO"
kadmin.local -q "add_principal -randkey ssm/ssm-server.demo@DEMO"
kadmin.local -q "add_principal -randkey agent/hadoop-datanode.demo@DEMO"
kadmin.local -q "add_principal -randkey agent/ssm-server.demo@DEMO"
kadmin.local -q "add_principal -randkey yarn/hadoop-namenode.demo@DEMO"
kadmin.local -q "add_principal -pw krb_pass1 krb_user1@DEMO"
kadmin.local -q "add_principal -pw krb_pass2 krb_user2@DEMO"
Expand All @@ -46,7 +45,6 @@ kadmin.local -q "xst -kt /tmp/secrets/http.keytab HTTP/ssm-server.demo@DEMO" &&
kadmin.local -q "xst -kt /tmp/secrets/http.keytab HTTP/hadoop-datanode.demo@DEMO" && chown appuser:appuser /tmp/secrets/http.keytab
kadmin.local -q "xst -kt /tmp/secrets/ssm.keytab ssm/ssm-server.demo@DEMO" && chown appuser:appuser /tmp/secrets/ssm.keytab
kadmin.local -q "xst -kt /tmp/secrets/agent.keytab agent/hadoop-datanode.demo@DEMO" && chown appuser:appuser /tmp/secrets/agent.keytab
kadmin.local -q "xst -kt /tmp/secrets/agent.keytab agent/ssm-server.demo@DEMO" && chown appuser:appuser /tmp/secrets/agent.keytab
kadmin.local -q "xst -kt /tmp/secrets/yarn.keytab yarn/hadoop-namenode.demo@DEMO" && chown appuser:appuser /tmp/secrets/yarn.keytab
echo ""

Expand Down
8 changes: 1 addition & 7 deletions supports/tools/docker/multihost/ssm/ssm-server-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,11 @@ echo "export SMART_CONF_DIR=${SSM_HOME}/conf/" >> /root/.bashrc
cd $SSM_HOME || exit

echo "---------------------------"
echo "Starting SSM server locally"
echo "Starting SSM server and agents"
echo "---------------------------"

source bin/start-ssm.sh --config ${SSM_HOME}/conf/ &
wait_for_it $(hostname -f):8081

echo "-------------------"
echo "Starting SSM agents"
echo "-------------------"

source bin/start-agent.sh &
wait_for_it hadoop-datanode.demo:7048

tail -f /var/log/ssm/*

0 comments on commit 1b53bcc

Please sign in to comment.