Install the WebApi
Example with Docker Compose on a Linux host (/opt/hypervcsi-api):
/opt/hypervcsi-api/ docker-compose.yml ssh/known_hosts # host keys of all Hyper-V nodes (ssh-keyscan) ssh/id_ed25519 # only for RemotingMethod=SshKey secrets/appsettings.json secrets/krb5.conf # Kerberos secrets/csi-service.keytab # Kerberos secrets/license.lic # [License](/docs/csi/installation/license)services: winmgmtframeworkwebapi: image: ghcr.io/baremetal-works/novahypervcsi/winmgmframeworkapi:<version> restart: always ports: - "8081:8080" environment: ASPNETCORE_ENVIRONMENT: Production volumes: - ./ssh:/root/.ssh:ro - ./secrets/appsettings.json:/app/appsettings.json:ro - ./secrets/krb5.conf:/etc/krb5.conf:ro - ./secrets/csi-service.keytab:/etc/csi-service.keytab:ro - ./secrets/license.lic:/etc/hypervcsi/license/license.lic:roLog in to the registry once on the host (docker login ghcr.io with the read-only token), then
docker compose up -d.
secrets/appsettings.json:
{ "K8sHypervServices": { "Mode": "Direct" }, "ApiSettings": { "ApiToken": "<long random token, e.g. openssl rand -base64 32>" }, "Licensing": { "LicenseFilePath": "/etc/hypervcsi/license/license.lic" }, "Settings": { "GlobalRemoteSettings": { "UserName": "k8s-hyperv-csi", "Domain": "EXAMPLE.COM", "RemotingMethod": "SshGssapi", "KeytabFile": "/etc/csi-service.keytab" }, "Clusters": [ { "Name": "hv-cluster-01", "Domain": "example.com", "Nodes": [ "hv-01.example.com", "hv-02.example.com", "hv-03.example.com" ], "ClusterStorages": { "VStore1": { "Default": true, "PvcFolder": "k8s-volumes" } } } ] }}RemotingMethod:SshGssapi(Kerberos, recommended) orSshKey(then set"KeyFile": "/root/.ssh/id_ed25519"and mount the key). Full list of keys in appendix A.Clusters[].Name+Domainform the cluster FQDN the WebApi connects to;Nodesare the cluster nodes. Several clusters can be listed; the license limits how many.- Check:
curl -s -o /dev/null -w '%{http_code}\n' http://<host>:8081/health/readyprints200. The readiness check connects to the clusters, so a503with details indocker compose logspoints at SSH or Kerberos.
The WebApi can also run inside Kubernetes: set global.winmgmtframeworkwebapi.enabled: true in the chart
values and provide the same files as Secrets (csi-hyperv-key for SSH, see the chart templates).