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

[CLI] Compatible with Apps and Marketplace #30095

Closed
toddexp opened this issue Nov 16, 2020 · 10 comments
Closed

[CLI] Compatible with Apps and Marketplace #30095

toddexp opened this issue Nov 16, 2020 · 10 comments

Comments

@toddexp
Copy link

toddexp commented Nov 16, 2020

The rancher-cli is not currently compatible with the new apps and marketplace charts in Rancher 2.5. The rancher-cli is helpful with automation and not having this feature in the cli is an impediment. The rancher-cli is helpful with automation because it has auth into the clusters. Using the helm cli would require having a kubeconfig file which at new cluster creation with automation is not setup. Rancher also stores the helm repositories rather than the repositories having to be stored locally. This makes the automation tools more repeatable for users.

What kind of request is this (question/bug/enhancement/feature request):
Enhancement

Steps to reproduce (least amount of steps as possible):
rancher app install rancher-monitoring rancher-monitoring

Result:
This deploys rancher-monitoring from the 2.4 apps catalog. There is no way to deploy the one from the 2.5 apps and marketplace.

Other details that may be helpful:
Any other commands from rancher apps is only interacting with the 2.4 catalogs. Commands like rancher apps ls or rancher apps lt only shows the apps and repositories from 2.4 and not what is in from 2.5.

Environment information

  • Rancher version (rancher/rancher/rancher/server image tag or shown bottom left in the UI): 2.5.1
  • Installation option (single install/HA): HA
  • Rancher cli: 2.4.7
@Daniel-Vaz
Copy link

I there any workaround for this issue ?

@hari-narayanan94
Copy link

hari-narayanan94 commented Nov 18, 2020

I am also looking for a solution for the above stated probelm , i was looking to automate K8s setup end to end and iam stuck as iam not able to install rancher-istio programmatically. On the other hand I was not able to get it to work even via helm , for some reason iam not able to add the helm chart repo of racher . @toddexp can you please let me know how we can get rancher apps to install atleast via helm , i am not able to grab the rancher charts even via helm

@toddexp
Copy link
Author

toddexp commented Nov 18, 2020

Hi @hari-narayanan94. I am another community member like yourself, I do not work at Rancher. I am not sure of a workaround. I have not yet tried to use the regular helm cli. I may try this soon. If I make any progress with that I will be sure to share.

@hari-narayanan94
Copy link

@loganhz Can you please guide if there is any way we could install charts from apps and marketplace into a cluster via rancher programmatically via API or helm or any means ?? Iam looking to install rancher-istio and rancher-monitoring

@toddexp
Copy link
Author

toddexp commented Nov 18, 2020

I was able to find a workaround with the helm cli. I would still prefer the rancher cli for the reasons listed when opening this issue.

I assume you are also trying to do automation from your comments, so this was all the steps I needed. The kubeconfig steps may be able to be omitted depending on your use case.

# create temporary kubeconfig file to be used later with helm
rancher cluster kubeconfig {CLUSTER_ID} > {/path/to/temp/kubeconfig}

# add rancher repo to helm
helm repo add {REPO_NAME} http://charts.rancher.io/

# install helm chart using temporary kubeconfig file
# used rancher-monitoring as an example since that was the one used in the initial example
helm upgrade --kubeconfig={/path/to/temp/kubeconfig} --install=true --namespace=cattle-monitoring-system --wait=true rancher-monitoring-crd {REPO_NAME}/rancher-monitoring-crd
helm upgrade --kubeconfig={/path/to/temp/kubeconfig} --install=true --namespace=cattle-monitoring-system --wait=true rancher-monitoring {REPO_NAME}/rancher-monitoring

Additionally Terraform should be able to deploy the new apps and market place charts as well. I have not personally tested this, however.

@hari-narayanan94
Copy link

hari-narayanan94 commented Nov 19, 2020

@toddexp
I was also able to find out a way to trigger this via Rancher API using this endpoint , i wanted to use Rest API where ever possible to omit dependency on helm cli

{rancher-url}/k8s/clusters/{rancher-clusterid}/v1/catalog.cattle.io.clusterrepos/rancher-charts?action=install

@stale
Copy link

stale bot commented Jul 9, 2021

This repository uses a bot to automatically label issues which have not had any activity (commit/comment/label) for 60 days. This helps us manage the community issues better. If the issue is still relevant, please add a comment to the issue so the bot can remove the label and we know it is still valid. If it is no longer relevant (or possibly fixed in the latest release), the bot will automatically close the issue in 14 days. Thank you for your contributions.

@stale stale bot added the status/stale label Jul 9, 2021
@stale stale bot closed this as completed Jul 23, 2021
@fabiorauber
Copy link

Still relevant.

@sneumann
Copy link

At least should be documented more visibly. There is some notion of the difference in https://rancher.com/docs/rancher/v2.6/en/helm-charts/, but nothing mentions how to do that on the command line. Yours, Steffen

@Yagya-omnius
Copy link

This is blocking operations via cli, can someone please look into this ?

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

No branches or pull requests

6 participants