Skip to content
This repository has been archived by the owner on Oct 7, 2022. It is now read-only.

Latest commit

 

History

History
52 lines (34 loc) · 1.17 KB

local-dev.md

File metadata and controls

52 lines (34 loc) · 1.17 KB

Setting up a local development environment

You'll first need Go properly installed on your machine. You can follow Go's documentation on how to get started.

  • Clone this repository inside Go's workspace. The workspace path is generally mapped into the GOPATH environment variable.
git clone git@github.com:erozario/vault-auth-google.git $GOPATH/src
  • Create a temporary directory to compile the plugin into and to use as the plugin directory for Vault.
mkdir -p /tmp/vault-plugins
  • Compile the plugin into the temporary directory.
cd $GOPATH/src/vault-auth-google && go build -o /tmp/vault-plugins/vault-auth-google
  • Create a configuration file that sets the temporary directory as the Vault's plugin directory.
tee /tmp/vault.hcl <<EOF
plugin_directory = "/tmp/vault-plugins"
EOF
  • Start the Vault server in development mode, referencing the configuration file.
vault server -dev -dev-root-token-id="root" -config=/tmp/vault.hcl &
  • Leave this running and open a new tab or terminal window. Authenticate to Vault:
export VAULT_ADDR='http://127.0.0.1:8200'
vault login root