True - I end up using syslinux for other projects and it can be a painOn 16 May 2016 at 11:25, Matt Hart <matthew.hart@linaro.org> wrote:
> On 16 May 2016 at 11:17, Neil Williams <neil.williams@linaro.org> wrote:
>> On 14 May 2016 at 01:32, Luís Matallui <matallui@gmail.com> wrote:
>>> Hi,
>>>
>>> For the last couple of days I’ve been trying to setup a device in our lab for deployment and installation of a Linux OS.
>>> However, I’ve came across a few issues and lots of questions and hopefully I can get some answers here.
>>>
>>> Considerations:
>>>
>>> 1. I’ve decided to give it a go with LAVA v2 and try using the pipeline model
>>> 2. I’m not testing any “boards”, so it’s hard to find a similar example
>>
>> This is a common misconception. Anything which runs tests as part of
>> LAVA is a board/device. A DUT - device under test, even if it is a
>> virtual machine running on a dispatcher.
>>
>>> 3. I am not deploying any Linaro images (not even debian based)
>>
>> For that to be true, you would be testing only the bootloader or
>> firmware, e.g. UEFI, Grub etc. There is a system deployed to that
>> device - something that looks like POSIX. That system can be
>> considered an image (it could be slowly copied off using dd) and it
>> can be re-deployed as such when things go wrong. If you get to a login
>> prompt and a POSIX shell once the device has booted, that device has
>> had an image deployed.
>>
>> LAVA V2 does away with the concept of a "Linaro" image - if the booted
>> device provides a POSIX shell and it is on a machine other than the
>> dispatcher - it's a deployment.
>>
>>> 4. My team develops and supports a reference Linux OS, based on RHEL, so that means we have total control of our images, kickstarter scripts, etc.
>>
>> RPM based testing is not common in LAVA and the support scripts are
>> not routinely tested. This may mean that you need to use some wrapper
>> scripts to ensure that the correct dependencies are installed but you
>> are still running tests on a deployment after booting a device. You
>> have control over the images, so presumably those images are updated
>> from time to time - that is an image deployment that LAVA can do.
>>
>>> 5. We already have a PXE server in our network, which is where our servers (the targets in this context) get booted from by default
>>> 6. Once booted from PXE, we get a PXE menu, where we can either select an option, or press ESC and add a custom command (at this syslinux is running)
>>> 7. We have access to the serial console of every device via serial port server (telnet <ipaddr> <port>)
>>> 8. We have power control over every device via IPMI
>>>
>>> Issues:
>>>
>>> 1. I couldn’t find the documentation for how to add devices and device types to the server (which location to add the file, which format - yaml/conf)
>>
>> In LAVA V2, all configuration lives on the server. The device type
>> template is a jinja2 file which is parsed to output YAML.
>>
>> https://git.linaro.org/lava/lava-server.git/blob/HEAD:/lava_scheduler_app/tests/device-types/x86.jinja2
>>
>> Adding devices to V2:
>> https://staging.validation.linaro.org/static/docs/v2/pipeline-admin.html#
>>
>>> 2. In the above described environment, I suppose we would skip the deployment phase, since the devices already boot into syslinux from PXE (is this correct?).
>>
>> Not necessarily.
>>
>> https://staging.validation.linaro.org/static/docs/v2/dispatcher-design.html#persistence
>>
>> You are better considering if you should actually deploy a fresh copy
>> of the image each time to ensure you know what you are actually
>> testing. Hint: only ever change one element at a time - it may sound
>> obvious but you need to be obsessive about this.
>>
>>> Either way, it would be nice to be able to run ‘ipmitool chassis booted pxe’ before rebooting the system.
>>
>> That is effectively your hard_reset_command in the Device Dictionary.
>>
>> https://staging.validation.linaro.org/static/docs/v2/glossary.html#term-device-dictionary
>> https://staging.validation.linaro.org/static/docs/v2/pipeline-admin.html#create-device-dictionary
>> https://staging.validation.linaro.org/static/docs/v2/pipeline-admin.html#
>>
>> There are examples of x86 device dictionary entries but those
>> particular x86 devices are rather specialised and the device
>> dictionary includes lots of potentially confusing elements.
>>
>>> 3. Either way (via boot or deploy), how can I make sure to detect the PXE (syslinux) menu, send the ESC key, and send the command I need to trigger the kickstart installation?
>>
>> LAVA V2 has iPXE support.
>>
>> https://git.linaro.org/lava/lava-dispatcher.git/blob/HEAD:/lava_dispatcher/pipeline/test/sample_jobs/ipxe-ramdisk.yaml
>
> Can I just jump in here and state, like I do rather often, that the
> fact this board uses PXE to load syslinux, has nothing to do
> whatsoever with iPXE support.
> PXE != iPXE, iPXE is just another bootloader. How the board gets to
> that bootloader is largely irrelevant.
> The real support needed here is "syslinux", but V2 doesn't yet have a
> generic bootloader support which would mean this could be driven by
> just config files.
to drive properly. Grub (specifically grub2) is a lot easier - if you
are open to that level of change in your tests, it is worth doing.
> You could of course use iPXE to boot your installer, replacing
> syslinux, but I would imagine that's part of the things they are
> trying to test.
>>> To sum-up, the Workflow I’m trying to achieve after having completed the whole setup sort of goes like this:
>>>
>>> 1. Reboot target device into PXE (the PXE itself will download and start syslinux here)
>>> 2. Wait for PXE menu (expect some sort of string)
>>> 3. Send ESC key (to get into the boot shell)
>>> 4. Send command (this will trigger our kickstarter script and the installation will take around 5 minutes). The images that are needed are fetched automatically from our sftp server.
>>
>> This installation *is* a deployment. LAVA V2 has support for the
>> Debian Installer (because most LAVA instances are based on Debian) but
>> that support isn't going to work for a Linux OS installer which is not
>> Debian-based. You might be able to support this with a simple (long)
>> timeout or you could look at the Debian Installer support and
>> implement something related for your installer.
>>
>>> 5. Wait for boot prompt after system installation succeeds
>>> 6. Login using credentials (username, password)
>>
>> auto_login:
>>
>> https://git.linaro.org/lava/lava-dispatcher.git/blob/HEAD:/lava_dispatcher/pipeline/test/sample_jobs/bbb-nfs-url.yaml
>>
>>> 7. Run whatever tests we need from here
>>>
>>> Any help here would be much appreciated.
>>> Thanks in advance!
>>
>> Documentation for these steps is currently being updated and reviewed.
>>
>> Currently, LAVA (V1 and V2) require a Debian based system - are you
>> implementing such support or is your team interested in porting the
>> Debian packaging to RHEL /RPM support? Note that there will be a *lot*
>> of dependencies which would also need to be packaged before starting
>> on the LAVA codebase. You will also need to maintain those
>> dependencies, update them and keep them inline with the LAVA software
>> which is tested on a Debian system.
>>
>> Your use case is supportable but it will need work at your end as we
>> are testing on a different environment.
>>
>> --
>>
>> Neil Williams
>> =============
>> neil.williams@linaro.org
>> http://www.linux.codehelp.co.uk/
>> _______________________________________________
>> Lava-users mailing list
>> Lava-users@lists.linaro.org
>> https://lists.linaro.org/mailman/listinfo/lava-users
--
Neil Williams
=============
neil.williams@linaro.org
http://www.linux.codehelp.co.uk/