Bug 1186915 - [RFE] Satellite should be able to deploy image payloads (see anaconda's liveimg directive)
Summary: [RFE] Satellite should be able to deploy image payloads (see anaconda's livei...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Provisioning
Version: Unspecified
Hardware: Unspecified
OS: Unspecified
urgent
high vote
Target Milestone: Unspecified
Assignee: Ivan Necas
QA Contact: Sanket Jagtap
URL:
Whiteboard:
Depends On:
Blocks: ovirt-node-ng-43-el76-platform 1484532
TreeView+ depends on / blocked
 
Reported: 2015-01-28 21:03 UTC by Fabian Deutsch
Modified: 2020-06-22 18:17 UTC (History)
27 users (show)

Fixed In Version: tfm-rubygem-katello-3.4.5.64.1-1,foreman-1.15.6.37-1,tfm-rubygem-katello-3.4.5.64.2-1,foreman-1.15.6.38-1,tfm-rubygem-katello-3.4.5.69-1
Doc Type: Enhancement
Doc Text:
Clone Of:
: 1572297 (view as bug list)
Environment:
Last Closed: 2018-05-15 15:31:05 UTC
Target Upstream Version:


Attachments (Terms of Use)
Usage notes (2.31 KB, text/plain)
2018-04-26 17:11 UTC, Ivan Necas
no flags Details


Links
System ID Priority Status Summary Last Updated
Foreman Issue Tracker 22736 Normal Closed adding support for liveimg 2020-09-10 12:03:25 UTC
Foreman Issue Tracker 23478 Normal Closed Include content view in @repository_url@ helper, if applicable 2020-09-10 12:03:25 UTC
Github /theforeman community-templates pull 460 None None None 2020-09-10 12:03:24 UTC
Github /theforeman community-templates pull 466 None None None 2020-09-10 12:03:24 UTC
Red Hat Bugzilla 1140646 'urgent' 'CLOSED' '[RFE] [Tracker] Node next-gen tracker' 2019-12-02 12:33:20 UTC
Red Hat Product Errata RHEA-2018:1462 None None None 2018-05-15 15:31:21 UTC

Internal Links: 1140646

Description Fabian Deutsch 2015-01-28 21:03:37 UTC
Description of problem:
Anaconda has teh ability to install a host from a liveimg: https://fedoraproject.org/wiki/Anaconda/Kickstart#liveimg 

Satelltie 6 should support this too, to enable the deployment of image based products.

Comment 1 RHEL Program Management 2015-01-28 21:03:44 UTC
Since this issue was entered in Red Hat Bugzilla, the release flag has been
set to ? to ensure that it is properly evaluated for this release.

Comment 3 Fabian Deutsch 2015-01-28 21:06:12 UTC
This feature could be used to deploy next generation of RHEV-H.

Comment 8 Bryan Kearney 2016-07-08 20:31:08 UTC
Per 6.3 planning, moving out non acked bugs to the backlog

Comment 13 Fabian Deutsch 2016-07-28 12:44:01 UTC
Can someone set the RHEV layered product?

Comment 14 Yaniv Lavi 2016-09-19 08:57:07 UTC
(In reply to Fabian Deutsch from comment #13)
> Can someone set the RHEV layered product?

I don't believe that layer product exists in this bugzilla product.

Comment 17 Evgeni Golov 2017-09-20 08:38:40 UTC
The documentation has moved, it's now on http://pykickstart.readthedocs.io/en/latest/kickstart-docs.html#liveimg

Comment 18 Yaniv Lavi 2017-11-01 10:45:18 UTC
Can you reply to comment #15?

Comment 23 Ivan Necas 2018-04-26 17:10:08 UTC
The cherry-picks are opened.

Usage/verification notes.

The introduction to the hypervisor provisioning is available in lzap's short walk-through https://www.youtube.com/watch?v=L6IvTkjhSx8&feature=youtu.be

To use the Satellite-managed content, one can follow this steps (with possible customizations if needed):

ORG="Default Organization"
PRODUCT="RHVH"
REPO="image"
IMG_PATH="squashfs.img"
AK="rhvh"
CONTENT_VIEW="Default Organization View"
OS="RedHat 7.4"
CONTENT_SOURCE_ID=1 # id of smart proxy/capsule to be used as content source
HOSTGROUP="RHVH"
SUBSCRIPTION="4028f9505ffd45930160083350a31bfb" # subscription id to be use for subscribing the hypervisor

# Download the hypervisor ISO from https://access.redhat.com/downloads/content/150/ver=4.1/rhel---7/4.1/x86_64/product-software (something like RHVH-4.1-20180315.0-RHVH-x86_64-dvd1.iso)

# mount the iso:
mkdir -p /media/rhvh
mount -o loop RHVH-4.*-RHVH-x86_64-dvd1.iso /media/rhvh

# extract the squashfs image
rpm2cpio /media/rhvh/Packages/redhat-virtualization-host-image-update* | cpio -idmv
mv usr/share/redhat-virtualization-host/image/redhat-virtualization-host-*.el7_4.squashfs.img "$IMG_PATH"

# Prepare repository and upload the image
hammer product create --name "$PRODUCT" --organization "$ORG"
hammer repository create --name "$REPO" --product "$PRODUCT" --organization "$ORG" --content-type=file
hammer repository upload-content --name "$REPO" --product "$PRODUCT" --organization "$ORG" --path "$IMG_PATH"

# Prepare activation key
hammer activation-key create --name "$AK" --content-view "$CONTENT_VIEW" --lifecycle-environment Library  --organization "$ORG" 
hammer activation-key add-subscription --name "$AK" --subscription-id="$SUBSCRIPTION" --organization "$ORG"

# create a host group
hammer hostgroup create --name "$HOSTGROUP" --architecture=x86_64 --operatingsystem="$OS" --lifecycle-environment="Library" --content-view="$CONTENT_VIEW" --query-organization="$ORG" --content-source-id="$CONTENT_SOURCE_ID" --partition-table="Kickstart default thin" --pxe-loader="PXELinux BIOS"
hammer hostgroup set-parameter --hostgroup "$HOSTGROUP" --name "kt_activation_keys" --value="$AK"
hammer hostgroup set-parameter --hostgroup "$HOSTGROUP" --name "liveimg_name" --value="custom/$PRODUCT/$REPO/squashfs.img"

# assign the templates to host group
hammer template add-operatingsystem --name 'Kickstart oVirt-RHVH' --operatingsystem "$OS"
hammer template add-operatingsystem --name 'Kickstart oVirt-RHVH PXELinux' --operatingsystem "$OS"

# to assign the templates to the host group, one needs to go to WEBUI editing page of 'Kickstart oVirt-RHVH' and 'Kickstart oVirt-RHVH PXELinux', and in 'Associations' tab, add combination with $HOSTGROUP combination

# After thins, the hostgroup should be ready to be used for provisioning the RHV hypervisor using the squashfs image

Comment 24 Ivan Necas 2018-04-26 17:11:59 UTC
Created attachment 1427333 [details]
Usage notes

I've realized the bugzilla comments is not the best way to share the usage script due to wrapping, attaching it as file

Comment 31 pm-sat@redhat.com 2018-05-02 12:16:35 UTC
Upstream bug assigned to inecas@redhat.com

Comment 32 pm-sat@redhat.com 2018-05-02 12:16:45 UTC
Upstream bug assigned to inecas@redhat.com

Comment 41 Sanket Jagtap 2018-05-08 10:56:54 UTC
Build: Satellite 6.3.1.1 Snap2

I see the templates are rendered correctly, but still I am not able to provision using any other CV and Lifecycle Environment 

I noticed that, while fetching the file from Installation media

http://sat-host/pulp/isos/Default_Organization/Library/custom/RHVH/image/squashfs.img

While provisioning the Installation media is appended by
 
http://sat-host/pulp/isos/Default_Organization/Library/custom/RHVH/image/LiveOS/squashfs.img
PFA

Am I missing something? 

I am using the published URL that Satellite generated when the repository was created as the URL for installation media

This Only happens in case of have the host provisioned in a CV under some Lifecycle

The provision happens successfully for "Default Org View and Library"

Comment 47 Sanket Jagtap 2018-05-11 07:00:17 UTC
Build: Satellite 6.3.1.1 Snap3

The RHVH box was provisioned and registered successfully

Updating / installing...
katello-ca-consumer-qe-sat6-feature-rh########################################
Registering the System
The system has been registered with ID: ec358493-d8a1-4111-af1f-8a4cffd4af4d 

Installed Product Current Status:
Product Name: Red Hat Virtualization Host
Status:       Subscribed

Installing Katello Agent



Complete!
Note: Forwarding request to 'systemctl enable goferd.service'.
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0
Running in chroot, ignoring request.

Comment 50 errata-xmlrpc 2018-05-15 15:31:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2018:1462

Comment 52 Fabian Deutsch 2018-05-24 10:10:36 UTC
Wow. So nice.


Note You need to log in before you can comment on or make changes to this bug.