-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Default user data for oem autoinstall (#377)
* device_connectors: Add default-user-data to oem_autoinstall * Udpate docs for oem_autoinstall * 1. Move data dir for oem_autoinstall 2. Add ssh copy id by device connector * Increase the timeout for device status polling after provision * 1.Update default-user-data 2.Fix default test user/password
- Loading branch information
1 parent
f3c0e16
commit 8007913
Showing
6 changed files
with
164 additions
and
39 deletions.
There are no files selected for viewing
Validating CODEOWNERS rules …
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# OEM Software Engineering | ||
device-connectors/src/testflinger_device_connectors/devices/zapper_iot @canonical/oem-swe-iot | ||
device-connectors/src/testflinger_device_connectors/devices/oem_autoinstall @canonical/oem-swe-x86 | ||
device-connectors/src/testflinger_device_connectors/data/muxpi/oem_autoinstall/provision-image.sh @canonical/oem-swe-x86 | ||
device-connectors/src/testflinger_device_connectors/data/oem_autoinstall @canonical/oem-swe-x86 |
File renamed without changes.
86 changes: 86 additions & 0 deletions
86
device-connectors/src/testflinger_device_connectors/data/oem_autoinstall/default-user-data
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
#cloud-config | ||
# vim: syntax=yaml | ||
|
||
autoinstall: | ||
version: 1 | ||
|
||
storage: | ||
layout: | ||
name: direct | ||
match: | ||
install-media: true | ||
|
||
early-commands: | ||
- "nmcli networking off" | ||
|
||
late-commands: | ||
- "bash /cdrom/sideloads/hook.sh late-commands" | ||
- "mount -o rw,remount /cdrom" | ||
|
||
# Rename factory reset EFI directory so firmware won't show it. Ignore | ||
# errors on the way. | ||
- "mv /cdrom/EFI /cdrom/efi.factory || true" | ||
- "sed -i 's#/EFI/boot/bootx64.efi#/efi.factory/boot/bootx64.efi#g' /target/etc/grub.d/99_reset || true" | ||
- "echo 'GRUB_CMDLINE_LINUX_DEFAULT=\"quiet splash nomodeset modprobe.blacklist=nouveau nouveau.modeset=0\" # remove-before-flight' >> /target/etc/default/grub" | ||
- "curtin in-target --target=/target -- update-grub" | ||
|
||
# Copy /cdrom/ssh-config to /target/etc/ssh, if it exists | ||
- "! [ -d /cdrom/ssh-config ] || (mkdir -p /target/etc/ssh && cp -r /cdrom/ssh-config/* /target/etc/ssh)" | ||
|
||
shutdown: reboot | ||
|
||
user-data: | ||
bootcmd: | ||
- "bash /sp-bootstrap/hook.sh early-welcome" | ||
|
||
write_files: | ||
- content: | | ||
[daemon] | ||
AutomaticLoginEnable=True | ||
AutomaticLogin=ubuntu | ||
path: /etc/gdm3/custom.conf | ||
append: true | ||
- content: | | ||
[org.gnome.settings-daemon.plugins.power] | ||
sleep-inactive-ac-timeout=0 | ||
sleep-inactive-battery-timeout=0 | ||
sleep-inactive-battery-type='nothing' | ||
sleep-inactive-ac-type='nothing' | ||
idle-dim=false | ||
[org.gnome.desktop.session] | ||
idle-delay=0 | ||
[org.gnome.desktop.screensaver] | ||
ubuntu-lock-on-suspend=false | ||
lock-enabled=false | ||
idle-activation-enabled=false | ||
path: /usr/share/glib-2.0/schemas/certification.gschema.override | ||
users: | ||
- name: ubuntu | ||
sudo: "ALL=(ALL) NOPASSWD:ALL" | ||
lock_passwd: false | ||
shell: /bin/bash | ||
# this is just "ubuntu" | ||
passwd: "$6$rounds=4096$PCrfo.ggdf4ubP$REjyaoY2tUWH2vjFJjvLs3rDxVTszGR9P7mhH9sHb2MsELfc53uV/v15jDDOJU/9WInfjjTKJPlD5URhX5Mix0" | ||
|
||
locale: en_US.UTF-8 | ||
|
||
packages: | ||
- openssh-server | ||
|
||
package_upgrade: false | ||
|
||
runcmd: | ||
- ["glib-compile-schemas", "/usr/share/glib-2.0/schemas"] | ||
- ["sudo", "-u", "ubuntu", "-H", "gsettings", "reset-recursively", "org.gnome.settings-daemon.plugins.power"] | ||
- ["sudo", "-u", "ubuntu", "-H", "gsettings", "reset-recursively", "org.gnome.desktop.session"] | ||
- ["sudo", "-u", "ubuntu", "-H", "gsettings", "reset-recursively", "org.gnome.desktop.screensaver"] | ||
|
||
# Reboot after early-welcome is done | ||
power_state: | ||
mode: "reboot" | ||
message: "early-welcome setup complete, rebooting..." | ||
timeout: 30 | ||
|
||
bootcmd: | ||
- ['plymouth', 'display-message', '--text', 'Starting automated testing installer...'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters