Adding Vsphere Functionality to deployment #489
Adding Vsphere Functionality to deployment #489tosin2013 wants to merge 103 commits intorh-ecosystem-edge:mainfrom
Conversation
|
ready to review or draft yet? |
I am working on the code now I will have a draft of the steps later today. |
contrib/deploy-aap/deploy.sh
Outdated
| OC_COMMAND=$(oc get csv -n ansible-automation-platform | grep "Ansible Automation Platform" | grep Succeeded | wc -l) | ||
| timeout=0 | ||
| while [ "${timeout}" -lt "120" ]; do | ||
| if [[ ${OC_COMMAND} -eq 1 ]]; then | ||
| ready=true | ||
| break | ||
| fi | ||
| echo "Wait for Ansible Automation Platform" | ||
| sleep 5 | ||
| timeout=$((timeout + 1)) | ||
| OC_COMMAND=$(oc get csv -n ansible-automation-platform | grep "Ansible Automation Platform" | grep Succeeded | wc -l) | ||
| done |
There was a problem hiding this comment.
In the common.sh file there is a check_resources which do exactly this part. An example:
echo "Installing NFD operator for ${edgecluster}"
oc --kubeconfig=${EDGE_KUBECONFIG} apply -f manifests/01-nfd-namespace.yaml
sleep 2
oc --kubeconfig=${EDGE_KUBECONFIG} apply -f manifests/02-nfd-operator-group.yaml
sleep 2
oc --kubeconfig=${EDGE_KUBECONFIG} apply -f manifests/03-nfd-subscription.yaml
sleep 2
check_resource "crd" "nodefeaturediscoveries.nfd.openshift.io" "Established" "openshift-nfd" "${EDGE_KUBECONFIG}"
contrib/deploy-aap/deploy.sh
Outdated
| echo ">>>> Wait until acm ready" | ||
| echo ">>>>>>>>>>>>>>>>>>>>>>>>>" | ||
| timeout=0 | ||
| ready=false | ||
| sleep 240 | ||
| while [ "${timeout}" -lt "120" ]; do | ||
| if [[ $(oc get pod -n ansible-automation-platform | grep ac- | grep -i running | wc -l) -eq $(oc get pod -n ansible-automation-platform | grep ac- | wc -l) ]]; then | ||
| ready=true | ||
| break | ||
| fi | ||
| sleep 5 | ||
| timeout=$((timeout + 1)) |
contrib/deploy-aap/verify.sh
Outdated
| # Load common vars | ||
| source ${WORKDIR}/shared-utils/common.sh | ||
|
|
||
| echo "development" |
There was a problem hiding this comment.
Just to make it clear, the idea of the contrib framework is to have an interface with 2 functions:
- Deploy.sh -> deploy resources for a specific resource/operator/item
- Verify.sh -> verify if there's present to skip this task. The verification should be a functional test to know if the resources are ready and running.
So, said that, in this part an example of verify could be:
| @@ -0,0 +1,17 @@ | |||
| #!/usr/bin/env bash | |||
| @@ -0,0 +1,4 @@ | |||
| kind: Namespace | |||
There was a problem hiding this comment.
Why do we need gitea? Maybe I'm wrong or missing something but I think we don't need argocd to deploy it
There was a problem hiding this comment.
gitea is used for organizations that do not have access to github.com or bitbucket to stand up a repo and point to this one https://github.com/Red-Hat-SE-RTO/openshift-ztp. There are some users that have proxy issues or firewall issues that do not allow them to access git repo.
| @@ -0,0 +1,94 @@ | |||
| apiVersion: tekton.dev/v1beta1 | |||
There was a problem hiding this comment.
this file should be placed on folder contrib like:
https://github.com/rh-ecosystem-edge/ztp-pipeline-relocatable/tree/33f65288208908623e96fd82269bd381c0ba6560/pipelines/resources/contrib
this is the way to use contrib resources in our pipeline
There was a problem hiding this comment.
also there, you've got a template file created just to copy and paste modifying the resources and deployments you need to use in your case
| - deploy-ztp-hub-mce.yaml | ||
| - deploy-ztp-edgeclusters.yaml | ||
| - deploy-ztp-edgeclusters-sno.yaml | ||
| - deploy-ztp-vsphere.yaml |
There was a problem hiding this comment.
same the folder is contrib/
shared-utils/verify_preflight.sh
Outdated
| echo ">>>> Verify oc get nodes" | ||
| echo ">>>>>>>>>>>>>>>>>>>>>>>>>" | ||
| if [[ $(oc get nodes | grep -i ready | wc -l) -ne 1 ]] && [[ $(oc get nodes | grep -i ready | wc -l) -ne 3 ]]; then | ||
| # TO-DO: Installed Vshpere with assisted installer and enable vshpere during deployment |
There was a problem hiding this comment.
don't understand this comment TO-DO, why do you need to install vsphere with AI?
There was a problem hiding this comment.
Right one my vSphere cluster has 3 masters and 3 workers so it is failing on the check. I wanted to add the vShpere check because I know that baremetal can be sno or 3 nodes. vShpere can have more that 3 worker nodes in some environments.
|
First of all thanks @tosin2013 for the contribution, I've done a previous review just to give you some feedback. If you need help or make something more clear just ping me ok? |
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Description
Adding vShpere functionality to integrate with the following repo https://github.com/Red-Hat-SE-RTO/openshift-ztp.
Fixes # (issue)
Type of change
Please select the appropriate options:
Testing
Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration
Test Configuration:
Checklist