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

OCTOPUS-625:Added role for approve and issue csr cert and get vm file #21

Merged
merged 1 commit into from
Apr 25, 2024

Conversation

pkenchap
Copy link
Collaborator

Added the role for approve and issue csr certificate .
Also added get vm file with wait until VM comes to active state.

@pkenchap pkenchap self-assigned this Apr 19, 2024
@pkenchap pkenchap requested a review from prb112 April 19, 2024 10:01

# Re-read the 'Ready' count
READY_COUNT=$(oc get nodes -l kubernetes.io/arch=amd64 | grep "${MACHINE_PREFIX}" | grep -v NotReady | grep -c Ready)
done
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hey @pkenchap @Chandan-Abhyankar refactored this script recently at https://github.com/IBM/ocp4-upi-compute-powervs/blob/main/ansible/post/files/approve_and_issue.sh. it'd be worth pulling that in here. and removing the reference to the proxy.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@prb112 , Used the same script and modified with removing the proxy .

Copy link
Collaborator

@prb112 prb112 left a comment

Choose a reason for hiding this comment

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

a couple of suggestions are left inline

@pkenchap pkenchap force-pushed the approve-issue branch 2 times, most recently from 7122d58 to 9e17b54 Compare April 24, 2024 11:23
@pkenchap
Copy link
Collaborator Author

Hi Paul,

Looping I updated the script and it works seemlessly for the approve and issue .
Here I had created a 3 VM's and all approved and added to the Cluster
`
"Approve and Issue - #3",

    "List of Intel Workers to be added with prefix 'rdr-mac-worker-openstack': ",
    "rdr-mac-worker-openstack-1   NotReady                   worker   2m6s    v1.28.3+4cbdd29",
    "rdr-mac-worker-openstack-2   NotReady                   worker   2m3s    v1.28.3+4cbdd29",
    "rdr-mac-worker-openstack-3   Ready                      worker   59s     v1.28.3+4cbdd29",
    "",
    "Approving: csr-c79xz system:node:rdr-mac-worker-openstack-1",
    "certificatesigningrequest.certificates.k8s.io/csr-c79xz approved",
    "Approving: csr-s4sks system:node:rdr-mac-worker-openstack-1",
    "certificatesigningrequest.certificates.k8s.io/csr-s4sks approved",
    "Approving: csr-tjrnc system:node:rdr-mac-worker-openstack-1",
    "certificatesigningrequest.certificates.k8s.io/csr-tjrnc approved",
    "Approving: csr-wlshr system:node:rdr-mac-worker-openstack-1",
    "certificatesigningrequest.certificates.k8s.io/csr-wlshr approved",
    "Approving: csr-z2c89 system:node:rdr-mac-worker-openstack-1",
    "certificatesigningrequest.certificates.k8s.io/csr-z2c89 approved",
    "Approving: csr-zkbl5 system:node:rdr-mac-worker-openstack-1",
    "certificatesigningrequest.certificates.k8s.io/csr-zkbl5 approved",
    "Approving: csr-f7m8z system:node:rdr-mac-worker-openstack-2",
    "certificatesigningrequest.certificates.k8s.io/csr-f7m8z approved",
    "Approving: csr-lcnkp system:node:rdr-mac-worker-openstack-2",
    "certificatesigningrequest.certificates.k8s.io/csr-lcnkp approved",
    "Approving: csr-m6khm system:node:rdr-mac-worker-openstack-2",
    "certificatesigningrequest.certificates.k8s.io/csr-m6khm approved",
    "Approving: csr-rb42m system:node:rdr-mac-worker-openstack-2",
    "certificatesigningrequest.certificates.k8s.io/csr-rb42m approved",
    "Approving: csr-wdrvh system:node:rdr-mac-worker-openstack-2",
    "certificatesigningrequest.certificates.k8s.io/csr-wdrvh approved",
    "Approving: csr-zqwqc system:node:rdr-mac-worker-openstack-2",
    "certificatesigningrequest.certificates.k8s.io/csr-zqwqc approved",
    "Sleeping before re-running - 30 seconds",
    "Supplied Worker/s with prefix: 'rdr-mac-worker-openstack' are Ready.",
    "rdr-mac-worker-openstack-1   Ready                      worker   3m9s    v1.28.3+4cbdd29",
    "rdr-mac-worker-openstack-2   Ready                      worker   3m6s    v1.28.3+4cbdd29",
    "rdr-mac-worker-openstack-3   Ready                      worker   2m2s    v1.28.3+4cbdd29"

`

I had made the looping in the playbook will go in iteration of creating the VM's as per the user requirement of worker nodes.

image

image

@prb112 prb112 merged commit 1c53689 into ocp-power-automation:main Apr 25, 2024
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants