Closed jtprichett closed 6 years ago
Deploy to what? If you mean deploy and run as part of a slave in a pipeline, that is controlled by the pipeline itself. See https://github.com/rht-labs/labs-ci-cd/blob/master/Jenkinsfile#L8
When I run the inventory with casl, it would be nice to control which slave deploys for testing purposes. Instead of deploying all of them.
So jenkins-slaves would be all then another tag would be added underneath for individual slaves.
Running the full inventory will build all the slaves, but it will not directly deploy a pod running the image. Jenkins is responsible for running the pods as slaves using the syntax I shared above. So the java slave today is spun up, but that's the result of Jenkins pipeline running. You can not deploy that build config or even not deploy Jenkins and the slave won't deploy.
If you'd like to limit the slaves that are built, you can use filter tags to deploy a subset of the inventory.
What I am thinking and I might not fully understand, is that right now when deploying all of the components via casl-ansible an example base command would be something along these lines:
ansible-playbook -i inventory/ roles/casl-ansible/playbooks/openshift-cluster-seed.yml --extra-vars="filter_tags=jenkins,jenkins-slaves,projects"
Instead of deploying all slaves I was thinking that having an extra tag under each slave like the ansible slave would allow for redeployment like so:
ansible-playbook -i inventory/ roles/casl-ansible/playbooks/openshift-cluster-seed.yml --extra-vars="filter_tags=ansible-slave, zap-slave"
That way when testing you can tag specific slaves and potentially redeploy via casl as needed.
Ahh ok. Language issue here. You're talking about tags in the inventory. Generally, speaking the language we us in this case is "apply parts of the inventory", since under the covers the oc apply command is used. Deploy generally has a connotation of an app running.
That said, I support tags to be add to the invetory for this use case. I honestly thought we already had them.
Ah, totally makes sense. I am completely self-taught, sorry if my language is a bit off :-p Is this approved?
No prob. Language is a pain.
Yes I support a PR that provides this feature
Another quick question, it seems that within the all.yml
inventory file the ansible slave is being applied twice. Was this intended or a dup?
Appears to be a bad merge. Good catch. The nature of the applier being idempotent means we wont get two copies of the slave, but it is confusing. Let's clean that up with the tags.
resolved by #130
Feature Request
As a developer, I would like more control over which Jenkins Slaves deploy.
Proposed Solution
Add in extra tags under each slave as: jenkins-slave-