sealer
sealer copied to clipboard
support run sealer image locally
Issue Description
Type: feature request
Describe what feature you want
For testing purposes, could sealer support run image locally, and no need to care about the underlying infrastructure. no matter the os is win, mac, linux, perhaps we could implement is though docker Or others container technology .
for example:
sealer run my-cluster:v1.22.15
. thats it.
sealer run my-apps:v1
. thats it.
Additional context
Add any other context or screenshots about the feature request here.
Actually ,we already support to run sealer image on github action, i assume that we can use those container image to do this.
I want to solve this issue, Can I have a try : )
Is the goal to achieve running a specified image locally, such that after using 'sealer pull' to pull the image, running 'sealer run a' would directly run the image (similar to running the 'a' image using Docker), rather than deploying it on a node? Is my understanding off? 👀 If there are more reference materials available, I would greatly appreciate it.
Is the goal to achieve running a specified image locally, such that after using 'sealer pull' to pull the image, running 'sealer run a' would directly run the image (similar to running the 'a' image using Docker), rather than deploying it on a node? Is my understanding off? 👀 If there are more reference materials available, I would greatly appreciate it.
yes ~
Currently, we support running a sealer image by specifying a host IP and SSH auth , like -m 192.168.1.100 -p xxxx
.
In fact, there is another way, which is to rely on the local container environment , and run this image on the host machine. maybe cmd looks like sealer run my-image:v1 --provider container
Or more simple sealer run my-image:v1
(about how to use, we could discuss later).
more over, The ability to run in a container environment is now supported in the sealer code.
FYI:https://github.com/sealerio/sealer/blob/035b662d16628304452882c2453df976ec08a98c/pkg/infra/infra.go#L58
Is the goal to achieve running a specified image locally, such that after using 'sealer pull' to pull the image, running 'sealer run a' would directly run the image (similar to running the 'a' image using Docker), rather than deploying it on a node? Is my understanding off? 👀 If there are more reference materials available, I would greatly appreciate it.
For the purpose of testing, sealer can support the execution of sealer image in the container of linux (amd64) environment at present, but there are still problems in the execution of sealer image in other environments. In my opinion, in order to support the local execution of sealer image in other environments, We need to modify the base image of the corresponding environment. FYI: https://github.com/sealerio/sealer/blob/035b662d16628304452882c2453df976ec08a98c/pkg/infra/container/imagecontext/base/Dockerfile#L1 For example, first of all, it is necessary to detect the host environment. If the host environment is arm architecture, it needs to use the docker file of arm architecture to build the container running environment. You can also see test architecture(We took inspiration from kind to support sealer execution in containers),FYI: test architecture
AFAIU, this is the TODO:
- Specify the image to be run on the CLI (I prefer the format 'sealer run my-image:v1 --provider container').
- Detect the host's architecture and Add support for ARM architecture (by modifying the base image).