Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a79305e
Force overwrite when copying boot configuration files
feiyu11859661 Nov 5, 2025
d912a15
Add startup script configuration support for users
feiyu11859661 Nov 5, 2025
2efacb4
Use constant ISO label instead of sanitized image name
feiyu11859661 Nov 5, 2025
db025ff
Add attended and unattended installer scripts for ISO setup
feiyu11859661 Nov 5, 2025
2381328
Refactor image configs and standardize kernel package specs
feiyu11859661 Nov 5, 2025
696cebe
Add regex safety to user startup script configuration
feiyu11859661 Nov 5, 2025
5e59ed2
Remove command map and path verification logic
feiyu11859661 Nov 5, 2025
3abe4cd
Add live installer with attended and unattended modes
feiyu11859661 Nov 6, 2025
66313d8
Add live-installer build and deployment support
feiyu11859661 Nov 6, 2025
1a44edb
Add essential package list support to image template
feiyu11859661 Nov 10, 2025
e2a528d
Add GRUB version detection and package type support for EFI
feiyu11859661 Nov 10, 2025
b148537
Disable TTY echo during installer to protect sensitive data
feiyu11859661 Nov 10, 2025
e751832
Update package dependencies in ELXR12 default configs
feiyu11859661 Nov 10, 2025
d8e9899
Add grub2-mkconfig mock to image boot test cases
feiyu11859661 Nov 10, 2025
184a214
Simplify progress monitoring by removing stderr redirection
feiyu11859661 Nov 11, 2025
7b9b4f5
Add startup script existence check in configUserStartupScript
feiyu11859661 Nov 11, 2025
8e9c4a2
Add sudo group to new user configuration
feiyu11859661 Nov 11, 2025
9646580
Revert "Remove command map and path verification logic"
feiyu11859661 Nov 11, 2025
3829b17
Update shell command path handling and add multiple path support
feiyu11859661 Nov 11, 2025
1adc64b
Disable kernel messages during installer execution
feiyu11859661 Nov 11, 2025
01005e8
Merge pull request #292 from open-edge-platform/dev_feiyu_installer
feiyu11859661 Nov 11, 2025
3d35543
Adding test code for installer files
srmungar Nov 10, 2025
90b8d23
Adding test code for attendedinstaller file
srmungar Nov 10, 2025
458c0f2
update to the test code
srmungar Nov 10, 2025
248a841
adding test code for confirmview
srmungar Nov 10, 2025
d8df78d
adding test code for addl tests
srmungar Nov 10, 2025
af5ea8b
adding addl test content
srmungar Nov 10, 2025
e199a08
Refactor tests and implement shell mock function to make ut pass
feiyu11859661 Nov 12, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,22 @@ build:
# Get build date in UTC
RUN BUILD_DATE=$(date -u '+%Y-%m-%d') && \
echo "$BUILD_DATE" > /tmp/build_date

# Build with variables instead of cat substitution
RUN VERSION=$(cat /tmp/version) && \
COMMIT_SHA=$(cat /tmp/commit_sha) && \
BUILD_DATE=$(cat /tmp/build_date) && \
CGO_ENABLED=0 GOARCH=amd64 GOOS=linux \
go build -trimpath -buildmode=pie -o build/live-installer \
-ldflags "-s -w \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Version=$VERSION' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Toolname=Image-Composer' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Organization=Open Edge Platform' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.BuildDate=$BUILD_DATE' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.CommitSHA=$COMMIT_SHA'" \
./cmd/live-installer

SAVE ARTIFACT build/live-installer AS LOCAL ./build/live-installer

# Build with variables instead of cat substitution
RUN VERSION=$(cat /tmp/version) && \
Expand Down Expand Up @@ -219,4 +235,4 @@ deb:
RUN dpkg-deb --build . os-image-composer_${VERSION}_${ARCH}.deb

# Save the debian package artifact to dist/ directory
SAVE ARTIFACT os-image-composer_${VERSION}_${ARCH}.deb AS LOCAL dist/os-image-composer_${VERSION}_${ARCH}.deb
SAVE ARTIFACT os-image-composer_${VERSION}_${ARCH}.deb AS LOCAL dist/os-image-composer_${VERSION}_${ARCH}.deb
32 changes: 23 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ Developed in the Go programming language, or Golang, the tool initially builds c

## Get Started

The initial release of the OS Image Composer tool has been tested and validated to work with Ubuntu 24.04, which is the recommended distribution for running the tool. Other standard Linux distributions should also work but haven't been validated. The plan for later releases is to include a containerized version to support portability across operating systems.
The initial release of the OS Image Composer tool has been tested and validated to work with Ubuntu 24.04, which is the recommended distribution for running the tool. Other standard Linux distributions should also work but haven't been validated. The plan for later releases is to include a containerized version to support portability across operating systems.

* Download the tool by cloning and checking out the latest tagged release on [GitHub](https://github.com/open-edge-platform/os-image-composer/). Alternatively, you can download the [latest tagged release](https://github.com/open-edge-platform/os-image-composer/releases) of the ZIP archive.
* Download the tool by cloning and checking out the latest tagged release on [GitHub](https://github.com/open-edge-platform/os-image-composer/). Alternatively, you can download the [latest tagged release](https://github.com/open-edge-platform/os-image-composer/releases) of the ZIP archive.

* Install version 1.22.12 or later of the Go programming language before building the tool; see the [Go installation instructions](https://go.dev/doc/manage-install) for your Linux distribution.


### Build the Tool

Build the OS Image Composer command-line utility by using Go directly or by using the Earthly framework:
Build the OS Image Composer command-line utility by using Go directly or by using the Earthly framework:

#### Development Build (Go)

Expand All @@ -27,6 +27,9 @@ For development and testing purposes, you can use Go directly:
# Build the tool:
go build -buildmode=pie -ldflags "-s -w" ./cmd/os-image-composer

# Build the live-installer (Required for ISO image):
go build -buildmode=pie -o ./build/live-installer -ldflags "-s -w" ./cmd/live-installer

# Or run it directly:
go run ./cmd/os-image-composer --help
```
Expand All @@ -48,6 +51,17 @@ go build -buildmode=pie \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.BuildDate=$BUILD_DATE' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.CommitSHA=$COMMIT'" \
./cmd/os-image-composer

# Required for ISO image
go build -buildmode=pie \
-o ./build/live-installer \
-ldflags "-s -w \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Version=$VERSION' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Toolname=Image-Composer' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.Organization=Open Edge Platform' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.BuildDate=$BUILD_DATE' \
-X 'github.com/open-edge-platform/os-image-composer/internal/config/version.CommitSHA=$COMMIT'" \
./cmd/live-installer
```

#### Production Build (Earthly)
Expand Down Expand Up @@ -173,7 +187,7 @@ Before you compose an operating system image with the OS Image Composer tool, yo
* **Required:** Manually install version 1.4.3+ following [mmdebstrap installation instructions](./docs/tutorial/prerequisite.md#mmdebstrap)
* **Alternative**: Can use `debootstrap` for Debian-based images

**Note:** If you installed os-image-composer via the Debian package, `mmdebstrap` may already be installed. You still need to install `ukify` separately following the instructions above.
**Note:** If you installed os-image-composer via the Debian package, `mmdebstrap` may already be installed. You still need to install `ukify` separately following the instructions above.

### Compose or Validate an Image

Expand All @@ -188,11 +202,11 @@ sudo os-image-composer build /usr/share/os-image-composer/examples/azl3-x86_64-e

> Note: The default configuration at `/etc/os-image-composer/config.yml` is discovered automatically; no extra flags are required.

# Validate a template:
# Validate a template:
./os-image-composer validate image-templates/azl3-x86_64-edge-raw.yml
```

After the image finishes building, check your output directory. The exact name of the output directory varies by environment and image but should look something like this:
After the image finishes building, check your output directory. The exact name of the output directory varies by environment and image but should look something like this:

```
/os-image-composer/tmp/os-image-composer/azl3-x86_64-edge-raw/imagebuild/Minimal_Raw
Expand Down Expand Up @@ -451,7 +465,7 @@ target:
systemConfigs:
- name: edge
description: Default configuration for edge image

# Package Configuration
packages:
# Additional packages beyond the base system
Expand All @@ -469,7 +483,7 @@ systemConfigs:

#### Key Components

Here are the key components of an image template.
Here are the key components of an image template.

##### 1. `image`

Expand Down Expand Up @@ -570,7 +584,7 @@ echo ". /path/to/os-image-composer_completion.ps1" >> $PROFILE

#### Examples of Completion in Action

Once the completion script is installed, the tool is configured to suggest YAML files when completing the template file argument for the build and validate commands, and you can see that in action:
Once the completion script is installed, the tool is configured to suggest YAML files when completing the template file argument for the build and validate commands, and you can see that in action:

```bash
# Tab-complete commands
Expand Down
Loading
Loading