|
|
|
@ -136,20 +136,23 @@ PreReq: OpenPKG, openpkg >= 20160101, cfssl
|
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault status" |
|
|
|
|
echo "5. initialize database (remember unseal key and root token):" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault operator init \\%{l_nil}" |
|
|
|
|
echo " -key-shares=1 -key-threshold=1 \\%{l_nil}" |
|
|
|
|
echo " -recovery-shares=1 -recovery-threshold=1" |
|
|
|
|
echo " -key-shares=1 -key-threshold=1 \\%{l_nil}" |
|
|
|
|
echo " -recovery-shares=1 -recovery-threshold=1" |
|
|
|
|
echo " In case of a Vault cluster of N nodes use (N>K>1):" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault operator init \\%{l_nil}" |
|
|
|
|
echo " -key-shares=N -key-threshold=K \\%{l_nil}" |
|
|
|
|
echo " -recovery-shares=N -recovery-threshold=K" |
|
|
|
|
echo " -key-shares=N -key-threshold=K \\%{l_nil}" |
|
|
|
|
echo " -recovery-shares=N -recovery-threshold=K" |
|
|
|
|
echo "6. unseal database (with remembered unseal key):" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault operator unseal <key>" |
|
|
|
|
echo "7. authenticate against database (use remembered root token):" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault login -method=token" |
|
|
|
|
echo "8. write data under <name>:" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault write secret/<name> value=<value>" |
|
|
|
|
echo "9. read data under <name>:" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault read -field=value secret/<name>" |
|
|
|
|
echo "8. create key/value secret engine:" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault secrets enable \\%{l_nil}" |
|
|
|
|
echo " -version=2 -description=\"key-value store\" -path=kv kv" |
|
|
|
|
echo "9. write key/value data under <name>:" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault kv put kv/<name> <key>=<value>" |
|
|
|
|
echo "10. read key/value data under <name>:" |
|
|
|
|
echo " \$ $RPM_INSTALL_PREFIX/bin/vault kv get -field=<key> kv/<name>" |
|
|
|
|
) | %{l_rpmtool} msg -b -t notice |
|
|
|
|
elif [ $1 -eq 2 ]; then |
|
|
|
|
# after upgrade, restart service |
|
|
|
|