Skip to content

Commit

Permalink
Use the new baremetal ironic pod to deploy the BMO
Browse files Browse the repository at this point in the history
Switch to using the new ironic + baremetal operator pod.

Depends on: metal3-io/baremetal-operator#212
  • Loading branch information
imain committed Jul 10, 2019
1 parent a91b669 commit c55ed9d
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
5 changes: 5 additions & 0 deletions 02_configure_host.sh
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,11 @@ for port in 80 5050 6385 ; do
fi
done

# Allow access to httpd on baremetal network for image cache.
if ! sudo iptables -C INPUT -i baremetal -p tcp -m tcp --dport 80 -j ACCEPT > /dev/null 2>&1; then
sudo iptables -I INPUT -i baremetal -p tcp -m tcp --dport 80 -j ACCEPT
fi

# Allow ipmi to the virtual bmc processes that we just started
if [ "${RHEL8}" = "True" ] ; then
sudo firewall-cmd --zone=libvirt --add-port=6230-6235/udp
Expand Down
15 changes: 14 additions & 1 deletion 08_deploy_bmo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,22 @@ export BMOPATH="$GOPATH/src/github.com/metal3-io/baremetal-operator"
cp -r $BMOPATH/deploy ocp/.
sed -i 's/namespace: .*/namespace: openshift-machine-api/g' ocp/deploy/role_binding.yaml

# Kill the dnsmasq container on the host since it is performing DHCP and doesn't
# allow our pod in openshift to take over.
for name in dnsmasq ironic-inspector ; do
sudo podman ps | grep -w "$name$" && sudo podman stop $name
done

# Start deploying on the new cluster
oc --config ocp/auth/kubeconfig apply -f ocp/deploy/service_account.yaml --namespace=openshift-machine-api
oc --config ocp/auth/kubeconfig apply -f ocp/deploy/role.yaml --namespace=openshift-machine-api
oc --config ocp/auth/kubeconfig apply -f ocp/deploy/role_binding.yaml
oc --config ocp/auth/kubeconfig apply -f ocp/deploy/crds/metal3_v1alpha1_baremetalhost_crd.yaml
oc --config ocp/auth/kubeconfig apply -f ocp/deploy/operator.yaml --namespace=openshift-machine-api

oc --config ocp/auth/kubeconfig apply -f ocp/deploy/ironic_bmo_configmap.yaml --namespace=openshift-machine-api
# I'm leaving this as is for debugging but we could easily generate a random password here.
oc --config ocp/auth/kubeconfig delete secret mariadb-password --namespace=openshift-machine-api || true
oc --config ocp/auth/kubeconfig create secret generic mariadb-password --from-literal password=password --namespace=openshift-machine-api

oc --config ocp/auth/kubeconfig adm --as system:admin policy add-scc-to-user privileged system:serviceaccount:openshift-machine-api:baremetal-operator
oc --config ocp/auth/kubeconfig apply -f ocp/deploy/operator_ironic.yaml -n openshift-machine-api

0 comments on commit c55ed9d

Please sign in to comment.