| #! /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 |
| # |
| # https://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. |
| # |
| |
| set -eo pipefail |
| |
| if [ $# -ne 2 ]; then |
| echo "usage: $0 instance_name root_password" >&2 |
| exit 1 |
| fi |
| |
| # |
| # Initialize Accumulo with the supplied instance name and root user password |
| # |
| accumulo init --instance-name "$1" --password "$2" |
| |
| # |
| # Launch jaegertracing and telegraf containers |
| # |
| %{ if os_distro == "centos" || os_distro == "rhel" ~} |
| sudo yum install -y docker-ce docker-ce-cli containerd.io --enablerepo=docker |
| %{ endif ~} |
| %{ if os_distro == "ubuntu" ~} |
| sudo apt-get install -y docker-ce docker-ce-cli containerd.io |
| %{ endif ~} |
| sudo systemctl enable docker |
| sudo systemctl start docker |
| |
| docker run -d --name jaeger \ |
| --restart always \ |
| -e COLLECTOR_ZIPKIN_HOST_PORT=:9411 \ |
| -p 5775:5775/udp -p 6831:6831/udp \ |
| -p 6832:6832/udp -p 5778:5778 \ |
| -p 16686:16686 -p 14268:14268 \ |
| -p 14250:14250 -p 9411:9411 \ |
| jaegertracing/all-in-one:1.29 |
| |
| docker run --ulimit nofile=66000:66000 -d \ |
| --restart always \ |
| --name tig-stack \ |
| -p 3003:3003 \ |
| -p 3004:8888 \ |
| -p 8086:8086 \ |
| -p 22022:22 \ |
| -p 8125:8125/udp \ |
| -v /data/metrics/influxdb:/var/lib/influxdb \ |
| -v /data/metrics/grafana:/var/lib/grafana \ |
| -v ${software_root}/telegraf/conf:/etc/telegraf \ |
| -v ${software_root}/grafana/dashboards:/etc/grafana/provisioning/dashboards \ |
| artlov/docker-telegraf-influxdb-grafana:latest |
| |
| # |
| # Start the Accumulo cluster |
| # accumulo-cluster start doesn't return a proper error code, so make it true here so the script doesn't fail. |
| # |
| accumulo-cluster start || true |