diff --git a/openstack/intel-worker/README.md b/openstack/intel-worker/README.md index e4a7ba2..88aee84 100644 --- a/openstack/intel-worker/README.md +++ b/openstack/intel-worker/README.md @@ -1,8 +1,13 @@ # Intel Worker Playbook: Getting Started Guide -* To Add the intel worker to power based ocp cluster use yml file from the playbook folder - `intel-worker-add-playbook.yml` +### Prerequisites: +* OCP cluster has to be in `multi` payload. If its not in `multi` payload the worker will not get added to power based ocp cluster. +* Here is the details of upgrading to multi payload [link](https://docs.openshift.com/container-platform/4.15/updating/updating_a_cluster/migrating-to-multi-payload.html#migrating-to-multi-payload) +* ```oc adm upgrade --to-multi-arch``` -* To cleanup the intel worker use yml file from the playbook folder - `intel-worker-cleanup-playbook.yml` +## Add the intel worker to power based ocp cluster + +* Use yml file from the playbook folder - `intel-worker-create-add-playbook.yml` to add the worker to power based cluster. ``` Note: Update the variables for virtual machine. Below are the mandatory variables to be updated according to the opnstack environment. @@ -13,23 +18,60 @@ Mandatory variables required. which are available in the playbook/roles/vm_creat * vm_create_availability_zone * vm_create_bastion_ip -Note: Do not make changes vm_create_name, if its required to change the name, - please do change in the vm_delete, vm_action, csr_approve, destroy_worker roles default respective varibales. -``` +Note: Do not make changes to vm_create_name, if its required to change the name, + please do change in the vm_delete, vm_action, csr_approve, destroy_worker roles default respective varibales. + which are find in the location below + * playbook/roles/vm_create/defaults/main.yml + * playbook/roles/csr_approve/defaults/main.yml + * playbook/roles/vm_delete/defaults/main.yml + * playbook/roles/destroy_worker/defaults/main.yml + + Also make sure the varibale in the vm_create vm_create_worker_hostname should match the csr_approve of csr_approve_intel_prefix + and csr_approve_intel_zone as shown example below: -## To Run the playbook use below commands + playbook/roles/vm_create/defaults/main.yml + vm_create_worker_hostname: "rdr-mac-worker-openstack" + + playbook/roles/csr_approve/defaults/main.yml + csr_approve_intel_prefix: "rdr-mac" + csr_approve_intel_zone: "openstack" + +``` * To create a intel worker vm from openstack with ignition and add node to cluster with csr approve. ``` cd ocp4-upi-multiarch-compute/openstack/intel-worker/ -ansible-playbook playbooks/intel-worker-add-playbook.yml -vvvv +ansible-playbook playbooks/intel-worker-create-add-playbook.yml -vvvv ``` -* To cleanup the intel worker and delete the worker from openstack + +## To create the image and flavor + +* If there is no pre configured resources like image and flavor are present in the environment. + Then use `intel-worker-create-image-flavor-playbook.yml` playbook. +``` +cd ocp4-upi-multiarch-compute/openstack/intel-worker/ +ansible-playbook playbooks/intel-worker-create-image-flavor-playbook.yml -vvvv +``` + +* If image and flavor are already available on the environment just updated the variable `vm_create_image_name` and `vm_create_flavor` in `playbook/roles/vm_create/defaults/main.yml` file. + + +## To cleanup Run the playbook. + +* To cleanup the intel worker and delete the worker from openstack. ``` cd ocp4-upi-multiarch-compute/openstack/intel-worker/ ansible-playbook playbooks/intel-worker-cleanup-playbook.yml -vvvv ``` +* To cleanup the image and flavor which user has created from openstack. + +``` +cd ocp4-upi-multiarch-compute/openstack/intel-worker/ +ansible-playbook playbooks/intel-worker-cleanup-image-flavor-playbook.yml -vvvv +``` + + ### playbook/roles/vm_create/tasks/main.yml The task create virtual machine on OpenStack. Also it will use the worker ignition at the time of OS boot.