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

Adds browserless login #2

Merged
merged 3 commits into from
Dec 15, 2020

Conversation

iamkirkbater
Copy link
Contributor

Adds browserless login and the ability to automatically log into a cluster on container launch.

@georgettica
Copy link
Contributor

Got some one thing that may help us until srelogin is in a final form:
Can we pull it from the source? On my local setup I put it as a volume and kept pulling it, though for now taking the lastest should work aswell.

@georgettica
Copy link
Contributor

I tried to "merge upstream" the srelogin, and found all we need to so is set one of 4 env vars to make it work without modifications

see closed PR mbarnes/work-environment#3 (comment)

@iamkirkbater
Copy link
Contributor Author

Nice, thanks for the tip @georgettica. I've updated the cluster-login script to what's current as of 10 minutes ago and updated ocm-container.sh to reflect the USER env var (I still want to give flexibility for those who's OCM username might be different from their kerberos username.)

@georgettica
Copy link
Contributor

which is mine aswell, you can always do

$ USER=aaa python3 -c 'import getpass; print(getpass.getuser())'
aaa

and call the srelogin with that argument

@iamkirkbater
Copy link
Contributor Author

Right. If it changed a lot, or on a per-call basis you could do that. But setting it as a config var inside your env.source once is kind of a set-it-and-forget-it-until-you-have-to-set-this-up-again-and-then-you're-confused-because-nothing's-working-the-way-it-used-to approach.

@georgettica
Copy link
Contributor

hahha, oki I am fine with that

@openshift-ci-robot openshift-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. and removed needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. labels Dec 1, 2020
@georgettica
Copy link
Contributor

@drewandersonnz should we do something else before merging?

maybe a knowledge sharing on the internal setup of the configs?

-e "SSH_AUTH_SOCK=/tmp/ssh.sock" \
-e "KRB5CCNAME=/tmp/krb5cc" \
-e "OFFLINE_ACCESS_TOKEN" \
Copy link
Contributor Author

Choose a reason for hiding this comment

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

These need to be set here so that this can become scriptable, as ~.bashrc is not run when the container inits without a TTY.

@georgettica
Copy link
Contributor

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Dec 13, 2020
@iamkirkbater iamkirkbater merged commit 77858ed into openshift:master Dec 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants