Linux VM Setup
The Integration Platform development environment requires the use of several third-party products to implement various parts of the overall solution. These include
- Redpanda (Kafka) with a console accessible at https://192.168.200.2:8084
- MinIO S3 Server accessible at https://192.168.200.2:9001
- SeaweedFS (S3) with a console accessible at https://192.168.200.2:8888
- SMTP4DEV email server/client accessible at https://192.168.200.2:5125
To simplify the configuration of the development environment, these tools are provided in a preconfigured Linux VM that can be downloaded and run locally using Windows Hyper-V.
Downloading and Installing the SIPVM Linux VM
The VMs disk image is stored in the Synergex SharePoint server and, assuming you have been granted access, you can download it here. The download is a single 7-zip archive (SIPVM.7z) that, at the time of writing, is about 4 GB in size and about 11.5 GB when extracted.
After downloading, extract the .7z file to your chosen location, and then delete the .7z file. You should be left with a file called SIPVM.vhdx.
Once you have the virtual disk, you need to configure a new Hyper-V virtual machine to use it:
- Open Hyper-V Manager.
- In the Actions pane, click New > Virtual Machine.
- In the New Virtual Machine Wizard, on the Specify Name and Location page, name the VM "SIPVM" (it's important that you use this name) and then click the Next button.
- On the Specify Generation page, select Generation 2 and then click the Next button.
- On the Assign Memory page, assign at least 8 GB (8192 MB) or more, check the Use Dynamic Memory option, and then click the Next button.
- On the Configure Networking page, select Default Switch and then click the Next button.
- On the Connect Virtual Hard Disk page, select "Use an Existing Hard Disk Image" and then browse for and select the downloaded disk image SIPVM.vhdx before clicking the Next button.
- On the Summary page, click the Finish button.
Now you need to make some adjustments to the VM you just defined:
- Back in Hyper-V Manager, right-click on the new VM and select Settings.
- In the Settings dialog, click on Security and then check that Enable Secure Boot is checked. Under Template, select Microsoft UEFI Certificate Authority.
- Click on Processor and check that the VM is assigned at least 4 CPU cores (more is better).
- Click on Checkpoints and uncheck the "Use automatic checkpoints" option if checked.
- Finally, click the OK button.
By default Hyper-V virtual machines use the Default Bridge, which connects clients to a private IP network with your host PC and sets up a NAT configuration so that the client VMs have internet access. The client VMs receive variable IP addresses from a built-in DHCP server, but there is no support that enables you to determine what that IP address is, which can be a problem if you're trying to access services on the VM and need to know the IP address without having to change your configuration every time you start the VM! So, we need to implement a custom network configuration.
You will create a new Hyper-V Internal Switch, assign a fixed IP address on that network to your host PC, and manually add a NAT environment so that other clients on the new virtual network segment can access the internet. The IP address you'll use for the PC "end" of the connection is 192.168.200.1, and the SIPVM system is already configured with a static IP address of 192.168.200.2.
To make the configuration easier, a PowerShell script has been provided. To configure the network environment:
- Open a Windows Powershell command prompt As Administrator.
-
Move to the windows directory.
powershell cd \DEV\SYNERGEX\IntegrationPlatform\windows -
Enable local execution of scripts:
powershell Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force -
Execute the PowerShell script to create a private network between your Windows host and the Linux VM:
powershell .\CreatePrivateNetwork.ps1 -
If the script executes correctly you should see
``` powershell Checking for Administrator privileges...
Running as Administrator
Checking if VM 'SIPVM' exists...
VM 'SIPVM' exists
Checking if virtual switch 'SIPServerSwitch' exists...
Creating internal virtual switch 'SIPServerSwitch'...
Checking host PC has static IP on network 'SIPServerSwitch'...
Assigning static IP 192.168.200.1 to interface 'vEthernet (SIPServerSwitch)'...
Checking if NAT 'SIPServerNAT' exists...
Creating NAT 'SIPServerNAT' for subnet '192.168.200.0/24'...
Setting network profile for 'vEthernet (SIPServerSwitch)' to Private...
Checking network adapter on VM 'SIPVM' to switch 'SIPServerSwitch'...
Connecting adapter 'Network Adapter' to switch 'SIPServerSwitch'... ```
-
You should now be able to start and boot the SIPVM machine, connect with SSH, and log in:
| IP address | 192.168.200.2 |
|---|---|
| Username | admin |
| Default password | p@ssw0rd |
-
If you ever need to remove the custom network configuration, you can do so by running the RemovePrivateNetwork script:
powershell cd \\DEV\\SYNERGEX\\IntegrationPlatform\\windows .\\RemovePrivateNetwork.ps1
Starting the Hyper-V VM at Boot Time
If you want the Hyper-V VM to boot automatically and always be available,
- Open Hyper-V Manager.
- Select the SIPVM machine and open the settings dialog.
- In the left pane, select Automatic Start Action.
- Select "Always start this virtual machine automatically."
- Click the OK button.