This guide provides step-by-step instructions for setting up a bare metal server and bootstrapping a MCC environment.
-
Baremetal Server Requirements:
- Minimum 256 GB memory
- Minimum 32 cores CPU
- Minimum 1 TB storage
-
Operating System:
- Ubuntu 20.04
-
Clone the Repository:
git clone http://github.com/reddydodda/mcc-virtual.git cd mcc-virtual/
The Python script mcc-mosk.py will automates the entire deployment process of MCC and MOSK without any manual steps.
python3 mcc-mosk.py
- Ensure the
hosts.txt
file contains the IP address of your KVM node. - Run the
vbmc
script to create virtual bridges and configure Virtual BMC.
./01-install-vbmc.sh
./02-virt-install.sh --create
./bootstrap_node.sh
sudo reboot
i. Update/Replace mirantis.lic file at kaas-bootstrap/mirantis.lic.
ii. Navigate to the kaas-bootstrap directory.
cd kaas-bootstrap
iii. Execute the bootstrap script.
./bootstrap.sh bootstrapv2
i. Apply the necessary templates using kubectl.
export KUBECONFIG=~/.kube/kind-config-clusterapi
./kaas-bootstrap/bin/kubectl create -f mcc/bootstrapregion.yaml.template
./kaas-bootstrap/bin/kubectl create -f mcc/serviceusers.yaml.template
./kaas-bootstrap/bin/kubectl create -f mcc/cluster.yaml.template
./kaas-bootstrap/bin/kubectl create -f mcc/baremetalhostprofiles.yaml.template
./kaas-bootstrap/bin/kubectl create -f mcc/baremetalhosts.yaml.template
./kaas-bootstrap/bin/kubectl create -f mcc/ipam-objects.yaml.template
./kaas-bootstrap/bin/kubectl create -f mcc/metallbconfig.yaml.template
./kaas-bootstrap/bin/kubectl create -f mcc/machines.yaml.template
kubectl get bmh -o go-template='{{- range .items -}} {{.status.provisioning.state}}{{"\n"}} {{- end -}}'
kubectl get bootstrapregions -o go-template='{{(index .items 0).status.ready}}{{"\n"}}'
kubectl get bootstrapregions -o go-template='{{(index .items 0).status.conditions}}{{"\n"}}'
BMH node status should be available
before approving bootstrap
./kaas-bootstrap/container-cloud bootstrap approve all
kubectl get bmh -o wide
kubectl get lcmmachines -o wide
i. Once lcmmachine is in Ready state, generate the kubeconfig file for the MCC cluster.
../kaas-bootstrap/container-cloud get cluster-kubeconfig --kubeconfig ~/.kube/kind-config-clusterapi --cluster-name kaas-mgmt
ii. Generate Keycloak credentials.
../kaas-bootstrap/container-cloud get keycloak-creds --mgmt-kubeconfig kubeconfig
./bin/kind delete cluster -n clusterapi
./04-mosk-setup.sh
watch "kubectl get bmh -o wide -A ; kubectl get lcmmachines -o wide -A"
kubectl get kcc -o wide -A
kubectl -n {NAMESPACE} get secrets {NAMESPACE}-kubeconfig -o jsonpath='{.data.admin\.conf}' | base64 -d | sed 's/:5443/:443/g' | tee mosk.kubeconfig
kubectl -n openstack-ceph-shared get secrets openstack-ceph-keys -o yaml
kubectl -n rook-ceph exec -it deploy/rook-ceph-tools -- ceph -s
kubectl apply -f mosk/10-osdpl/osdpl-secret.yaml
kubectl apply -f mosk/10-osdpl/osdpl.yaml
kubectl -n openstack get osdplst -o wide
- To clean up the VMs and associated resources, run the following script:
./manage_vms.sh --cleanup