Single-host datastore setup

For small to medium installations, you are offered the option to set up a database host by using instana-console. By using this method, all required data store instances are run as Docker images on a single host.

Supported OS

The supported OS is the same as in the Supported OS section of Instana backend on Docker.

Supported Docker versions

The supported Docker versions are the same as in the Supported Docker versions section of Instana backend on Docker.

Prerequisites

  • To authenticate against Instana Docker repository, make sure that the host machine where you want to install the Instana backend can connect to auth-infra.instana.io:443.

  • All installation and update commands must be run as root user.

  • You must install Docker, and ensure that at least 10 GB of free space is available for Docker images.

  • For more information on how to install Docker, see the Docker CE or Docker EE documentation.

  • Create directories, which are mounted into the Docker containers:

    • Data stores

    Defaults to /mnt/data.

    • Cassandra

    Do not use the same volume for production installations (defaults to /mnt/metrics).

    • ClickHouse

    Do not use the same volume for production installations. Defaults to /mnt/traces.

    • Logs

    Defaults to /var/log/instana.

Installing the Instana package

To install the Instana package on your machine, use the following installation steps:

Ubuntu/Debian

As root, run the following command to add the repo, replacing <download_key> with your download key:

export DOWNLOAD_KEY="<download_key>"

echo 'deb [signed-by=/usr/share/keyrings/instana-archive-keyring.gpg] https://artifact-public.instana.io/artifactory/rel-debian-public-virtual generic main' > /etc/apt/sources.list.d/instana-product.list

cat << EOF > /etc/apt/auth.conf
machine artifact-public.instana.io
  login _
  password $DOWNLOAD_KEY
EOF

wget -O- --user=_ --password="$DOWNLOAD_KEY" https://artifact-public.instana.io/artifactory/api/security/keypair/public/repositories/rel-debian-public-virtual | gpg --dearmor > /usr/share/keyrings/instana-archive-keyring.gpg

Installing instana-console:

apt update -y
apt install -y instana-console

To avoid getting major updates during automated upgrades, run the following commands:

cat > /etc/apt/preferences.d/instana-console <<EOF
Package: instana-console
Pin: version <version to pin>
Pin-Priority: 1000
EOF

Red Hat/CentOS

As root, run the following command to add the repo, replacing <download_key> with your download key:

export DOWNLOAD_KEY="<download_key>"

cat << EOF > /etc/yum.repos.d/Instana-Product.repo
[instana-product]
name=Instana-Product
baseurl=https://_:$DOWNLOAD_KEY@artifact-public.instana.io/artifactory/rel-rpm-public-virtual/
enabled=1
gpgcheck=0
gpgkey=https://_:$DOWNLOAD_KEY@artifact-public.instana.io/artifactory/api/security/keypair/public/repositories/rel-rpm-public-virtual
repo_gpgcheck=1
EOF

Installing instana-console:

yum clean expire-cache -y
yum update -y
yum install -y instana-console

To avoid getting major updates during automated updates, run the following command:

yum versionlock add instana-console

Configuring db-settings.hcl

The db-settings.hcl file is the configuration file for the setup process.

Note: All directories must be on separate disks for performance reasons.

type      = "single-db"
host_name = "<IP-accessible-from-the-k8s-cluster>"

dir {
  metrics    = "/mnt/metrics"  // data dir for metrics
  traces     = "/mnt/traces"   // data dir for traces
  data       = "/mnt/data"    // data dir for any other data
  logs       = "/var/log/instana" // log dir
}

docker_repository {
  base_url = "artifact-public.instana.io"
  username = "_"
  password = "<Your-agent-key>"
}

Missing values like DB credentials are generated and will be added to the settings.hcl file automatically.

instana-console Commands

For initial setup of the host, run the following command:

instana datastores init -f /path/to/db-settings.hcl

To stop all database containers, run the following command:

instana datastores stop

To start all database containers, run the following command:

instana datastores start

To update images to the version determined by the currently installed version of instana-console, run the following command:

instana datastores update -f /path/to/db-settings.hcl

To generate a complete settings.hcl file of an existing installation, run the following command:

instana datastores settings