- A cloudflare account and domain
- An azure account and subscription
- A host with an NVIDIA GPU
-
Install the Task CLI
-
Install the NVIDIA Container Runtime in the environment in which you will run the K3d cluster containers.
-
Check that you have the necessary dependencies. This will error if you are missing any required tooling.
task check-dependencies
-
Create
config/variables.tfvars
and populate it with appropriate values. Here is an example of its contents:cloudflare_domain="mydomain.com" app_registration_client_id="<your-app-registration-client-id>" azure_common_keyvault_name="terraform-kv" azure_common_keyvault_resource_group="tfstate" azure_common_keyvault_client_secret_secret_name="home-media-server-client-secret" azure_common_keyvault_vpn_username_secret_name="home-media-server-vpn-username" azure_common_keyvault_vpn_password_secret_name="home-media-server-vpn-password" azure_common_keyvault_cloudflare_api_token_secret_name="home-media-server-cloudflare-api-token" azure_common_keyvault_cloudflare_zone_id_secret_name="home-media-server-cloudflare-zone-id" azure_common_keyvault_cloudflare_account_id_secret_name="home-media-server-cloudflare-account-id" timezone="Europe/London" transmission_vpn_type="openvpn" transmission_vpn_provider_name="mullvad" transmission_vpn_provider_environment_variables=[] host_storage_config_dir="/home-media-server/config" host_storage_config_capacity="5Gi" host_storage_media_dir="/home-media-server/media" host_storage_media_capacity="500Gi"
See
infrastructure/variables.tf
for all variables and descriptions. -
Now run a full deployment
task recreate
-
Configure the individual apps via their UI.
If you are running the K3d cluster and docker in WSL2, then you will need to forward the ports on your windows host into the WSL2 ports.
- Give your WSL2 instance a static IP
- Get your WSL2 IP address
hostname -I
and take the first IP address if there are multiple. You can check its right by runningip addr show eth0
and taking theinet
value. - Get your current gateway by running
ip route
. It followsdefault via
. - Edit the networm interfaces config:
sudo nano /etc/network/interfaces
adding the following content:auto eth0 iface eth0 inet static address <your-static-ip> netmask 255.255.255.0 gateway <your-gateway-ip>
- On your windows host, run
wsl --shutdown
. - Open a new WSL2 tab to restart WSL.
- Get your WSL2 IP address
- Forward ports on your windows host to your WSL2 instance but opening powershell on your windows host and running this script in powershell as Administrator.