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

WIP / PoC: Native multi-cluster openshift-applier run #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

WIP / PoC: Native multi-cluster openshift-applier run #13

wants to merge 1 commit into from

Conversation

oybed
Copy link
Contributor

@oybed oybed commented Apr 7, 2018

What does this PR do?

Proposed example of a multi-cluster openshift-applier run. Would like to discuss this approach.

Note that there's potentially one shortcoming with this approach - i.e.: using kubeconfig with pre/post steps. The pre/post step roles will need to be made kubeconfig aware (unless we find a way to apply it globally on a per-host basis).

How should this be tested?

N/A - proposal up for discussion

Is there a relevant Issue open for this?

N/A - proposal up for discussion

Who would you like to review this?

cc: @redhat-cop/openshift-applier

@oybed oybed added enhancement New feature or request design Architecture and Design conversations labels Apr 7, 2018
@oybed oybed requested review from sabre1041, sherl0cks and etsauer April 7, 2018 17:12
@mike4263
Copy link

mike4263 commented Apr 9, 2018

@oybed Looks good

@etsauer
Copy link
Contributor

etsauer commented Apr 9, 2018

@oybed so, with the changes to the role, would that require any changes to existing inventories?

@oybed oybed changed the title First example of a multi-cluster openshift-applier run WIP: First example of a multi-cluster openshift-applier run Apr 9, 2018
@oybed
Copy link
Contributor Author

oybed commented Apr 9, 2018

@etsauer first off, I just updated the title of this PR with WIP to indicate that this isn't something to merge as-is - at least not yet.

This PR is a proposal for how we can handle multi-clusters. The goal would be to not have to change existing inventories, and that should be doable. However, we need to come up with the "improved story" around how we manage OpenShift login sessions, so the solution should be:

  1. Should be able to use existing inventories as-is (including providing a valid session at runtime)
  2. Provide login info for handling login/session at runtime
  3. Handle multiple clusters (each with separate sessions - either existing of new per 1 & 2 above).

Copy link
Contributor

@etsauer etsauer left a comment

Choose a reason for hiding this comment

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


- name: "Capture OpenShift Config based on token"
command: >
oc login --token={{ openshift_token }} {{ openshift_insecure | ternary('--insecure-skip-tls-verify', '') }} {{ openshift_login_url }}
Copy link
Contributor

Choose a reason for hiding this comment

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

This will cause pre-existing applier inventories to fail if not set. I would suggest two things:

  • first, make this optional. i.e. skip it if these variables are not set
  • set a default value for openshift_insecure so that it is not required.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@etsauer yes, there are multiple things that need to be polished before this can be merged. Main intent for the PR was to have a discussion starting point around the concept (and if it's worth spending time on it)

@etsauer
Copy link
Contributor

etsauer commented Apr 9, 2018

@oybed understood, and I like the approach.

@oybed
Copy link
Contributor Author

oybed commented Apr 9, 2018

Based on the feedback so far, it seems that this approach is worth the effort, so I'll spend some time on finalizing the approach and polish the implementation.

@oybed oybed changed the title WIP: First example of a multi-cluster openshift-applier run WIP: Native multi-cluster openshift-applier run Apr 9, 2018
@etsauer
Copy link
Contributor

etsauer commented Apr 9, 2018

Another use case I would like to see work:

cluster1.yml:

openshift_login_url: https://console.cluster1.example.com
...

cluster2.yml:

openshift_login_url: https://console.cluster2.example.com

Run:

oc login -u bob https://console.cluster1.example.com
Password:
oc login -u bob https://console.cluster2.example.com
Password:
ansible-playbook .... -e openshift_user=bob

@oybed
Copy link
Contributor Author

oybed commented Apr 9, 2018

@etsauer are you ok if the prompts are part of the ansible run? Basically something similar to this:
https://github.com/redhat-cop/infra-ansible/blob/master/playbooks/prep.yml

@oybed oybed changed the title WIP: Native multi-cluster openshift-applier run WIP / PoC: Native multi-cluster openshift-applier run Apr 12, 2018
@oybed oybed mentioned this pull request Jul 18, 2019
@oybed oybed added the do not merge yet Use to hold on merging label Aug 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design Architecture and Design conversations do not merge yet Use to hold on merging enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants