redhat-cop / casl-ansible

Ansible automation for Managing OpenShift Container Platform clusters
Apache License 2.0
121 stars 82 forks source link

openshift-applier: Discuss how to handle timing of operations which require ordered execution #101

Open InfoSec812 opened 6 years ago

InfoSec812 commented 6 years ago

For example:

  1. Deploy SonarQube - Takes a while because of provisioning and build
  2. Deploy Jenkins - Requires a running instance of SonarQube in order to set up authentication token

Can we, and if so how, address these "order of operation" issues?

oybed commented 6 years ago

@InfoSec812 as you may have heard me refer to a few times, we are planning to introduce "custom steps" as part of the openshift-applier. These will be able to accommodate what you are asking for here.

InfoSec812 commented 6 years ago

Woot! That would certainly help.

makentenza commented 6 years ago

@oybed @InfoSec812 should we move this to the new applier repository?

InfoSec812 commented 6 years ago

@makentenza I believe so

oybed commented 6 years ago

@makentenza @InfoSec812 this is already handled. The "custom steps" mentioned earlier is the pre/post steps. We already have examples of using this to "wait" till something is ready for consumption. Including the following (waiting for nexus to be ready + apply configuration): https://github.com/rht-labs/labs-ci-cd/blob/master/inventory/host_vars/ci-cd-tooling.yml#L103-L104

We also have various roles in casl-ansible that can be used to check for readiness of routes, replicas, etc.: https://github.com/redhat-cop/casl-ansible/tree/master/roles/openshift-replicas-ready https://github.com/redhat-cop/casl-ansible/tree/master/roles/openshift-route-status

With this in mind, I'd suggest we just close this issue as-is.