Skip to content

Conversation

@bfournie
Copy link
Contributor

@bfournie bfournie commented Jun 8, 2023

This provides a test for both https://issues.redhat.com/browse/AGENT-558 and https://issues.redhat.com/browse/AGENT-559. It runs the installer commands to create an unconfigured ignition and to create a config-image. It creates an ISO from the unconfigured ignition suitable for booting the VM. It also attaches the config-image to the VM which will be loaded when detected during system boot.

Also adds a new config setting AGENT_APPLIANCE_HOTPLUG that when set will configure the hosts using the unconfigured ignition and then pend for user input before creating the config-image and mounting it to the host. This emulates a situation where a user boots the host first before adding the config-image and continuing the installation.

@rwsu
Copy link
Contributor

rwsu commented Jun 24, 2023

/cc @rwsu

@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 28, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 28, 2023
Copy link
Contributor

@rwsu rwsu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 30, 2023
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 6, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 6, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2023
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 6, 2023
@openshift-merge-robot openshift-merge-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 6, 2023
Copy link
Contributor

@rwsu rwsu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2023

"${openshift_install}" --dir="${asset_dir}" --log-level=debug agent create unconfigured-ignition
base_iso_url=$(oc adm release info --registry-config "$PULL_SECRET_FILE" --image-for=machine-os-images --insecure=true $OPENSHIFT_RELEASE_IMAGE)
oc image extract --path /coreos/coreos-x86_64.iso:$HOME/.cache/agent/image_cache --registry-config "$PULL_SECRET_FILE" --confirm $base_iso_url
Copy link
Member

Choose a reason for hiding this comment

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

This could break for ARM deployments (arch hard-coded to x86_64)?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good catch. Changed to use uname

This provides a test for both https://issues.redhat.com/browse/AGENT-558 and
https://issues.redhat.com/browse/AGENT-559. It runs the installer commands
to create an unconfigured ignition and to create a config-image. It
creates an ISO from the unconfigured ignition suitable for booting the
VM. It also attaches the config-image to the VM which will be loaded
when detected during system boot.
@openshift-ci openshift-ci bot removed the lgtm Indicates that a PR is ready to be merged. label Jul 11, 2023
@andfasano
Copy link
Member

/approve

@openshift-ci
Copy link

openshift-ci bot commented Jul 11, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andfasano

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 11, 2023
Copy link
Contributor

@rwsu rwsu left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 11, 2023
@openshift-merge-robot openshift-merge-robot merged commit 134271c into openshift-metal3:master Jul 11, 2023
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 12, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 14, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
@bfournie bfournie deleted the agent-appliance branch July 17, 2023 02:09
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 18, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 18, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 18, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 19, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 27, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
danielerez added a commit to danielerez/dev-scripts that referenced this pull request Jul 27, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] openshift-metal3#1533
openshift-merge-robot pushed a commit that referenced this pull request Aug 3, 2023
Added support for running the agent flow using the
openshift-appliance[1] disk image.

To invoke the flow, use the following env var in config:
export AGENT_E2E_TEST_BOOT_MODE=DISKIMAGE

The appliance flow is as follows:
* Generate appliance-config.yaml[2]
  * Includes config required for building the appliance
* Build the appliance disk image using the container
  image defined in APPLIANCE_IMAGE env var
* Create the config-image ISO
* Clone the appliance disk image for every node
  * As each node needs a seperate disk for exclusive i/o
* Attach a cloned disk image to each node
* Attach the config-image ISO to all nodes
* Boot all machines from the disk image

Note: based on config-image support PR[3]

[1] https://github.com/openshift/appliance
[2] https://github.com/openshift/appliance/blob/master/docs/user-guide.md#set-appliance-config
[3] #1533
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants