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

Add customization option for launching/opening clusters in another window #6

Closed
clcollins opened this issue Dec 11, 2023 · 2 comments · Fixed by #8
Closed

Add customization option for launching/opening clusters in another window #6

clcollins opened this issue Dec 11, 2023 · 2 comments · Fixed by #8

Comments

@clcollins
Copy link
Owner

clcollins commented Dec 11, 2023

SREPD should be customizable to account for individual SREs workflows. One of these flows is launching/opening clusters. Currently OCMContainer is hard-coded, but it would be trivial to allow for a configuration field and flag to allow SREs to set which program to use, and perhaps even which terminal to use.

SREPD should define the API required for this - ie: the command, whatever it is, should accept as it's last argument the CLUSTER_ID followed by any arguments provided by SREPD, with the intent that follow-up arguments are intended to be commands run when logged into the cluster. If no arguments are provided, the user is just intended to be logged into the cluster in another terminal window.

<cluster login command> <CLUSTER_ID provided by SREPD> <optional argument provided by SREPD>

Example:

ocm-container $CLUSTER_ID -- "oc get po"

SREPD will also require a config option and command line flag to turn on or off the sending/parsing of the "commands run when logged into cluster", as some login commands do not support this, eg. ocm backplane login

Done Criteria:

  • A command line flag and a config file field exist to set the command to use to launch into a cluster
  • A command line flag and config file field to turn on or off the sending of "commands to run when logged into cluster"
  • This command should NOT hard code the terminal and flags required to launch a window and keep it open - that should be part of the command provided, eg: /usr/bin/gnome-terminal -- /bin/bash ocm-container, and not /bin/bash ocm-container
  • Help command and README.md updates showing how to incorporate a terminal to setup the command to launch in another window
  • /usr/bin/gnome-terminal -- /usr/bin/env ocm backplane login should be the default
@clcollins
Copy link
Owner Author

Example:

  • ocm workon $CLUSTER_ID
  • iTerm/warm

Example 2:

  • ocm backplane session -c $CLUSTER_ID
  • some other default terminal, or maybe kite

@clcollins
Copy link
Owner Author

Added support in commands.go for custom commands (commit: 188b472) . Just need to allow config and cli setting of other terminals, commands via the "defaultXYZ" variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant