Add installer env preflight
This commit is contained in:
@@ -93,6 +93,14 @@ INSTALL_ENV_FILE=install.local.env ./scripts/install-vault-pass.sh
|
||||
|
||||
不要把含真實密碼/token 的 env 檔 commit。
|
||||
|
||||
執行安裝前可先檢查 env 是否足夠非互動安裝:
|
||||
|
||||
```bash
|
||||
./scripts/install-vault-pass.sh --check-env
|
||||
```
|
||||
|
||||
若輸出顯示 env 不足,installer 會在正式安裝時進入互動提示或列出缺少欄位。
|
||||
|
||||
## 3. 安裝 vault password file
|
||||
|
||||
標準位置:
|
||||
|
||||
@@ -28,6 +28,7 @@ cd agent-secret-vault
|
||||
接著安裝 vault password file:
|
||||
|
||||
```bash
|
||||
./scripts/install-vault-pass.sh --check-env
|
||||
./scripts/install-vault-pass.sh
|
||||
```
|
||||
|
||||
@@ -74,6 +75,7 @@ git push
|
||||
cd ~/projects/agent-secret-vault
|
||||
cp -n install.env.example install.env
|
||||
editor install.env
|
||||
./scripts/install-vault-pass.sh --check-env
|
||||
./scripts/install-vault-pass.sh
|
||||
```
|
||||
|
||||
@@ -87,7 +89,8 @@ editor install.env
|
||||
若 env 內含真實 secrets,不要 commit。可改用 `install.local.env`,再執行:
|
||||
|
||||
```bash
|
||||
INSTALL_ENV_FILE=install.local.env ./scripts/install-vault-pass.sh
|
||||
INSTALL_ENV_FILE=install.local.env ./scripts/install-vault-pass.sh --check-env
|
||||
./scripts/install-vault-pass.sh
|
||||
```
|
||||
|
||||
## 給 agent 的全自動安裝方式
|
||||
@@ -103,6 +106,7 @@ VAULT_PASS_URL="https://example.com/one-time/vault-pass.txt" \
|
||||
# 或:zip 密碼放在本機安全檔案
|
||||
INSTALL_VAULT_PASS_METHOD=archive \
|
||||
VAULT_PASS_ZIP_PASSWORD_FILE=/secure/path/zip-password.txt \
|
||||
./scripts/install-vault-pass.sh --check-env
|
||||
./scripts/install-vault-pass.sh
|
||||
```
|
||||
|
||||
|
||||
Reference in New Issue
Block a user