コンテンツにスキップ

シングルノードで始める (バイナリ + systemd)

これは本番に近い形での最初のインストールです。1 台の Linux ホスト、1 つの静的 バイナリ、systemd、組み込みの SQLite ストア — そして実際の初回実行経路 (ワンタイムセットアップトークン、デフォルトで TLS 有効、デフォルト認証情報なし、 デモデータなし)です。これを終えると、実際のソースを接続し、アクセスグラフが 投入された状態で、Olivares AI がハードニングされたサービスとして稼働します。

これはクイックスタートが 5 分でデモするのと同じエンジンです。 違いは姿勢です。まず即座に見て回りたい場合は、クイックスタートを実行してから、 実際のインストールのためにここに戻ってきてください。

  • systemd と curl を備えた Linux ホスト。
  • Go 1.26+. Build this tutorial from source; Olivares 0.4 is the next release, not yet published.

1. バイナリをビルドしてインストールする

Section titled “1. バイナリをビルドしてインストールする”
  1. 1 つの静的アーティファクト(エンジン + 組み込み web UI + ファーストパーティ コネクタ)をビルドします:

    ターミナルウィンドウ
    task build # produces ./bin/olivares
    ./bin/olivares version
  2. それをインストールし、サービスユーザーを作成します:

    ターミナルウィンドウ
    sudo install -m 0755 bin/olivares /usr/local/bin/olivares
    sudo useradd --system --home /var/lib/olivares --shell /usr/sbin/nologin olivares

2. ハードニングされた systemd サービスとして実行する

Section titled “2. ハードニングされた systemd サービスとして実行する”

/etc/systemd/system/olivares.service を作成します:

[Unit]
Description=Olivares AI — self-hosted engine for enterprise AI
Documentation=https://olivares.ai/docs
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=olivares
Group=olivares
ExecStart=/usr/local/bin/olivares serve \
--listen 127.0.0.1:8443 \
--grpc-listen 127.0.0.1:8444 \
--data-dir /var/lib/olivares
Restart=on-failure
RestartSec=5
# The data directory holds the SQLite store, the audit signing key and the TLS
# material. StateDirectory creates /var/lib/olivares owned by the service user.
StateDirectory=olivares
StateDirectoryMode=0700
UMask=0077
# Hardening (mirrors the container posture: non-root, read-only, no escalation)
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictSUIDSGID=true
RestrictRealtime=true
LockPersonality=true
MemoryDenyWriteExecute=true
SystemCallArchitectures=native
CapabilityBoundingSet=
AmbientCapabilities=
ReadWritePaths=/var/lib/olivares
[Install]
WantedBy=multi-user.target
ターミナルウィンドウ
sudo systemctl daemon-reload
sudo systemctl enable --now olivares

エンジンはデフォルトですべてのインターフェース(:8443)にバインドします。これは サーバーだからです。上のコマンドは --listen 127.0.0.1:8443 を渡し、このチュートリアルの インストールを今いるホストだけに制限しています。これは明示的な決定です — その 2 つの フラグを外せばコンソールはネットワークから応答します。そのときは独自のイングレスと TLS を 手前に置いてください(ハードニングを参照)。

3. ワンタイムセットアップトークンを取得する

Section titled “3. ワンタイムセットアップトークンを取得する”

新規インストールには デフォルト認証情報がありません。初回起動時、エンジンは 使い捨てのセットアップトークン(olst_…)を生成し、それを stdout のみ に 出力します — systemd の下では、それは journal です:

