From f48569b50e368731559a78d70f8df800460724d6 Mon Sep 17 00:00:00 2001 From: Manjunath A Kumatagi Date: Thu, 18 Nov 2021 19:44:28 +0530 Subject: [PATCH 1/2] Add doc for ibmcloud --- docs/ccoctl.md | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/docs/ccoctl.md b/docs/ccoctl.md index 195d4f71aa..65ea3ab342 100644 --- a/docs/ccoctl.md +++ b/docs/ccoctl.md @@ -161,3 +161,55 @@ $ ccoctl gcp delete --name= --project= ``` where `name` is the name prefix used to create cloud resources. `project` is the ID of the gcp project. + +## IBMCloud + +### Global flags + +By default, the tool will output to the directory the command(s) were run in. To specify a directory, use the `--output-dir` flag. + +### Extract the Credentials Request objects from the above release image + +`ccoctl ibmcloud` can process two kind of credentials requests - `IBMCloudProviderSpec`, `IBMCloudPowerVSProviderSpec` and here are the steps to extract them from the release image + +#### IBM Cloud + +This extracts the credentials of kind `IBMCloudProviderSpec` + +```bash +mkdir credreqs ; oc adm release extract --cloud=ibmcloud --credentials-requests $RELEASE_IMAGE --to=./credreqs +``` + +#### IBM Cloud Power VS + +This extracts the credentials of kind `IBMCloudPowerVSProviderSpec` + +```bash +mkdir credreqs ; oc adm release extract --cloud=powervs --credentials-requests $RELEASE_IMAGE --to=./credreqs +``` + +### Creating Service IDs + +This command will create the service ID for each credential request, assign the policies defined, creates an API key in the IBM Cloud and generates the secret. + +```bash +ccoctl ibmcloud create-service-id --credentials-requests-dir --name --resource-group-name +``` + +> Note: --resource-group-name option is optional, but it is recommended to use to have finer grained access to the resources. + +### Refresh the API keys for Service ID + +```bash +ccoctl ibmcloud refresh-keys --kubeconfig --credentials-requests-dir --name +``` + +The above command will replace the old API key with newly created api key, hence all the effecting pods need to be recreated after successful of the command. + +### Deleting the Service IDs + +This command will delete the service id from the IBM Cloud + +```bash +ccoctl ibmcloud delete-service-id --credentials-requests-dir --name +``` From 26edc77996b0cd674b08824f4bb44aba67d21fe6 Mon Sep 17 00:00:00 2001 From: Manjunath A Kumatagi Date: Fri, 19 Nov 2021 19:46:04 +0530 Subject: [PATCH 2/2] add --create option --- docs/ccoctl.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/ccoctl.md b/docs/ccoctl.md index 65ea3ab342..f563a7d273 100644 --- a/docs/ccoctl.md +++ b/docs/ccoctl.md @@ -204,7 +204,9 @@ ccoctl ibmcloud create-service-id --credentials-requests-dir --credentials-requests-dir --name ``` -The above command will replace the old API key with newly created api key, hence all the effecting pods need to be recreated after successful of the command. +> Note: Any new credential request in the credentials request directory will require the --create parameter. + +> **WARNING**: The above command will replace the old API key with newly created api key, hence all the effecting pods need to be recreated after successful of the command. ### Deleting the Service IDs