Coder Social home page Coder Social logo

rhvh-provisioning-satellite's People

Contributors

fcarrus avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

rhvh-provisioning-satellite's Issues

Changes against upstream

For the record, here are changes against current upstream (summer 2020):

diff --git a/provisioning_templates/PXELinux/kickstart_ovirt_pxelinux.erb b/provisioning_templates/PXELinux/kickstart_ovirt_pxelinux.erb
index 9729ccf..724c9bd 100644
--- a/provisioning_templates/PXELinux/kickstart_ovirt_pxelinux.erb
+++ b/provisioning_templates/PXELinux/kickstart_ovirt_pxelinux.erb
@@ -1,14 +1,22 @@
 <%#
-kind: PXELinux
-name: Kickstart oVirt-RHVH PXELinux
+name: Baremetal Kickstart oVirt-RHVH PXELinux
+snippet: false
 model: ProvisioningTemplate
+kind: PXELinux
 oses:
-- oVirt
-- RHVH
+- RedHat
+%>
+<%# TODO: Manage bonds %>
+<%
+  subnet = @host.provision_interface.subnet
+  ip = @host.provision_interface.ip
+  mask = subnet.mask
+  gw = subnet.gateway
+  dns = subnet.dns_primary
 %>
 DEFAULT rhvh
 
 LABEL rhvh
 KERNEL <%= @kernel %>
-APPEND initrd=<%= @initrd %> inst.ks=<%= foreman_url("provision") %> inst.stage2=<%= medium_uri %> local_boot_trigger=<%= foreman_url("built") %> intel_iommu=on
+APPEND initrd=<%= @initrd %> inst.ks=<%= foreman_url("provision") %> inst.stage2=<%= medium_uri %> local_boot_trigger=<%= foreman_url("built") %> <%= subnet.dhcp ? '' : "ip=#{ip}::#{gw}:#{mask}:#{@host}::none nameserver=#{dns}" %> intel_iommu=on
 IPAPPEND 2
diff --git a/provisioning_templates/provision/kickstart_ovirt.erb b/provisioning_templates/provision/kickstart_ovirt.erb
index 40eb689..8ad3710 100644
--- a/provisioning_templates/provision/kickstart_ovirt.erb
+++ b/provisioning_templates/provision/kickstart_ovirt.erb
@@ -1,6 +1,6 @@
 <%#
 kind: provision
-name: Kickstart oVirt-RHVH
+name: Baremetal Kickstart oVirt-RHVH
 model: ProvisioningTemplate
 oses:
 - oVirt
@@ -36,8 +36,6 @@ view the host is assigned to. It's also possible to provide full url,
 in which case it would be used without a change.
 %>
 
-# This kickstart file was rendered from the Foreman provisioning template "<%= @template_name %>".
-
 install
 <%
 liveimg_name = host_param('liveimg_name') || 'squashfs.img'
@@ -50,13 +48,14 @@ end
 
 liveimg --url=<%= liveimg_url %>
 
-<% subnet = @host.subnet -%>
+<% prov_if = @host.provision_interface -%>
+<% subnet = prov_if.subnet -%>
 <% if subnet.respond_to?(:dhcp_boot_mode?) -%>
 <% dhcp = subnet.dhcp_boot_mode? && !@static -%>
 <% else -%>
 <% dhcp = !@static -%>
 <% end -%>
-network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{@host.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{subnet.dns_servers.join(',')}" %> --hostname <%= @host %> --device=<%= @host.mac -%>
+network --bootproto <%= dhcp ? 'dhcp' : "static --ip=#{prov_if.ip} --netmask=#{subnet.mask} --gateway=#{subnet.gateway} --nameserver=#{subnet.dns_servers.join(',')}" %> --hostname <%= @host %> --device=<%= prov_if.mac -%>
 
 rootpw --iscrypted <%= root_pass %>
 <% if host_param_true?('disable-firewall') -%>
@@ -76,6 +75,13 @@ reboot
 %post --log=/root/ks.post.log --erroronfail
 nodectl init
 <%= snippet 'redhat_register' %>
+
+<% if host_enc['parameters']['realm'] && @host.realm && (@host.realm.realm_type == 'FreeIPA' || @host.realm.realm_type == 'Red Hat Identity Management') -%>
+<%= snippet 'freeipa_register' %>
+<% end -%>
+
+<%= snippet('remote_execution_ssh_keys') %>
+
 <%= snippet 'kickstart_networking_setup' %>
 <%= snippet 'efibootmgr_netboot' %>
 /usr/sbin/ntpdate -sub <%= host_param('ntp-server') || '0.fedora.pool.ntp.org' %>

I am going to incorporate some of the changes, feel free to drop comments in the PR if you feel something is missing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.