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

Extract Infra Provisioning Dependencies from Release Image #8300

Closed

Conversation

patrickdillon
Copy link
Contributor

Extracts terraform & terraform providers from the release image for terraform installs. Extracts kas & etcd for CAPI installs. (CAPI providers would be added in a later iteration.)

Extracting these dependencies from the release image means that Terraform dependencies would be platform specific, and Terraform would only be present on the installer host when the platform requires it.

It would also improve the build process. More details and plans to come.

WIP Getting to compile extract-tf.go changes

Correctly extracting binaries from image

WIP Working TF extraction

WIP working terraform provider

Bootstrap Destroy: Add PullSpec to Metadata

Adds the release image pull spec to the cluster metadata so that
the pull spec can be used to extract terraform providers for bootstrap
destroy.
@@ -0,0 +1,665 @@
package extract
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This code is almost all cut-n-paste from https://github.com/openshift/oc/blob/master/pkg/cli/admin/release/extract_tools.go

commit Marked as WIP because:

  • we can probably simplify more
  • rename
  • debug log messags need to be removed

@patrickdillon
Copy link
Contributor Author

/test altinfra-e2e-aws-ovn altinfra-e2e-azure-capi-ovn altinfra-e2e-gcp-capi-ovn altinfra-e2e-vsphere-capi-ovn

With these changes we would probably be close to getting rid of the altinfra image.

@patrickdillon
Copy link
Contributor Author

oops looks like I forgot to commit changes from go mod tidy will let the tests run and followup on later push

Copy link
Contributor

openshift-ci bot commented Apr 22, 2024

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from patrickdillon. For more information see the Kubernetes Code Review Process.

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

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

Extends the infrastructure provider interface to pass in cluster
metadata for the purpose of using the release image pullspec
contained therein.

In the case of the standalone openshift-install boostrap destroy
command, the tf providers will be extracted from the release image,
but during bootstrap destroy as part of create cluster, the providers
will have already been extracted and reused.

The CAPI infrastructure provider may use this functionality in the
future, but currently standalone bootstrap destroy functionality
is not supported.
@patrickdillon
Copy link
Contributor Author

/test altinfra-e2e-aws-ovn altinfra-e2e-azure-capi-ovn altinfra-e2e-nutanix-capi-ovn altinfra-e2e-vsphere-capi-ovn

1 similar comment
@patrickdillon
Copy link
Contributor Author

/test altinfra-e2e-aws-ovn altinfra-e2e-azure-capi-ovn altinfra-e2e-nutanix-capi-ovn altinfra-e2e-vsphere-capi-ovn

@patrickdillon patrickdillon force-pushed the installer-extract-release branch 2 times, most recently from 8c7763c to faf2fc2 Compare April 22, 2024 23:22
Just need some place to stick the tf binaries so we can test extracting
them. This was an easy way to do that.

We would need to create a new standalone image where these could
be extracted from.
go get github.com/openshift/oc/pkg/cli/image/imagesource@master
go mod tidy && go mod vendor
@patrickdillon
Copy link
Contributor Author

/test altinfra-e2e-aws-ovn

Not sure why capi is failing with:

level=error msg=failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to run cluster api system: failed to run local control plane: unable to start control plane itself: failed to start the controlplane. retried 5 times: timeout waiting for process etcd to start successfully (it may have failed to start, or stopped unexpectedly before becoming ready)

Local testing works fine.

Copy link
Contributor

openshift-ci bot commented Apr 23, 2024

@patrickdillon: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
ci/prow/altinfra-e2e-nutanix-capi-ovn ab13bb2 link false /test altinfra-e2e-nutanix-capi-ovn
ci/prow/altinfra-e2e-aws-ovn 0f3baf7 link false /test altinfra-e2e-aws-ovn
ci/prow/altinfra-e2e-azure-capi-ovn ab13bb2 link false /test altinfra-e2e-azure-capi-ovn
ci/prow/gofmt 0f3baf7 link true /test gofmt
ci/prow/golint 0f3baf7 link true /test golint
ci/prow/okd-e2e-aws-ovn-upgrade 0f3baf7 link false /test okd-e2e-aws-ovn-upgrade
ci/prow/altinfra-e2e-vsphere-capi-ovn ab13bb2 link false /test altinfra-e2e-vsphere-capi-ovn
ci/prow/e2e-azurestack 0f3baf7 link false /test e2e-azurestack
ci/prow/e2e-azure-ovn 0f3baf7 link true /test e2e-azure-ovn
ci/prow/e2e-aws-ovn-single-node 0f3baf7 link false /test e2e-aws-ovn-single-node
ci/prow/e2e-openstack-proxy 0f3baf7 link false /test e2e-openstack-proxy
ci/prow/e2e-metal-ipi-ovn-ipv6 0f3baf7 link true /test e2e-metal-ipi-ovn-ipv6
ci/prow/altinfra-e2e-gcp-capi-ovn e8d9348 link false /test altinfra-e2e-gcp-capi-ovn

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@r4f4
Copy link
Contributor

r4f4 commented Apr 23, 2024

/test altinfra-e2e-aws-ovn

Not sure why capi is failing with:

level=error msg=failed to fetch Cluster: failed to generate asset "Cluster": failed to create cluster: failed to run cluster api system: failed to run local control plane: unable to start control plane itself: failed to start the controlplane. retried 5 times: timeout waiting for process etcd to start successfully (it may have failed to start, or stopped unexpectedly before becoming ready)

Local testing works fine.

Maybe because you're extracting a rhel9-based kas/etcd and running them in an installer container which is rhel8-based?

@r4f4
Copy link
Contributor

r4f4 commented Apr 23, 2024

We need to make sure this works with -multi release payloads as well.

@patrickdillon
Copy link
Contributor Author

/hold

Not a priority ATM.

@openshift-ci openshift-ci bot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Apr 23, 2024
@openshift-merge-robot openshift-merge-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 28, 2024
@openshift-merge-robot
Copy link
Contributor

PR needs rebase.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@r4f4
Copy link
Contributor

r4f4 commented Apr 30, 2024

/test altinfra-e2e-aws-ovn

@patrickdillon
Copy link
Contributor Author

/close

@openshift-ci openshift-ci bot closed this May 15, 2024
Copy link
Contributor

openshift-ci bot commented May 15, 2024

@patrickdillon: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants