-
Notifications
You must be signed in to change notification settings - Fork 7
emt idv iso generation json, build script, workflow and readme #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
smitesh-sutaria
wants to merge
46
commits into
main
Choose a base branch
from
emt-dv-iso
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
46 commits
Select commit
Hold shift + click to select a range
868f55d
adding dv iso image json and automated scripts
smitesh-sutaria 2b90aa0
adding readme
smitesh-sutaria f4f44dd
refactor readme
smitesh-sutaria 277aac6
adding the wget of the idv json
smitesh-sutaria 3f0f0a3
adding copyright info and notes on proxy usage
smitesh-sutaria 52f7ed3
adding the standalone automation script readme
smitesh-sutaria d4240b0
Adding the demo video
smitesh-sutaria ac67c52
adding the table of contents and other formatting refactor
smitesh-sutaria 7f35284
adding idv-services to the image
smitesh-sutaria 4b81a47
few enhancements in build script
smitesh-sutaria 2d77247
creating build function, to modularize operations
smitesh-sutaria a602a87
making the script executable
smitesh-sutaria c3480db
fix the errors
smitesh-sutaria 04a4987
adding few enhancements
smitesh-sutaria 6e97f3f
enhancements done.
smitesh-sutaria 0bbf8c5
adding command line argument option
smitesh-sutaria 6a9a648
readme additions to include the optional command line arguments.
smitesh-sutaria 97ede63
adding build details
smitesh-sutaria c83e2be
Create idv-iso-builder
smitesh-sutaria c1b27e9
Rename idv-iso-builder to idv-iso-builder.yaml
smitesh-sutaria 6c66df1
Update idv-iso-builder.yaml
smitesh-sutaria d3dd970
Update idv-iso-builder.yaml
smitesh-sutaria d9aea38
Update idv-iso-builder.yaml
smitesh-sutaria 23f098d
Update idv-iso-builder.yaml
smitesh-sutaria 91bcdfe
Update idv-iso-builder.yaml
smitesh-sutaria b79a61c
Update idv-iso-builder.yaml
smitesh-sutaria 91f03f6
Update idv-iso-builder.yaml
smitesh-sutaria 49f8ee4
Update idv-iso-builder.yaml
smitesh-sutaria 6b223bd
Update idv-iso-builder.yaml
smitesh-sutaria 805ce5f
Update idv-iso-builder.yaml
smitesh-sutaria bf6c11e
Update idv-iso-builder.yaml
smitesh-sutaria 4962b62
Update idv-iso-builder.yaml
smitesh-sutaria bd26d53
few enchancements
smitesh-sutaria 1041042
upating the links in readme
smitesh-sutaria 5f41289
review comments taken care
smitesh-sutaria 9b6dc29
adding link for available release tags
smitesh-sutaria 089d40b
refactor readme
smitesh-sutaria 2217f32
editing name of the build
smitesh-sutaria 76443bc
refactor readme
smitesh-sutaria 570b0ae
adding workflow option
smitesh-sutaria a29c49a
Update README.md
smitesh-sutaria c615e90
adding emt-dv-iso branch link
smitesh-sutaria e4de24f
Update README.md
smitesh-sutaria e8ec91a
Emt dv iso test (#66)
smitesh-sutaria af7395e
adding wifi related package: wpa_supplicant (#67)
smitesh-sutaria c90c119
Emt idv iso update build tag (#69)
smitesh-sutaria File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
# SPDX-FileCopyrightText: (C) 2025 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
# This is a workflow that is triggered to build EMT desktop virtualization (IDV) ISO | ||
name: EMT IDV ISO Builder | ||
permissions: | ||
contents: read | ||
# Controls when the action will run. Workflow runs when manually triggered using the UI | ||
# or API. | ||
on: | ||
push: | ||
branches: | ||
- emt-dv-iso | ||
- main | ||
workflow_dispatch: | ||
# Inputs the workflow accepts. | ||
inputs: | ||
tag: | ||
# description to be shown in the UI | ||
description: 'release tag to be build' | ||
# Default value if no value is explicitly provided | ||
default: '3.0.20250806' | ||
# Input has to be provided for the workflow to run | ||
required: true | ||
# The data type of the input | ||
type: string | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
jobs: | ||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
build-idv-iso: | ||
# The type of runner that the job will run on | ||
runs-on: ubuntu-24.04 | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Runs a single command using the runners shell | ||
- name: Build EMT IDV ISO | ||
run: | | ||
wget https://raw.githubusercontent.com/open-edge-platform/edge-desktop-virtualization/refs/heads/emt-dv-iso/emt-dv-iso/build_idv_iso.sh | ||
chmod a+x build_idv_iso.sh | ||
if [[ -z "${{ inputs.myInput }}" ]]; then | ||
./build_idv_iso.sh | ||
else | ||
./build_idv_iso.sh -t "${{ inputs.myInput }}" | ||
Check warningCode scanning / zizmor code injection via template expansion Warning
code injection via template expansion
|
||
fi | ||
ls -lrt | ||
- name: Upload a Build Artifact | ||
uses: actions/upload-artifact@v4.6.2 | ||
with: | ||
# Artifact name | ||
name: emt-idv-iso | ||
# A file, directory or wildcard pattern that describes what to upload | ||
path: idv*.iso |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,122 @@ | ||
<!-- Copyright (C) 2025 Intel Corporation --> | ||
# Building EMT ISO with Desktop Virtualization (graphics SR-IOV) | ||
smitesh-sutaria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
- [Building EMT ISO with Desktop Virtualization (graphics SR-IOV)](#building-emt-iso-with-desktop-virtualization-graphics-sr-iov) | ||
smitesh-sutaria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- [Option-1 : Standalone (One-click) Build Script](#option-1--standalone-one-click-build-script) | ||
- [Run the script with default parameters](#run-the-script-with-default-parameters) | ||
- [Run the scripts with custom parameters](#run-the-scripts-with-custom-parameters) | ||
- [ISO file will be generated in the same path](#iso-file-will-be-generated-in-the-same-path) | ||
- [Demo : One-click EMT IDV ISO build script](#demo--one-click-emt-idv-iso-build-script) | ||
- [Option-2 : Manual Steps](#option-2--manual-steps) | ||
- [Pre-requisite](#pre-requisite) | ||
- [Step 1: clone the EMT repo](#step-1-clone-the-emt-repo) | ||
- [Step 2: Checkout the tag](#step-2-checkout-the-tag) | ||
- [Step 3: Copy the idv.json to edge-microvisor-toolkit/toolkit/imageconfigs/](#step-3-copy-the-idvjson-to-edge-microvisor-toolkittoolkitimageconfigs) | ||
- [Step 4: Build the tools](#step-4-build-the-tools) | ||
- [Step 5: Build the ISO for desktop virtualization (IDV)](#step-5-build-the-iso-for-desktop-virtualization-idv) | ||
- [Troubleshoot](#troubleshoot) | ||
- [Clean build](#clean-build) | ||
- [Working with Proxies](#working-with-proxies) | ||
- [Option-3 : Github Actions](#option-3--github-actions) | ||
- [Demo : EMT IDV ISO generation as part of github actions/workflow](#demo--emt-idv-iso-generation-as-part-of-github-actionsworkflow) | ||
|
||
## Option-1 : Standalone (One-click) Build Script | ||
|
||
> **Prerequisite** : Ubuntu 22.04 or Ubuntu 24.04 | ||
|
||
### Run the script with default parameters | ||
```sh | ||
sudo ./build_idv_iso.sh | ||
``` | ||
Command line arguments are optional. Below default values will be used : | ||
- Latest emt release tag : [3.0.20250718](https://github.com/open-edge-platform/edge-microvisor-toolkit/releases/tag/3.0.20250718) | ||
- [idv.json](https://github.com/open-edge-platform/edge-desktop-virtualization/blob/emt-dv-iso/emt-dv-iso/idv.json) | ||
|
||
### Run the scripts with custom parameters | ||
|
||
Build script supports 2 custom parameters (optional): | ||
1. [-t *tag-name*] : This is the git release tag-name against which build should run. | ||
2. [-f *image-config-json-file*] : This is the emt image config .json file. One can generate the custom images using this config file. | ||
|
||
For ex: | ||
```sh | ||
sudo ./build_idv_iso.sh -t 3.0.20250718 -f ./idv.json | ||
``` | ||
|
||
### ISO file will be generated in the same path | ||
|
||
<img width="736" height="175" alt="emt-idv-iso-out" src="https://github.com/user-attachments/assets/6666543c-1fa3-4517-93ba-82350b55be2b" /> | ||
|
||
### Demo : One-click EMT IDV ISO build script | ||
|
||
https://github.com/user-attachments/assets/8e3f609b-9632-4ea6-807d-1560856a20db | ||
|
||
## Option-2 : Manual Steps | ||
|
||
The image configuration is part of this repo [here](./idv.json) | ||
smitesh-sutaria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
### Pre-requisite | ||
|
||
[Build Requirements](https://github.com/open-edge-platform/edge-microvisor-toolkit/blob/3.0/toolkit/docs/building/prerequisites-ubuntu.md#build-requirements-on-ubuntu) | ||
smitesh-sutaria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
> The steps and build requirements are common across ubuntu-24.04 and ubuntu-22.04 | ||
> It is recommended to built against a stable/release tag. | ||
|
||
|
||
### Step 1: clone the EMT repo | ||
```sh | ||
git clone https://github.com/open-edge-platform/edge-microvisor-toolkit | ||
``` | ||
### Step 2: Checkout the tag | ||
```sh | ||
cd edge-microvisor-toolkit | ||
git checkout tags/<tag_name> | ||
smitesh-sutaria marked this conversation as resolved.
Show resolved
Hide resolved
smitesh-sutaria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
``` | ||
> The release tags can be found [here](https://github.com/open-edge-platform/edge-microvisor-toolkit/releases) | ||
|
||
### Step 3: Copy the idv.json to edge-microvisor-toolkit/toolkit/imageconfigs/ | ||
```sh | ||
wget https://raw.githubusercontent.com/open-edge-platform/edge-desktop-virtualization/refs/heads/emt-dv-iso/emt-dv-iso/idv.json | ||
cp idv.json toolkit/imageconfigs/ | ||
``` | ||
> One can copy any custom idv.json file as per the requirement. | ||
|
||
### Step 4: Build the tools | ||
```sh | ||
cd toolkit | ||
sudo make toolchain REBUILD_TOOLS=y | ||
``` | ||
### Step 5: Build the ISO for desktop virtualization (IDV) | ||
```sh | ||
sudo make iso -j8 REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/idv.json | ||
``` | ||
> ISO file will be generated @ 'edge-microvisor-toolkit/out/images' | ||
|
||
### Troubleshoot | ||
|
||
#### Clean build | ||
|
||
For re-building with any other tags, its recommended to start clean and repeat above Steps 1 to 5. | ||
```sh | ||
cd edge-microvisor-toolkit | ||
sudo make -C toolkit clean | ||
``` | ||
|
||
#### Working with Proxies | ||
|
||
If you are behind proxies and have them set, use -E option with all make commands | ||
For ex : | ||
``` | ||
sudo -E make toolchain REBUILD_TOOLS=y | ||
sudo -E make iso -j8 REBUILD_TOOLS=y REBUILD_PACKAGES=n CONFIG_FILE=./imageconfigs/idv.json | ||
``` | ||
|
||
## Option-3 : Github Actions | ||
|
||
Generation of EMT IDV ISO can be part of github actions/workflow. | ||
|
||
[Reference workflow file](https://raw.githubusercontent.com/open-edge-platform/edge-desktop-virtualization/refs/heads/emt-dv-iso/.github/workflows/idv-iso-builder.yaml) | ||
|
||
### Demo : EMT IDV ISO generation as part of github actions/workflow | ||
|
||
https://github.com/user-attachments/assets/66f508a0-c9c8-4f4e-9be7-f60a42a995fb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,135 @@ | ||
#!/bin/bash | ||
smitesh-sutaria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
smitesh-sutaria marked this conversation as resolved.
Show resolved
Hide resolved
|
||
# Copyright (C) 2025 Intel Corporation | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
set -eE | ||
start_time=$(date +%s) | ||
# Define color variables for readability | ||
RED='\e[31m' | ||
GREEN='\e[32m' | ||
BLUE='\e[34m' | ||
ENDCOLOR='\e[0m' # Reset to default color | ||
|
||
# ------------------- Default Values ------------------------------ | ||
|
||
# Default tag. This will be the latest EMT release tag. | ||
DEFAULT_TAG=3.0.20250806 | ||
|
||
# Default image config .json file. If this is NULL, default will be fetched from the repo. | ||
DEFAULT_IDV_JSON_PATH="" | ||
# This will be used only if above is NULL | ||
DEFAULT_IDV_JSON_GIT_FETCH="https://raw.githubusercontent.com/open-edge-platform/edge-desktop-virtualization/refs/heads/emt-dv-iso/emt-dv-iso/idv.json" | ||
|
||
# ------------------- Global Variables ---------------------------- | ||
|
||
# Git repo to build against. This can be any forked repo of EMT as well. | ||
GIT_REPO=https://github.com/open-edge-platform/edge-microvisor-toolkit.git | ||
|
||
# Full path of the image config JSON. | ||
IDV_JSON_PATH=$DEFAULT_IDV_JSON_PATH | ||
|
||
# If no TAG is provided by user, lets use the default tag | ||
TAG=$DEFAULT_TAG | ||
|
||
# Register the current directory | ||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
|
||
function launch_build() { | ||
echo -e "${RED}------------------------- Build Details -----------------------------------${ENDCOLOR}" | ||
echo -e "${BLUE}Current working directory : ${GREEN}$DIR ${ENDCOLOR}" | ||
echo -e "${BLUE}No. of CPUs on the system : ${GREEN}$(nproc)${ENDCOLOR}" | ||
echo -e "${BLUE}git repo to be used : ${GREEN}$GIT_REPO ${ENDCOLOR}" | ||
echo -e "${BLUE}tag (a release tag) : ${GREEN}$TAG ${ENDCOLOR}" | ||
echo -e "${BLUE}image config Json Path : ${GREEN}$IDV_JSON_PATH ${ENDCOLOR}" | ||
echo -e "${BLUE}Json git fetch path (if above Json Path is NULL) : ${GREEN}$DEFAULT_IDV_JSON_GIT_FETCH ${ENDCOLOR}" | ||
echo -e "${RED}--------------------------------------------------------------------------${ENDCOLOR}" | ||
|
||
# clone the emt repo | ||
echo -e "${BLUE}Cloning the EMT repo @${GREEN}${GIT_REPO}${ENDCOLOR}" | ||
git clone $GIT_REPO | ||
cd edge-microvisor-toolkit | ||
|
||
# checkout the required TAG | ||
echo -e "${BLUE}Checkout tag : ${GREEN}${TAG}${ENDCOLOR}" | ||
git checkout $TAG | ||
|
||
# pre-requisites | ||
echo -e "${BLUE}Installing all the pre-requisites${ENDCOLOR}" | ||
sudo ./toolkit/docs/building/prerequisites-ubuntu.sh | ||
sudo ln -vsf /usr/lib/go-1.21/bin/go /usr/bin/go | ||
sudo ln -vsf /usr/lib/go-1.21/bin/gofmt /usr/bin/gofmt | ||
curl -fsSL https://get.docker.com -o get-docker.sh | ||
sudo sh get-docker.sh | ||
sudo usermod -aG docker $USER | ||
|
||
# build the toolkit | ||
cd toolkit | ||
if [[ -z "$IDV_JSON_PATH" ]]; then | ||
echo -e "${BLUE}JSON input not provided. Hence download the default one.${ENDCOLOR}" | ||
wget $DEFAULT_IDV_JSON_GIT_FETCH | ||
cp idv.json ./imageconfigs | ||
else | ||
echo -e "${BLUE}JSON input provided is : ${GREEN}$IDV_JSON_PATH${ENDCOLOR}" | ||
cp $IDV_JSON_PATH ./imageconfigs/idv.json | ||
fi | ||
sudo make -j$(nproc) toolchain REBUILD_TOOLS=y VALIDATE_TOOLCHAIN_GPG=n | ||
|
||
# build the iso image | ||
sudo make iso -j$(nproc) REBUILD_TOOLS=y REBUILD_PACKAGES=n VALIDATE_TOOLCHAIN_GPG=n CONFIG_FILE=./imageconfigs/idv.json | ||
|
||
# copy the generated iso to same parent folder | ||
cp ../out/images/idv/*.iso ../../. | ||
|
||
echo -e ${GREEN}"Build Successful!" | ||
echo -e "${BLUE}Generated ISO available at : ${GREEN}$DIR${ENDCOLOR}" | ||
echo -e ${BLUE}"Available ISO Files : " ${GREEN} $DIR/*.iso ${ENDCOLOR} | ||
} | ||
|
||
function cleanup() { | ||
echo -e "${GREEN}Performing cleanup ${ENDCOLOR}" | ||
cd $DIR | ||
sudo rm -rf edge-microvisor-toolkit | ||
end_time=$(date +%s) | ||
runtime=$((end_time - start_time)) | ||
echo -e ${BLUE}"Total Build runtime: ${GREEN}$runtime seconds"${ENDCOLOR} | ||
} | ||
|
||
while getopts ':t:f:h' opt; do | ||
case "$opt" in | ||
t) | ||
tag_arg="$OPTARG" | ||
TAG=$tag_arg | ||
echo "Processing option 't' with '${TAG}' argument" | ||
;; | ||
|
||
f) | ||
file_arg="$OPTARG" | ||
IDV_JSON_PATH=$(realpath "$file_arg") | ||
echo "Processing option 'f' with '${IDV_JSON_PATH}' argument" | ||
;; | ||
|
||
h) | ||
echo "Usage: $(basename $0) [-t tag-name] [-f image-config-json-file]" | ||
exit 0 | ||
;; | ||
|
||
:) | ||
echo -e "option requires an argument.\nUsage: $(basename $0) [-t tag-name] [-f image-config-json-file]" | ||
exit 1 | ||
;; | ||
|
||
?) | ||
echo -e "Invalid command option.\nUsage: $(basename $0) [-t tag-name] [-f image-config-json-file]" | ||
exit 1 | ||
;; | ||
esac | ||
done | ||
shift "$(($OPTIND -1))" | ||
|
||
trap cleanup EXIT | ||
trap cleanup ERR | ||
|
||
#---------------------- main ------------------------ | ||
|
||
launch_build |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
{ | ||
"SystemConfigs": [ | ||
{ | ||
"Name": "EMT-Desktop-Virtualization", | ||
"PackageLists": [ | ||
"packagelists/grub2-mkconfig.json", | ||
"packagelists/developer-packages.json", | ||
"packagelists/virtualization-host-full-packages.json", | ||
"packagelists/core-packages-image.json", | ||
"packagelists/core-tools-packages.json", | ||
"packagelists/ssh-server.json", | ||
"packagelists/qemu-guest-packages.json", | ||
"packagelists/xorg-x11-packages.json", | ||
"packagelists/selinux-full.json", | ||
"packagelists/intel-gpu-base.json", | ||
"packagelists/drtm.json", | ||
"packagelists/virt-guest-packages.json", | ||
"packagelists/intel-wireless.json" | ||
], | ||
"Packages": [ | ||
"lsb-release", | ||
"nbd", | ||
"ntfs-3g", | ||
"ntfs-3g-system-compression", | ||
"ntfs-3g-libs", | ||
"wpa_supplicant", | ||
"igt-gpu-tools" | ||
], | ||
"KernelCommandLine": { | ||
"ExtraCommandLine": "udmabuf.list_limit=8192 i915.enable_guc=3 i915.max_vfs=7 intel_iommu=on i915.force_probe=*", | ||
"SELinux": "permissive" | ||
}, | ||
"KernelOptions": { | ||
"default": "kernel" | ||
}, | ||
"AdditionalFiles": { | ||
"additionalconfigs/99-dhcp-en.network": "/etc/systemd/network/99-dhcp-en.network" | ||
}, | ||
"PostInstallScripts": [ | ||
{ | ||
"Path": "additionalconfigs/configure-systemd-networkd-client-identifier.sh" | ||
} | ||
] | ||
} | ||
] | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Check warning
Code scanning / zizmor
code injection via template expansion Warning