ターミナルウィンドウ
journalctl -u olivares -o cat | sed -n '/FIRST-BOOT SETUP/,/========================/p'
=== FIRST-BOOT SETUP ===
No accounts exist yet. Open the console and create the first administrator
with this one-time token — setup also creates your first organization and
makes that administrator its owner:
Console: https://127.0.0.1:8443
Token: olst_…
The console serves HTTPS with a self-signed certificate on first boot — your
browser will warn once; that is expected.
Passkeys will not work at that address:
a browser will not run a passkey ceremony at an IP address. Reach the
console by a host name.
On this machine the same console also answers at
https://localhost:8443
and at that address the relying party is derived from the name, which the
verifier accepts.
The token is shown ONCE and is
single-use. Prefer the API? POST /v1/setup {"token":"…","email":"…",
"password":"…"} — add "organization":"…" to name it (default: "Default
Organization"). The reply carries the new organization's tenant_id.
========================

最初の管理者を作成してログインします:

ターミナルウィンドウ
SETUP="olst_…" # from the banner above
curl -ksf -X POST https://127.0.0.1:8443/v1/setup \
-H 'Content-Type: application/json' \
-d "{\"token\":\"$SETUP\",\"email\":\"you@example.com\",\"password\":\"<strong-password>\"}"
TOKEN="$(curl -ksf -X POST https://127.0.0.1:8443/v1/auth/login \
-H 'Content-Type: application/json' \
-d '{"email":"you@example.com","password":"<strong-password>"}' \
| python3 -c 'import sys,json;print(json.load(sys.stdin)["token"])')"

初期設定で組織はすでに作成されています。製品内のすべてはテナントスコープなので、 ソースを接続するためにそのテナント ID を取得します:

ターミナルウィンドウ
TENANT="$(curl -ksf https://127.0.0.1:8443/v1/auth/whoami \
-H "Authorization: Bearer $TOKEN" \
| python3 -c 'import sys,json;print(json.load(sys.stdin)["grants"][0]["tenant"])')"
echo "tenant: $TENANT"

5. 最初の実際のソースを接続する

Section titled “5. 最初の実際のソースを接続する”

ソースは OLIVARES_SOURCES_CONFIG で名前を指定された、オペレーター所有の 1 つの JSON ファイルで宣言され、エンジンが起動する前に読み込まれます。以下は PostgreSQL の pgAudit ソース(クリーンティアの R/RW シグナル — Postgres 側のセットアップは pgAudit ガイドを参照)です:

ターミナルウィンドウ
sudo mkdir -p /etc/olivares
sudo tee /etc/olivares/sources.json >/dev/null <<JSON
{"sources":[{
"name": "salesdb-pgaudit",
"kind": "pgaudit",
"tenant": "$TENANT",
"config": { "log_path": "/var/log/postgresql/postgresql.csv", "format": "csvlog" }
}]}
JSON
sudo chmod 0600 /etc/olivares/sources.json && sudo chown olivares: /etc/olivares/sources.json

drop-in でサービスをそこに向け、再起動します:

ターミナルウィンドウ
sudo systemctl edit olivares
[Service]
Environment=OLIVARES_SOURCES_CONFIG=/etc/olivares/sources.json
ReadOnlyPaths=/etc/olivares
ターミナルウィンドウ
sudo systemctl restart olivares
journalctl -u olivares -o cat | grep "ingest: wired source"
ingest: wired source (in-process fast-path) name=salesdb-pgaudit kind=pgaudit

何も接続されていない場合、エンジンは空のマップ上で健全に見せかけるのではなく、 正直にそう述べます — 正確な警告とそれぞれの意味については トラブルシューティングを参照してください。

新規インストールでは、accessmap は無効です。管理者として Settings > Edition & modules で accessmap を有効にし、ほかの選択済み モジュールも有効のままにしてください。CLI を使う場合は、まず olivares login でこのエンジンに管理者としてログインし、次に olivares modules on accessmap を実行します。 続行する前に、毎回のエンジン再起動が完了するのを待ってください。実行中の セッションは停止し、再開できます。有効にしないと、これらの API 呼び出しは 404 module_not_enabled を返します。

ターミナルウィンドウ
curl -ksf "https://127.0.0.1:8443/v1/m/accessmap/graph?limit=200" \
-H "Authorization: Bearer $TOKEN" -H "X-Olivares-Tenant: $TENANT" | python3 -m json.tool
curl -ksf "https://127.0.0.1:8443/v1/m/accessmap/drift" \
-H "Authorization: Bearer $TOKEN" -H "X-Olivares-Tenant: $TENANT" | python3 -m json.tool

同じグラフは https://127.0.0.1:8443 の組み込み web UI でレンダリングされます (ワークステーションからはトンネルします: ssh -L 8443:127.0.0.1:8443 <host>)。

データディレクトリ内の 2 つのアーティファクトが、インシデントを越えて証拠が 生き残るかどうかを決定します — それらに 今すぐ 対処してください、後でではなく:

アーティファクト なぜ重要か アクション
audit-signing.key 追記専用の監査台帳に署名する。失われると、台帳は再検証できなくなる。エンジンは初回起動時に 警告 するのみ — 強制されたエスクローはない。 今日、0600 権限でボックス外にバックアップする。
台帳の公開鍵 公開鍵の ボックス外 のコピーこそが、ホスト侵害後に検証を攻撃者耐性のあるものにする。 curl -ksf https://127.0.0.1:8443/v1/audit/pubkey を実行し、結果をボックス外に保管する。

その後、実際のバックアップをスケジュールします — olivares dr backup は暗号化され、 台帳の連続性が保たれるバンドルを生成します。 バックアップとリストアガイドが、リストア訓練を含む 完全な手順です。

エンジンは HTTP リスナー上に /livez(プロセス稼働)、/readyz(ストア到達可能 — これが可用性 SLI)、/metrics(Prometheus)を公開します:

ターミナルウィンドウ
curl -ks https://127.0.0.1:8443/readyz
# {"leader":true,"setup_required":false,"status":"ok","store":"up"}

メトリックセット、SLO ターゲット、同梱のアラートルールについては Prometheus でモニタリングを参照してください。