Deploying the Assets VM#
Caution
This applies to the Air-Gapped environment, and is executed in the air-gapped tools-system.
Deploying the Assets VM is very similar to deploying an EDA Kubernetes cluster.
Preparing the Assets VM EDAADM Configuration File#
The EDAADM configuration file for the Assets VM is very similar to the EDAADM configuration file of a EDA Kubernetes environment, with a few minor changes:
- It is a config file for a single machine.
- The
clusterName
must be unique and different from the EDA Kubernetes cluster. -
The following additions are made to the machine definition:
Otherwise, the configuration is very similar to the Preparing the EDAADM configuration file section.
Note
The Assets VM only needs one network interface, preferably on the OAM network of the EDA Kubernetes cluster. It must be reachable from the OAM network of the EDA Kubernetes cluster.
Caution
The edaadm
tool still expects the definition of a storage disk in the machine definition, but this can be a reference to a non-existing disk.
Example Assets VM EDAADM Configuration file#
The below configuration file is an example for an Assets VM using local DNS and NTP servers.
version: 25.4.1
clusterName: eda-airgap-assets
machines:
- name: eda-assets.domain.tld
endpoint: 192.0.2.228
enableImageCache: true
localPathProvisioner: "/var/local-path-provisioner"
interfaces:
- name: eth0
dhcp: false
interface: eth0
addresses:
- 192.0.2.228/23
routes:
- network: 0.0.0.0/0
gateway: 192.0.2.1
mtu: 9000
disks:
os: /dev/vda
storage: /dev/vdb
k8s:
stack: ipv4
primaryNode: eda-assets.domain.tls
endpointUrl: https://192.0.2.228:6443
allowSchedulingOnControlPlanes: true
control-plane:
- eda-assets.domain.tld
time:
disabled: false
servers:
- 192.0.2.253
- 192.0.2.254
nameservers:
servers:
- 192.0.2.254
- 192.0.2.253
Generating the Talos Machine Configuration Files#
After creating the Assets VM EDAADM configuration file, the next step is to generate all the configuration files that are necessary to deploy the Kubernetes environment using Talos.
This step is very similar to the Generating the Talos machine configurations section.
Use the edaadm
tool to generate the Talos configuration out of the EDAADM configuration file:
The output should look similar to the following (a portion has been removed):
ConfigFile is eda-assets-deployment.yaml
...
[1/5] Validating Machines
[1/5] Validated Machines
[2/5] Validating Primary Node
[2/5] Validated Primary Node
[3/5] Validating Endpoint URL
[3/5] Validated Endpoint URL
[4/5] Validating Virtual IP
[4/5] Validated Virtual IP
[5/5] Validating Storage
[5/5] Validated Storage
[ OK ] Spec is validated
Generating secrets for eda-airgap-assets
Created eda-airgap-assets/secrets.yaml
generating PKI and tokens
Created eda-airgap-assets/eda-assets.domain.tld.yaml
Created eda-airgap-assets/talosconfig.yaml
Created eda-airgap-assets/rook-ceph-operator-values.yaml
Created eda-airgap-assets/rook-ceph-cluster-values.yaml
Deploy the Assets VM#
The Assets VM can be deployed on a KVM or VMware vSphere environment. This process is very similar to the documented procedures in the Deploying the Talos virtual machines section.
Creating the VM on a bridged network on KVM#
Caution
This procedure is executed on the KVM Hypervisor which will host the Assets VM.
Following are the differences from the procedure in the Creating the VM on bridged networks on KVM section:
- Use the Assets VM ISO image generated by in the Creating the KVM Assets VM Image step, instead of the standard Talos KVM image.
- Use the Talos machine config file generated in the Generating the Talos Machine Configuration Files step for
user-data
. - Make sure the root disk is set to 300GB instead of 100GB.
- No need to create a storage disk on the VM.
An example virt-install
command to deploy the Assets VM in KVM:
virt-install -n eda-assets \
--description "EDA Assets Vm for EDA" \
--noautoconsole --os-type=generic \
--memory 16384 --vcpus 4 --cpu host \
--disk eda-assets-rootdisk.qcow2,format=qcow2,bus=virtio,size=300 \
--cdrom eda-asset-vm-nocloud-amd64.iso \
--disk eda-assets-data.iso,device=cdrom \
--network bridge=br0,model=virtio
Creating the VM on a bridged network on VMware vSphere#
Caution
This procedure is executed on the Air-Gapped tools-system.
Following are the differences from the procedure in the Creating the VM on bridged networks on VMware vSphere section:
- Use the Assets VM ISO image generated by in the Creating the VMware Assets VM Image step, instead of the standard Talos VMware image.
- Use the Talos machine config file generated in the Generating the Talos Machine Configuration Files step for
user-data
. - No need to create a storage disk on the VM.
- After deploying the VM using the OVA image:
- Increase the number of vCPUs to 4.
- Increase the memory to 16G.
- Increase the main disk size to 300G. On boot, Talos automatically extends the file system.
- Enable 100% resource reservation for the CPU, memory and disk.
Create a base64 encoded hash from the Talos machine configuration for the node. For example:
An example ovftool
command to deploy the Assets VM in VMware vSphere:
ovftool --acceptAllEulas --noSSLVerify \
-dm=thin \
-ds=DATASTORE \
-n=eda-assets \
--net:"VM Network=OAM" \
--prop:talos.config="${NODECONFIG}" \
eda-asset-vm-vmware-amd64.ova \
vi://administrator%[email protected]/My-DC/host/My-Cluster/Resources/My-Resource-Group
Bootstrap the Assets VM#
Similar to bootstrapping an EDA Kubernetes cluster, the Assets VM can be bootstrapped using the edaadm
tool.
Bootstrapping Kubernetes on the Assets VM#
Use the edaadm
command with the EDAADM configuration file for the Assets VM to bootstrap Kubernetes:
Obtaining the Kubernetes Config File for kubectl#
Use the edaadm
command to obtain the Kubernetes configuration file for use with kubectl.
-
Obtain the Kubernetes configuration file.
Execute the following command in the folder with the
eda-assets-deployment.yaml
EDAADM configuration file. -
Configure the Kubernetes configuration file in your environment.
You can configure your environment to use the kubeconfig file for use with the
kubectl
command. -
Inspect your server and check if all nodes are up and running.
You can use the typical
kubectl
commands.
When the node is up and ready, continue with deploying the Assets VM services.
Deploying the Assets VM Services#
After deploying and bootstrapping the Assets VM itself, the container registry, git server and web server need to be deployed.
-
Go to the correct directory in the
edaadm
repository.In the
edaadm
repository that you have cloned or downloaded, go to thekpt
folder. -
Deploy the Assets VM services.
Make sure your kubeconfig environment variable points to the kubeconfig of the Assets VM as you got it from the Obtaining the Kubernetes Config File for
kubectl
section.
Uploading the Assets to the Assets VM#
Now that the Assets VM and its services are up and running, upload all the assets that you downloaded previously to the Assets VM.
-
Go to the correct directory in the
edaadm
repository.In the
edaadm
repository that you have cloned or downloaded, go to thebundles
folder. -
Upload the assets.
Make sure your kubeconfig environment variable points to the kubeconfig of the Assets VM as you got it from the Obtaining the Kubernetes Config File for
kubectl
section.Make sure to replace the
ASSET_HOST
IP with the IP of your Asset VM.make load-all-bundles \ ASSET_HOST=192.0.2.228 \ ASSET_HOST_GIT_USERNAME="ZWRh" \ ASSET_HOST_GIT_PASSWORD="ZWRh" \ ASSET_HOST_ARTIFACTS_USERNAME="ZWRh" \ ASSET_HOST_ARTIFACTS_PASSWORD="ZWRh"
Note
The username and passwords will be configurable in the near future.
Once all uploads have finished successfully, the Assets VM is ready for use with the installation process of EDA.