Skip to content
This repository has been archived by the owner on Jul 23, 2019. It is now read-only.

Provide BareMetalMachineProviderSpec with the right fields #90

Merged
merged 1 commit into from
May 30, 2019

Conversation

sadasu
Copy link
Contributor

@sadasu sadasu commented May 29, 2019

Fixes #87

kni-install will create the master Machines and worker MachineSet
with the baremetal machine providerSpec. cluster-api-provider-baremetal
expects two fields: the image and userdata (checksum URL).
After this change the cluster-api-provider baremetal can now start
using this image provided via the BareMetalMachineProviderSpec instead
of a hard-coded one.

@dhellmann
Copy link
Member

During the initial installation, we're going to need an image source URL that points to the bootstrap node. Once the cluster is up, the Machine and MachineSet values should have a URL that points to the image hosting service running inside the cluster. I don't know if that means we need 2 separate configuration values, or if the value being passed via this change is going to be the correct "day 2" value. What sets the image_source configuration option, and what value is used?

@sadasu
Copy link
Contributor Author

sadasu commented May 29, 2019

Referring to this : https://github.com/metal3-io/cluster-api-provider-baremetal/blob/master/docs/api.md it appears that the values being passed into BareMetalMachineProviderSpec are for day 2.

There is another image in the install-config which can be seen here: https://github.com/openshift-metal3/kni-installer/blob/master/data/data/baremetal/main.tf#L14 and https://github.com/openshift-metal3/kni-installer/blob/master/pkg/tfvars/baremetal/baremetal.go#L37. I am not sure if this is the image to be used in the bootstrap node.

Looking at ocp/install-config.yaml.tmp which is the install-config that is currently being generated by dev-scripts, the value of image source is
image_source: "http://172.22.0.1/images/rhcos-ootpa-latest.qcow2"

@dhellmann
Copy link
Member

Referring to this : https://github.com/metal3-io/cluster-api-provider-baremetal/blob/master/docs/api.md it appears that the values being passed into BareMetalMachineProviderSpec are for day 2.

There is another image in the install-config which can be seen here: https://github.com/openshift-metal3/kni-installer/blob/master/data/data/baremetal/main.tf#L14 and https://github.com/openshift-metal3/kni-installer/blob/master/pkg/tfvars/baremetal/baremetal.go#L37. I am not sure if this is the image to be used in the bootstrap node.

I think that's the image for the bootstrap node, but not the image that the bootstrap node should use to deploy the control plane nodes.

Looking at ocp/install-config.yaml.tmp which is the install-config that is currently being generated by dev-scripts, the value of image source is
image_source: "http://172.22.0.1/images/rhcos-ootpa-latest.qcow2"

OK. That value is only valid for day 1.

I think your change here is good, but that we will have to change the value passed in by the installer to reflect the valid URL for day 2. I don't know how we know what that value is, though.

@imain
Copy link

imain commented May 29, 2019

Referring to this : https://github.com/metal3-io/cluster-api-provider-baremetal/blob/master/docs/api.md it appears that the values being passed into BareMetalMachineProviderSpec are for day 2.
There is another image in the install-config which can be seen here: https://github.com/openshift-metal3/kni-installer/blob/master/data/data/baremetal/main.tf#L14 and https://github.com/openshift-metal3/kni-installer/blob/master/pkg/tfvars/baremetal/baremetal.go#L37. I am not sure if this is the image to be used in the bootstrap node.

I think that's the image for the bootstrap node, but not the image that the bootstrap node should use to deploy the control plane nodes.

Looking at ocp/install-config.yaml.tmp which is the install-config that is currently being generated by dev-scripts, the value of image source is
image_source: "http://172.22.0.1/images/rhcos-ootpa-latest.qcow2"

OK. That value is only valid for day 1.

I think your change here is good, but that we will have to change the value passed in by the installer to reflect the valid URL for day 2. I don't know how we know what that value is, though.

Yes I think this is all correct. I'm not sure where the day 2 URL will come from yet either. I'm hoping we can set up a k8s service and be able to get the address from kubernetes. Haven't gotten to exploring this yet. :/

kni-install will create the master Machines and worker MachineSet
with the baremetal machine providerSpec. cluster-api-provider-baremetal
expects two fields: the image and userdata (checksum URL).
After this change the cluster-api-provider baremetal can now start
using this image provided via the BareMetalMachineProviderSpec instead
of a hard-coded one.
@sadasu sadasu changed the title WIP: Provide BareMetalMachineProviderSpec with the right fields Provide BareMetalMachineProviderSpec with the right fields May 30, 2019
@sadasu
Copy link
Contributor Author

sadasu commented May 30, 2019

Removing WIP status after testing a few times with success.

@russellb
Copy link
Member

Thanks!

@russellb russellb merged commit 7a325e6 into openshift-metal3:master May 30, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Provide the BareMetalMachineProviderSpec with the right fields
4 participants