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

Use new interface to ironic containers. #212

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions deploy/ironic_bmo_configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ metadata:
name: ironic-bmo-configmap
data:
http_port: "6180"
http_ip: "172.22.0.1"
interface: "ens3"
provisioning_interface: "ens3"
provisioning_ip: "172.22.0.3/24"
dhcp_range: "172.22.0.10,172.22.0.100"
deploy_kernel_url: "http://172.22.0.1/images/ironic-python-agent.kernel"
deploy_ramdisk_url: "http://172.22.0.1/images/ironic-python-agent.initramfs"
ironic_endpoint: "http://localhost:6385/v1/"
ironic_inspector_endpoint: "http://localhost:5050/v1/"
deploy_kernel_url: "http://172.22.0.3:6180/images/ironic-python-agent.kernel"
deploy_ramdisk_url: "http://172.22.0.3:6180/images/ironic-python-agent.initramfs"
ironic_endpoint: "http://172.22.0.3:6385/v1/"
ironic_inspector_endpoint: "http://172.22.0.3:5050/v1/"
cache_url: "http://192.168.111.1/images"
rhcos_image_url: "https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/ootpa/410.8.20190520.0/"
Copy link
Member

Choose a reason for hiding this comment

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

This is OpenShift specific, so I would prefer it didn't go anywhere in the baremteal-operator repository

Copy link
Member

Choose a reason for hiding this comment

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

Also this image is now outdated, should be https://releases-art-rhcos.svc.ci.openshift.org/art/storage/releases/rhcos-4.2/420.8.20190624.0/

I guess that will be easier to maintain if we do move this yaml to dev-scripts, until the MAO integration lands (where I assume we can template this in based on knowledge of the release payload cc @sadasu )

163 changes: 141 additions & 22 deletions deploy/operator_ironic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,62 @@ spec:
spec:
serviceAccountName: metal3-baremetal-operator
hostNetwork: true
initContainers:
- name: ipa-downloader
image: quay.io/metal3-io/ironic-ipa-downloader:master
command:
- /usr/local/bin/get-resource.sh
imagePullPolicy: Always
securityContext:
privileged: true
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
env:
- name: CACHEURL
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: cache_url
- name: rhcos-downloader
Copy link
Member

Choose a reason for hiding this comment

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

I don't think we want this in the baremetal-operator pod, long term. The use of RHCOS is OpenShift-specific, and it's also only going to be used for deploying images to build a cluster. We already have users interested in using the BMO for other things, so we're trying to keep that sort of knowledge out of the BMO. We eventually need to move this over to the pod that runs the cluster-api-provider-baremetal controller under OpenShift, since that is the thing that needs to know the IP of the server hosting this image.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

is this something you want addressed now? Honestly not sure how we'd do this another way atm.

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I think this should be removed from this PR since it's OpenShift specific.

It should go somewhere where details of the OpenShift integration are maintained. That's openshift-metal3/dev-scripts short term, and the machine-api-operator longer term (but hopefully ASAP)

Copy link
Member

Choose a reason for hiding this comment

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

Maybe we should just copy this entire yaml to dev-scripts until the MAO change lands?

Copy link
Member

Choose a reason for hiding this comment

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

/cc @sadasu

image: quay.io/openshift-metal3/rhcos-downloader:master
command:
- /usr/local/bin/get-resource.sh
imagePullPolicy: Always
securityContext:
privileged: true
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
env:
- name: RHCOS_IMAGE_URL
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: rhcos_image_url
- name: CACHEURL
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: cache_url
- name: static-ip-set
image: quay.io/metal3-io/static-ip-manager:latest
command:
- /set-static-ip
imagePullPolicy: Always
securityContext:
privileged: true
env:
- name: PROVISIONING_IP
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: provisioning_ip
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: provisioning_interface
containers:
- name: baremetal-operator
image: quay.io/metal3-io/baremetal-operator:master
Expand Down Expand Up @@ -55,7 +111,7 @@ spec:
name: ironic-bmo-configmap
key: ironic_inspector_endpoint
- name: ironic-dnsmasq
image: quay.io/metalkube/metalkube-ironic
image: quay.io/metal3-io/ironic:master
imagePullPolicy: Always
securityContext:
privileged: true
Expand All @@ -70,23 +126,18 @@ spec:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_port
- name: IP
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_ip
key: provisioning_interface
- name: DHCP_RANGE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: dhcp_range
- name: INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: interface
- name: mariadb
image: quay.io/metalkube/metalkube-ironic
image: quay.io/metal3-io/ironic:master
imagePullPolicy: Always
securityContext:
privileged: true
Expand All @@ -102,7 +153,7 @@ spec:
name: mariadb-password
key: password
- name: ironic-httpd
image: quay.io/metalkube/metalkube-ironic
image: quay.io/metal3-io/ironic:master
imagePullPolicy: Always
securityContext:
privileged: true
Expand All @@ -117,18 +168,44 @@ spec:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_port
- name: IP
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: provisioning_interface
- name: ironic-conductor
image: quay.io/metal3-io/ironic:master
imagePullPolicy: Always
securityContext:
privileged: true
command:
- /bin/runironic-conductor
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
env:
- name: MARIADB_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-password
key: password
- name: HTTP_PORT
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_port
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_ip
- name: ironic
image: quay.io/metalkube/metalkube-ironic
key: provisioning_interface
- name: ironic-api
image: quay.io/metal3-io/ironic:master
imagePullPolicy: Always
securityContext:
privileged: true
command:
- /bin/runironic
- /bin/runironic-api
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
Expand All @@ -143,27 +220,69 @@ spec:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_port
- name: IP
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: provisioning_interface
- name: ironic-exporter
image: quay.io/metal3-io/ironic:master
imagePullPolicy: Always
securityContext:
privileged: true
command:
- /bin/runironic-exporter
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
env:
- name: MARIADB_PASSWORD
valueFrom:
secretKeyRef:
name: mariadb-password
key: password
- name: HTTP_PORT
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: http_ip
- name: INTERFACE
key: http_port
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: interface
key: provisioning_interface
- name: ironic-inspector
image: quay.io/metalkube/metalkube-ironic-inspector
image: quay.io/metal3-io/ironic-inspector:master
imagePullPolicy: Always
securityContext:
privileged: true
volumeMounts:
- mountPath: /shared
name: ironic-data-volume
env:
- name: INTERFACE
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: provisioning_interface
- name: static-ip-refresh
image: quay.io/metal3-io/static-ip-manager:latest
command:
- /refresh-static-ip
imagePullPolicy: Always
securityContext:
privileged: true
env:
- name: PROVISIONING_IP
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: provisioning_ip
- name: PROVISIONING_INTERFACE
valueFrom:
configMapKeyRef:
name: ironic-bmo-configmap
key: interface
key: provisioning_interface
volumes:
- name: ironic-data-volume
emptyDir: {}