Skip to content

Commit

Permalink
Verbose logging of commands and config files
Browse files Browse the repository at this point in the history
Signed-off-by: Shubhendu Ram Tripathi <shubhendu@minio.io>
  • Loading branch information
shtripat committed Jan 10, 2024
1 parent 4860420 commit 70ae8e8
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions kesconf/testdata/vault/deploy_vault.sh
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,21 @@ function install_kes() {

function setup_vault() {
# Create vault certs
echo "Run: kes identity new --key vault.key --cert vault.crt --ip \"127.0.0.1\" localhost"
kes identity new --key vault.key --cert vault.crt --ip "127.0.0.1" localhost
mkdir -p /vault/file
mkdir -p /vault/file || sudo mkdir -p /vault/file

# Start vaule server
# Start vault server
echo "Starting vault server...."
echo "Run: vault server -config \"${GITHUB_WORKSPACE}\"/kesconf/testdata/vault/vault-config.json &"
vault server -config "${GITHUB_WORKSPACE}"/kesconf/testdata/vault/vault-config.json &

# Generate certs for KES
echo "Run: kes identity new --ip \"127.0.0.1\" localhost --cert public.crt --key private.key"
kes identity new --ip "127.0.0.1" localhost --cert public.crt --key private.key

# Generate certs for client application (to be used by test)
echo "Run: kes identity new --key=client.key --cert=client.crt MyApp"
kes identity new --key=client.key --cert=client.crt MyApp

client_id=$(kes identity of client.crt | awk '{print $1}')
Expand Down Expand Up @@ -100,6 +105,10 @@ function setup_vault() {
kes_key="${kes_private_key}" yq e -i '.tls.key = strenv(kes_key)' "${GITHUB_WORKSPACE}"/kesconf/testdata/vault/kes-config-vault.yml
kes_cert="${kes_public_cert}" yq e -i '.tls.cert = strenv(kes_cert)' "${GITHUB_WORKSPACE}"/kesconf/testdata/vault/kes-config-vault.yml
vault_cert="${vault_public_cert}" yq e -i '.keystore.vault.tls.ca = strenv(vault_cert)' "${GITHUB_WORKSPACE}"/kesconf/testdata/vault/kes-config-vault.yml

echo "Content of \"${GITHUB_WORKSPACE}\"/kesconf/testdata/vault/kes-config-vault.yml"
cat "${GITHUB_WORKSPACE}"/kesconf/testdata/vault/kes-config-vault.yml
echo ""
}

main "$@"

0 comments on commit 70ae8e8

Please sign in to comment.