Project

General

Profile

Actions

action #126857

closed

coordination #123583: [epic] Agama auto-installation

Automate auto-installation of SUSE ALP Bedrock

Added by JERiveraMoya about 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
High
Assignee:
Target version:
Start date:
2023-03-29
Due date:
% Done:

0%

Estimated time:

Description

Motivation

The test steps are described here:
https://github.com/openSUSE/agama/blob/master/autoinstallation/README.md

Scope

x86_64 and aarch64 (s390x z/VM I don't think it is achievable a the moment)

Acceptance criteria

AC1: Automate a simple auto-installation on ALP Bedrock with Agama

Additional information

I'd suggest to focus on .sh format for this first iteration. We will need to cover three format in our test coverage in follow-up tickets and this one it is the one used by the other two formats.
See documentation https://github.com/openSUSE/agama/blob/master/autoinstallation/scripts/auto.sh
and the script with all the formats for auto-installation:
https://github.com/openSUSE/agama/blob/master/autoinstallation/scripts/auto.sh
We will need to create a new job group for D-Installer in Development in O3.
Reboot should be done via command line, do not create needles for unattended installation, for any interaction with the UI we will use a proper test framework in the future (ie playwright).


Related issues 2 (0 open2 closed)

Related to qe-yam - action #127349: Add code for handling agama.auto boot parameterResolvedleli2023-04-06

Actions
Copied from qe-yam - action #126848: Automate auto-installation of SUSE ALP MicroResolvedhjluo2023-03-29

Actions
Actions #1

Updated by JERiveraMoya about 1 year ago

  • Copied from action #126848: Automate auto-installation of SUSE ALP Micro added
Actions #2

Updated by JERiveraMoya about 1 year ago

  • Description updated (diff)
Actions #3

Updated by rainerkoenig about 1 year ago

  • Status changed from Workable to In Progress
  • Assignee set to rainerkoenig
Actions #4

Updated by rainerkoenig about 1 year ago

Notes on what I'm doing

  • Using Build 10.1 for d-installer 0.8 now
  • first tests in a KVM show that the entry screen offers a selection between "ALP-Bedrock" and "ALP-Micro".
  • Tried to follow the example instructions abobve, but this raises a few questions
    • Q1: The "terminal" that we see here, do we have testapi methods to use this?
    • Q2: We have no root privileges assigned. Tried to do a manual install (this time still with build 9.1) and then a d-installer-config´show, but even here root pivileges are not shown?
    • Q3: Should the automation process take the "shell command" approach or do we need to make needles and click ourselves through the d-installer?

When root passowrd is set then d-installer config show shows this JSON:

{"user":{"fullName":"joe","userName":"joe","password":"doe","autologin":false},"root":{"sshPublicKey":""},"software":{"product":"ALP-Bedrock"},"storage":{"lvm":null,"encryptionPassword":null,"devices":[]}}
Actions #5

Updated by JERiveraMoya about 1 year ago

Please sync with Lemon about that, we are not going to use the Cockpit console, but the method editing kernel parameter:
https://github.com/yast/agama/pull/495/files#diff-497cb1ae0275e84faab89f44cfc9c9027678f18fbf279098df5afd9ddf7e7cd6R16

Actions #6

Updated by JERiveraMoya about 1 year ago

  • Description updated (diff)

Updated description: "We will need to create a new job group for D-Installer in Development in O3."

Actions #7

Updated by JERiveraMoya about 1 year ago

  • Description updated (diff)

Updated description, please take a look.

Actions #8

Updated by JERiveraMoya about 1 year ago

  • Description updated (diff)
Actions #9

Updated by rainerkoenig about 1 year ago

Notes

Tried this script approach with a shell skript:

set -ex

/usr/bin/dinstaller config set software.product=ALP-Bedrock
/usr/bin/dinstaller config set user.userName=joe user.password=doe
/usr/bin/dinstaller config set root.password=nots3cr3t
/usr/bin/sleep 30
/usr/bin/dinstaller install
/sbin/reboot

Installation is then really rebooting after the install part. The sleep seems to be needed to trigger installation.
Remaining "problem" is that the installation does not change the boot order, so the reboot boots again from the ISO and launches the installer if we don't intervene manually.

Also in this way I was able to set a root password which didn't work with the JSON approach.

Actions #10

Updated by rainerkoenig about 1 year ago

Asked about the reboot issue on the Slack channel.

Actions #11

Updated by rainerkoenig about 1 year ago

Notes

Goal for this step was to put the automatic installation on openqa.opensuse.org and make it work for aarch64 and x86_64.

So here is what I did:

  • posted the d-installer-0.8.3-Build-11.1 iso images to O3.
  • tweaked the "Development Agama" job group:
    • CASEDIR now points to my branch alp-automation
    • Schedule is adapted to auto-installation
    • The dinst.auto parameter is submitted as EXTRABOOTPARAMS. To avoid ths headache with how to integrate this in openQA I just pointed to the configuration shell script on github (note that you need the raw.githubuserconten..-URL, with the URL copied from the Raw button in GitHub it does not work because this URL is redirected).
    • Good news is that after the installation openQA reboots directly into the installation and not back into the install media.
    • To finish the test the wait_auto_reboot checks for the final login prompt in textmode with tag tty6-selected.

With this setup those simple tests are successful.

I created [#127349] to implement the code for handling the agama.auto parameter as a possible next action to this ticket.

Actions #12

Updated by JERiveraMoya about 1 year ago

dinst.auto is outdated in last snapshot for qa (march prototype), we shouldn't work with that iso but instead use the one in YaST Head project, please ensure latest iso generated by the upstream project in obs (YaST Head) is in fixed directory in openQA.
Flavor should be Agama and test suite name for example "agama_autoinstallation_default".
Does it work with 2G of RAM?
We definitely need to see the steps with screenshot and some logic that tell us where we are, grub, etc, not just arrive to the final destination.
For aarch64 we are not installing anything yet apparently.
Check explicitly for a custom tty needle shouldn't be required, select console should give us that, perhaps we need some needle for that as we don't have the needle for the product that we install.

Actions #13

Updated by JERiveraMoya about 1 year ago

  • Related to action #127349: Add code for handling agama.auto boot parameter added
Actions #14

Updated by rainerkoenig about 1 year ago

Accessed the test on O3 now for aarch64. Today we end up in the installation, but the bad news is that all that stuff seems to run while we're still in bootloader_start, so the first thing you see now in the next test is the login screen for the already installed system.

At the moment I cannot explain why

  • we are successful now, but the installation part happens during bootloader_start.
  • the installation didn't work 8 days ago (we changed nothing in the job group, image or whatever)
Actions #15

Updated by rainerkoenig about 1 year ago

Now I finally understand what went "wrong" on aarch64. Practically nothing, but the problem was that aarch is terribly slow.

So in a normal run we're booting the Live CD which then boots to a login prompt and then starts X and the D-Installer. Unfortunately in our wait_auto_reboot we're triggering exactly on that login prompt and then finish with the test. So when I didn't try to debug, it looked like the test failed. When I tried to debug and stopped at the beginning of the wait_auto_reboot testmodule of course the worker stopped waiting for my commands, but the SUT was doing what it was supposed to do, installing the system. So in that case we saw the installer doing its job, in the runs without human intervention we dropped out at the first text login that appeared (which on aarch was the wrong one).

Now wait_auto_reboot is refactored and looks for 3 needles to see if

  • we see the installer screen
  • we see that it is installing
  • the final "Welcome to ALP Bedrock" message.

This seems to work on both architectures.

Actions #16

Updated by JERiveraMoya about 1 year ago

  • Subject changed from Automate auto-installation on ALP Bedrock to Automate auto-installation of SUSE ALP Bedrock
Actions #18

Updated by JERiveraMoya about 1 year ago

  • Status changed from In Progress to Resolved
Actions

Also available in: Atom PDF