Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

contrib: Extend and add autoyast profiles #5251

Merged
merged 2 commits into from
Sep 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
150 changes: 150 additions & 0 deletions contrib/ay-openqa-worker-leap-3-nvme.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE profile>
<profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns">
<general>
<mode>
<confirm t="boolean">false</confirm>
</mode>
</general>
<networking>
<!-- okurz: 2023-06-13: For multiple network interfaces by default the last is configured, prefer the first -->
<interfaces t="list">
<interface>
<bootproto>dhcp</bootproto>
<name>eth0</name>
<startmode>auto</startmode>
</interface>
</interfaces>
<keep_install_network t="boolean">true</keep_install_network>
<routing t="map">
<ipv4_forward t="boolean">true</ipv4_forward>
<ipv6_forward t="boolean">true</ipv6_forward>
</routing>
</networking>
<add-on>
<add_on_others t="list">
<listentry>
<media_url>https://download.opensuse.org/distribution/leap/$releasever/repo/oss</media_url>
<alias>repo-oss</alias>
<name>repo-oss</name>
</listentry>
<listentry>
<media_url>https://download.opensuse.org/distribution/leap/$releasever/repo/non-oss</media_url>
<alias>repo-non-oss</alias>
<name>repo-non-oss</name>
</listentry>
<listentry>
<media_url>https://download.opensuse.org/update/leap/$releasever/oss</media_url>
<alias>repo-update-oss</alias>
<name>repo-update-oss</name>
</listentry>
<listentry>
<media_url>https://download.opensuse.org/update/leap/$releasever/non-oss</media_url>
<alias>repo-update-non-oss</alias>
<name>repo-update-non-oss</name>
</listentry>
</add_on_others>
</add-on>
<software>
<products t="list">
<product>Leap</product>
</products>
<patterns t="list">
<pattern>kvm_server</pattern>
</patterns>
<packages t="list">
<package>openssh</package>
<package>sudo</package>
</packages>
</software>
<timezone t="map">
<hwclock>UTC</hwclock>
<timezone>Etc/UTC</timezone>
</timezone>
<partitioning t="list">
<drive>
<type t="symbol">CT_DISK</type>
<device>/dev/nvme1n1</device>
<disklabel>none</disklabel>
<use>all</use>
<partitions t="list">
<partition>
<raid_name>/dev/md0</raid_name>
</partition>
</partitions>
</drive>
<drive>
<type t="symbol">CT_DISK</type>
<device>/dev/nvme2n1</device>
<disklabel>none</disklabel>
<use>all</use>
<partitions t="list">
<partition>
<raid_name>/dev/md0</raid_name>
</partition>
</partitions>
</drive>
<drive>
<type t="symbol">CT_MD</type>
<device>/dev/md0</device>
<disklabel>gpt</disklabel>
<use>all</use>
<raid_options>
<raid_type>raid1</raid_type>
<device_order t="list">
<device>/dev/nvme1n1</device>
<device>/dev/nvme2n1</device>
</device_order>
</raid_options>
<partitions t="list">
<partition>
<mount>/boot/efi</mount>
<size>512MiB</size>
<filesystem t="symbol">vfat</filesystem>
</partition>
<partition>
<mount>/</mount>
<size>max</size>
<filesystem t="symbol">btrfs</filesystem>
</partition>
</partitions>
</drive>
<drive>
<type t="symbol">CT_DISK</type>
<device>/dev/nvme0n1</device>
<disklabel>gpt</disklabel>
<use>all</use>
<partitions t="list">
<partition>
<size>max</size>
<filesystem t="symbol">ext4</filesystem>
Copy link
Member

@mimi1vx mimi1vx Sep 4, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this reformatted by service to ext2 ?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only if we actually use that service which is AFAIK only the case in OSD with salt

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ext4 is a good default. If it gets overridden that's not a problem.

<mount>/var/lib/openqa</mount>
</partition>
</partitions>
</drive>
</partitioning>
<scripts>
<post-scripts t="list">
<script>
<filename>setup.sh</filename>
<interpreter>shell</interpreter>
<debug t="boolean">true</debug>
<source><![CDATA[
echo 'GRUB_CMDLINE_LINUX_DEFAULT+=" crashkernel=210M"' >> /etc/default/grub
]]></source>
</script>
</post-scripts>
</scripts>
<firewall>
<enable_firewall t="boolean">true</enable_firewall>
<start_firewall t="boolean">true</start_firewall>
<FW_CONFIGURATIONS_EXT>sshd</FW_CONFIGURATIONS_EXT>
</firewall>
<services-manager>
<services>
<enable t="list">
<service>sshd</service>
</enable>
</services>
</services-manager>
</profile>
15 changes: 11 additions & 4 deletions contrib/ay-openqa-worker.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
</interface>
</interfaces>
<keep_install_network config:type="boolean">true</keep_install_network>
<routing t="map">
<ipv4_forward t="boolean">true</ipv4_forward>
<ipv6_forward t="boolean">true</ipv6_forward>
</routing>
</networking>
<% if os_release[:id] == 'opensuse-leap' %>
<add-on>
Expand Down Expand Up @@ -49,12 +53,19 @@
<product>Leap</product>
</products>
<% end %>
<patterns config:type="list">
<pattern>kvm_server</pattern>
</patterns>
<packages config:type="list">
<package>openssh</package>
<package>sudo</package>
<package>salt-minion</package>
</packages>
</software>
<timezone t="map">
<hwclock>UTC</hwclock>
<timezone>Etc/UTC</timezone>
</timezone>
<partitioning config:type="list">
<drive>
<initialize config:type="boolean">true</initialize>
Expand Down Expand Up @@ -88,10 +99,6 @@
<start_firewall config:type="boolean">true</start_firewall>
<FW_CONFIGURATIONS_EXT>sshd</FW_CONFIGURATIONS_EXT>
</firewall>
<timezone>
<hwclock>UTC</hwclock>
<timezone>Europe/Berlin</timezone>
</timezone>
<services-manager>
<services>
<enable config:type="list">
Expand Down