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

Automate Onboarding to Cluster via CLI #24

Closed
HumairAK opened this issue May 12, 2021 · 14 comments
Closed

Automate Onboarding to Cluster via CLI #24

HumairAK opened this issue May 12, 2021 · 14 comments
Assignees
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.

Comments

@HumairAK
Copy link
Member

HumairAK commented May 12, 2021

The steps here should be automated via the opfcli. The tricky part would be handling pgp keys.

Starting out the opfcli should take a config file that essentially imitates the fields from the onboarding issue templated found here.

onboarding_template:
  team_name: example_team
  list_of_namespaces:
    - name: ns_1
      quota: medium
      enable_monitoring: true
    - name: ns_2
      quota: large
      enable_monitoring: false
  list_of_users:
    - user_1
    - user_2
  project_description: "example description"
  env: MOC
  cluster: ZERO
  optional_pgp_keys:
    - key_1
    - key_2

Then for onboarding we can pass it to the cli like so:

$ opfcli onboard cluster --onboard-config config.yaml

cluster should be a subcommand of onboard which should be a subcommand of opfcli (eventually want to add other onboarding subcommands like opfcli onboard argocd).

Currently some of the logic for this process is already implemented, so this sub-command should just be calling that logic. Then add the additional bits for adding the resources to the appropriate cluster/env.

The next step following this issue will be to eventually have people fill out a yaml/form and have a bot perform the PR by running this cli command.

@tumido
Copy link
Member

tumido commented May 12, 2021

I think for the UX it would be better to support both of these 2 options:

  1. Declarative - like the YAML you've mentioned
  2. Interactive - like a wizard (imagine npm init or inquirer that I know from the JS world - I'd prefer to have this in golang in the end though...)

It think this ties back to the ultimate CLI idea we brainstormed some time ago (with no resolution as far as I remember). Ideally it would be nice to have an interactive/declarative wrapper around all these different tasks we'd like to automate.

@HumairAK
Copy link
Member Author

one issue I'm seeing is right now we have a few scripts in bash, one in python (that @larsks has worked on) we will need to narrow down to one language if we are to wrap these, lest we start calling bash / python scripts from golang or something (yuck).

@HumairAK
Copy link
Member Author

also tagging @ipolonsk as she has been helping with automating

@larsks
Copy link
Contributor

larsks commented May 12, 2021

@HumairAK I think we should open a separate issue for that discussion.

@HumairAK
Copy link
Member Author

@HumairAK HumairAK transferred this issue from operate-first/apps May 12, 2021
@HumairAK HumairAK transferred this issue from operate-first/operations Jun 8, 2021
@tumido
Copy link
Member

tumido commented Jun 9, 2021

@goern does Thoth/AICoE-CI use anything for parsing keywords from filed GH issues? Is there anything that we can use to extract data from an issue and feed it to the opfcli?

@larsks larsks changed the title [Automation] Script for automating Onboarding to Cluster Script for automating Onboarding to Cluster Jun 9, 2021
@HumairAK HumairAK changed the title Script for automating Onboarding to Cluster Script for automating Onboarding to Cluster via CLI Jun 29, 2021
@HumairAK
Copy link
Member Author

@larsks @tumido @4n4nd -- I've updated the issue body to reflect the implementation within the cli (before it was a script). If you have feedback/suggestions/improvements please suggest them.

@HumairAK HumairAK changed the title Script for automating Onboarding to Cluster via CLI Automate Onboarding to Cluster via CLI Jun 30, 2021
@sesheta
Copy link
Member

sesheta commented Oct 16, 2021

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@sesheta sesheta added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 16, 2021
@HumairAK
Copy link
Member Author

/remove-lifecycle stale

@sesheta sesheta removed the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Oct 18, 2021
@sesheta
Copy link
Member

sesheta commented Jan 16, 2022

Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.

If this issue is safe to close now please do so with /close.

/lifecycle stale

@sesheta sesheta added the lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. label Jan 16, 2022
@sesheta
Copy link
Member

sesheta commented Feb 15, 2022

Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.

If this issue is safe to close now please do so with /close.

/lifecycle rotten

@sesheta sesheta added lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. and removed lifecycle/stale Denotes an issue or PR has remained open with no activity and has become stale. labels Feb 15, 2022
@HumairAK
Copy link
Member Author

/remove-lifecycle rotten

@sesheta sesheta removed the lifecycle/rotten Denotes an issue or PR that has aged beyond stale and will be auto-closed. label Feb 16, 2022
@goern
Copy link
Member

goern commented Mar 3, 2022

/lifecycle frozen
/kind feature
/priority backlog

@sesheta sesheta added lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. kind/feature Categorizes issue or PR as related to a new feature. priority/backlog Higher priority than priority/awaiting-more-evidence. labels Mar 3, 2022
sesheta pushed a commit that referenced this issue Mar 24, 2022
#24 (#44)

* Kustomize model changes, kustomize util changes, and related other model, api, api/testdata and go mod/sum changes

* Onboard related model, constant, cmd, api, and api/testdata changes or additions

* Documentation and Administrative changes (README.md and OWNERS)
@Gregory-Pereira
Copy link
Member

Since #44 got merged, can I close this issue? Or should I wait for the related changes in the notebook image or aicoe-ci task?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/feature Categorizes issue or PR as related to a new feature. lifecycle/frozen Indicates that an issue or PR should not be auto-closed due to staleness. priority/backlog Higher priority than priority/awaiting-more-evidence.
Projects
None yet
Development

No branches or pull requests

6 participants