Configuring Linux Host for IMM (Magic xpi 4.14)
To host the IMM infrastructure, you can use a Linux machine either on premise or on Cloud. For development purpose, you can setup the same on WSL as well. Given below are the steps to setup IMM infrastructure on WSL using MicroK8S.
ยท Windows 10 version 1909(OS build 18363.1049) or above
To enable the WSL feature refer to the official WSL documentation at https://docs.microsoft.com/en-us/windows/wsl/install
|
Make sure that your WSL is updated one. You can update the same by running the command:
wsl --update
|
-
Go to the Windows store and search for Ubuntu 22.04.x LTS.
This is tested and verified on Windows 10 Pro Version 22H2.
-
Click the Get button to download it on the local machine.
-
Once the download is complete, click the Open button. This will start the installation process. It will take a few minutes depending upon the system configuration.
-
Next, you will be prompted to create a UNIX user account. Follow the instructions and set the username and password. With this the installation will be complete.
|
Remember the username and password. You will require this later.
|
Install MicroK8S using the command:
On running this command, if you get error similar to
error: cannot communicate with server: Post "http://localhost/v2/snaps/microk8s": dial unix /run/snapd.socket: connect: no such file or directory
then run the following commands and then reinstall MicroK8S
-
sudo apt-get update && sudo apt-get install -yqq daemonize dbus-user-session fontconfig
-
sudo daemonize /usr/bin/unshare --fork --pid --mount-proc /lib/systemd/systemd --system-unit=basic.target
-
exec sudo nsenter -t $(pidof systemd) -a su - $LOGNAME
To confirm MicroK8S is successfully installed, run the command:
microk8s status
This command should show the status as running.
To know the IP address of WSL machine, run the following command:
ifconfig
If you get an error on running the command, first run the command below:
sudo apt install net-tools
Note the IP Address of the system. You will need this to enable MicroK8S add-ons.
Once MicroK8S is installed, you need to install microk8s add-ons given below:
-
dns
To enable this add-on run the command:
sudo microk8s enable dns
-
metallb
To enable this add-on run the command
sudo microk8s enable metallb
When it prompts for IP range, specify it as <IP Address of WSL>-<IP Address of WSL>
Once the two add-ons are enabled your system is ready for IMM installation.
(Since version: 4.14)