Server
Install vHSM to effectively managing identities and access controls for workloads spread across multiple clouds and on-premises environments
Installing vHSM
You can install vHSM using a docker image, helm chart, or compile from source
Pull the latest image:
docker pull harbor.enclaive.cloud/vhsm/vhsm:latestSet the enterprise license key that you received as an environment variable:
export ENCLAIVE_LICENCE=<licence-key>Start a docker container named
vhsm-containerwith the image that you pulled:
docker run -d --name vhsm-container -p 8200:8200 -p 8201:8201 -e ENCLAIVE_LICENCE="$ENCLAIVE_LICENCE" harbor.enclaive.cloud/vhsm/vhsm:latest
Check if the container is running:
docker psAccess the logs of the container to get the environment variable, unseal key, and root token details.
The output is similar to:
WARNING! dev mode is enabled! In this mode, vHSM runs entirely in-memory
and starts unsealed with a single unseal key. The root token is already
authenticated to the CLI, so you can immediately begin using Vault.
You may need to set the following environment variables:
$ export VAULT_ADDR='http://0.0.0.0:8200'
The unseal key and root token are displayed below in case you want to
seal/unseal the vHSM or re-authenticate.
Unseal Key: pafYkq2uEVve3FW7n7RM6JUK/MWEHzAxvrEdlrb4QD4=
Root Token: hvs.7oXsG8t8L198HEpB865FdpFG
Development mode should NOT be used in production installations!
Set the environment variables for accessing vHSM. Save the unseal key, and the root token. You will need these key, and token to access the vHSM UI.
You can now go to a browser and access vHSM ui at:
http://127.0.0.1:8200/
Set the enterprise license key that you received as an environment variable.
export ENCLAIVE_LICENCE=<licence-key>
Install vHSM in the Kubernetes cluster using helm.
helm install vhsm oci://harbor.enclaive.cloud/vhsm/vhsm \
--version 0.29.0 \
--set injector.enabled=false \
--set server.extraEnvironmentVars.ENCLAIVE_LICENCE="$ENCLAIVE_LICENCE"The output is similar to:
Pulled: harbor.enclaive.cloud/enclaive-dev/vhsm:0.29.0
Digest: sha256:d10c10f013efbff0275c33b5c292dd442017c85406aecebf8dc19a2302bf43af
NAME: vhsm
LAST DEPLOYED: Fri Feb 21 19:11:59 2025
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:
Thank you for installing Enclaive vHSM!
Now that you have deployed vHSM, you should look over the docs on using
Vault with Kubernetes available here:
https://docs.enclaive.cloud/virtual-hsm
Your release is named vhsm. To learn more about the release, try:
$ helm status vhsm
$ helm get manifest vhsm
Check if the Pods are running in the Kubernetes cluster:
kubectl get podsThe output is similar to:
NAME READY STATUS RESTARTS AGE
vhsm-0 0/1 Running 0 78sCheck if the services are running:
kubectl get svc
The output is similar to:
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 13m
vhsm ClusterIP 10.96.219.177 <none> 8200/TCP,8201/TCP 90s
vhsm-internal ClusterIP None <none> 8200/TCP,8201/TCP 90s
Port forwad the service to access VHSM ui:
kubectl port-forward svc/vhsm 8200:8200 8201:8201You can now go to a browser and access vHSM ui at:
http://127.0.0.1:8200/
Note: The vHSM is not initialized, and unsealed by default. You are prompted to initialize and unseal the vHSM. Initialize the VHSM using the command vhsm operator init and then unseal vHSM using the unseal keys by using the command vhsm operator unseal <unsealkey>
Prerequisites
Ensure that you have the following installed and properly configured:
Go with the
GOPATHenvironment variable setGit available in your system's
PATHSet the enterprise license key that you received as an environment variable:
export ENCLAIVE_LICENCE=<licence-key>
To compile vHSM from source.
Navigate to your
GOPATHand create the necessary directory structure:mkdir -p $GOPATH/src/github.com/enclaive && cd $_Clone the vHSM repository from GitHub:
git clone https://github.com/enclaive/vhsm.gitNavigate into the cloned repository:
cd vhsmBootstrap the project to download and compile the required libraries and tools for building vHSM.
make bootstrapBuild vHSM for your current system and place the binary in the
./bin/directory:make devTo build with the UI, use
make dev-uiThedev-uitarget only adds a build tag to include the UI if it has already been built. To include the UI, runmake static-distormake static-dist-devbefore building the main binary.Check if vHSM is installed.
vhsm -hIf
vhsmis not found, add it to your PATH:export PATH=$GOPATH/src/github.com/enclaive/vhsm/bin:$PATHTo start vHSM server in dev mode use:
vhsm server -dev -dev-root-token-id="root"
Note: To start the server in Production mode, ensure that you have the config.json file and use the command: vhsm server -config=/etc/vault/config.json
To Access the vHSM UI. Open your browser and go to: http://127.0.0.1:8200
Prerequisites
Create a EC2 instance and ensure that the Instance type is one of these supported configurations.
Ensure your EC2 instance has proper IAM permissions to pull images from ECR.
Make sure your EC2 instance's security group allows communication on the required ports.
Depending on your setup, you may need to expose specific ports for accessing services within the container.
To install and run the vhsm-aws container from Amazon ECR on your EC2 instance, follow these steps:
1. Connect to your EC2 instance.
Install and configure Docker on your EC2 instance.
sudo apt update
sudo apt install docker.io2. Install AWS CLI on your EC2 instance.
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install3. Configure AWS credentials.
aws configurewhere:
AWS Access Key ID: (Get from your AWS IAM)
AWS Secret Access Key: (Get from your AWS IAM)
Default region name: us-east-1 (or the region you are using)
Default output format: Leave it as None
4. Authenticate Docker to Amazon ECR registry where the vhsm container image is stored.
aws ecr get-login-password --region us-east-1 | docker login --username AWS --password-stdin 709825985650.dkr.ecr.us-east-1.amazonaws.com5. Pull the vhsm-aws image from ECR.
For example, to pull the image tagged as 1.4.1-0:
docker pull 709825985650.dkr.ecr.us-east-1.amazonaws.com/enclaive/vhsm:1.4.1-0Last updated
Was this helpful?