Docker型資料儲存庫設定
對於中小型安裝,您可以選擇使用 instana-console來設定資料庫主機。 透過使用此方法,所有必要的資料儲存庫實例都會在單一主機上作為 Docker 映像檔執行。
支援的 OS
支援的 OS 與 Docker上 Instana 後端的 支援的 OS 區段相同。
支援的 Docker 版本
支援的 Docker 版本與 Docker上 Instana 後端的 支援 Docker 版本 區段中的相同。
必要條件
Docker型資料儲存庫設定的必要條件與 Docker上 Instana 後端的 必要條件 區段中的必要條件相同。
最低需求
您要安裝 Docker型資料儲存庫的機器必須至少具有 12 個 CPU 及 10 GB 可用記憶體。 這是最低限制,僅建議用於小型安裝。
安裝 Instana 套件
若要在機器上安裝 Instana 套件,請使用下列安裝步驟:
Ubuntu/Debian
以 root 使用者身分執行下列指令以新增儲存庫,並將 <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
安裝 instana-console:
apt update -y
apt install -y instana-console
若要避免在自動化升級期間取得主要更新項目,請執行下列指令:
cat > /etc/apt/preferences.d/instana-console <<EOF
Package: instana-console
Pin: version <version to pin>
Pin-Priority: 1000
EOF
Red Hat/CentOS
以 root 使用者身分執行下列指令以新增儲存庫,並將 <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
安裝 instana-console:
yum clean expire-cache -y
yum update -y
yum install -y instana-console
若要避免在自動更新期間取得主要更新項目,請執行下列指令:
yum versionlock add instana-console
配置 db-settings.hcl
db-settings.hcl 檔是設定程序的配置檔。
附註: 基於效能原因,所有目錄都必須位於個別磁碟上。
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>"
}
會產生遺漏值 (例如 DB 認證) ,並將自動新增至 settings.hcl 檔案。
instana 主控台指令
對於主機的起始設定,請執行下列指令:
instana datastores init -f /path/to/db-settings.hcl
若要停止所有資料庫儲存器,請執行下列指令:
instana datastores stop
若要啟動所有資料庫儲存器,請執行下列指令:
instana datastores start
若要將映像檔更新至目前已安裝的 instana-console版本所決定的版本,請執行下列指令:
instana datastores update -f /path/to/db-settings.hcl
若要產生現有安裝架構的完整 settings.hcl 檔,請執行下列指令:
instana datastores settings