Run time configuration using cloud-init not working #1838
Replies: 5 comments 4 replies
-
Hi @ventureElen! Great to see you are trying out elemental! The provided elemental-green example is not really production ready, as you have seen. I would encourage you to copy the example. In order to install the net-tools package it can be added to the list of packages in the Dockerfile And if you don't want the default root password set you can change the invocation of Let me know if you run into any troubles! |
Beta Was this translation helpful? Give feedback.
-
Keep in mind that the operating system is packaged in a container image. As such its immutable and you can't install/update/remove packages inside the running OS. 😉 |
Beta Was this translation helpful? Give feedback.
-
No. |
Beta Was this translation helpful? Give feedback.
-
Upgrade compares the |
Beta Was this translation helpful? Give feedback.
-
No. |
Beta Was this translation helpful? Give feedback.
-
I have created qcow2 image of opensuse following the steps: https://rancher.github.io/elemental-toolkit/docs/creating-derivatives/build_disk/
Used following image as vanilla elemental image for opensuse: ghcr.io/rancher/elemental-toolkit/elemental-green:v0.10.7-g3e4a3c56.
I used Virtual Box on windows 11 to create VM using the qcow2 image. i m able login to VM using root/cos. then i tried to install net-tools package using zypper but it gave the following error:
elemental:~ # zypper in -y net-tools
The target filesystem is mounted as read-only. Please make sure the target filesystem is writeable.
Following the documentation, i have created an yaml file and placed it on /usr/local/cloud-config/:
install.yaml contents:
stages:
name: "Install something"
stages:
after-upgrade-chroot:
- commands:
- zypper in -y net-tools
after-reset-chroot:
- commands:
- zypper in -y net-tools
after-deploy-chroot:
- commands:
- zypper in -y net-tools
after-install-chroot:
- commands:
- zypper in -y net-tools
upon reboot, netstat isn't installed.
I tried placing the same file on /oem directory but still it didn't work. i also tried to overwrite the default username and password by copying accounting file to /usr/local/cloud-config but is it still accepting root/cos. injecting of environment variables also didn't work. in short, placement of new yaml files in either /oem or /usr/local/cloud-config has no impact and the VM seems to be rebooting from default cloud config files only.
Also elemental install/elemental upgrade are not working with following error:
elemental:/oem # elemental install
\INFO[2023-09-26T14:34:49Z] Starting elemental version v0.10.7
INFO[2023-09-26T14:34:49Z] reading configuration form '/etc/elemental'
ERRO[2023-09-26T14:34:49Z] invalid install command setup undefined system source to install
Error: undefined system source to install
elemental:/oem # \
Please let me know what am i doing wrong?
Documentation says that a derivative is a simple container image. does that mean that iso or qcow2 or vdi files created from the container images are not elemental derivates and hence run time configuration won't work? please clarify.
Beta Was this translation helpful? Give feedback.
All reactions