### Verify Persistent Volume Creation Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=troubleshooting-issues-in-installation Commands to describe individual persistent volumes (PVs) to ensure they have been created successfully. Use this to diagnose PV setup issues. ```bash kubectl describe pv core-couchdb-pv0 ``` ```bash kubectl describe pv mariadb-tmp-pv0 ``` ```bash kubectl describe pv mariadb-data-pv0 ``` ```bash kubectl describe pv cam-data-pv0 ``` ```bash kubectl describe pv mariadb-backup-pv0 ``` ```bash kubectl describe pv cam-rabbitmq-pv0 ``` -------------------------------- ### vSphere Asset Collector CLI Configuration Example Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=accounts-private-cloud This example demonstrates the configuration required for the vSphere Asset Collector CLI. It includes details on credentials, account, provider, and region code, which are essential for connecting to the vSphere environment and collecting asset data. ```yaml # Example configuration for vSphere Asset Collector CLI credentials: "" account: "" provider: "" region_code: "" ``` -------------------------------- ### Install Library using Shell Script Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=accounts-adding-custom-provider-manually-without-gpd-file This command installs the library as an executable package using the provided shell script. It is a prerequisite for accessing the GPD automation tools. Ensure the script has execute permissions before running. ```shell sh install.sh ``` -------------------------------- ### NFS /etc/exports Settings Reference (Sample) Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=installation-creating-cost-asset-management-persistent-volumes A sample reference for configuring NFS /etc/exports settings. This section provides examples for NFSv2/v3 and NFSv4, illustrating how to define shared file systems and access controls for clients. ```text # /etc/exports: the access control list for filesystems that can be exported # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) # # Example for NFSv4: # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) ``` -------------------------------- ### Extracting Installation Archives using tar command Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=installation-installing-cloud-cost-asset-management-private-cloud-adapter These commands are used to extract the contents of the downloaded IBM Cloud Cost and Asset Management Private Cloud Adapter package. The first command extracts the main package, and the second extracts the pre-post installation scripts. ```bash tar -xvf icp-ccam-private-x86-3.2.0.0.tar.gz tar -xvf pre-post-install.tar.gz ``` -------------------------------- ### Shell script to install Openstack collector Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=accounts-configuring-deploying-openstack-providers This command runs the main installation script for the Openstack collector. The `-c` and `-f` flags are used, and it requires the `installOpenstack.properties` file. This script performs actions like creating namespaces, secrets, deployments, and registering the provider in ICCAM. ```bash sh installOpenstack.sh -c -f installOpenstack.properties ``` -------------------------------- ### NFS /etc/exports settings reference sample Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=pi-creating-cost-asset-management-private-cloud-adapter-persistent-volumes This is a reference sample for NFS /etc/exports settings, used to control access to filesystems for NFS clients. It shows examples for NFSv2, NFSv3, and NFSv4, and a general export configuration. ```text # /etc/exports: the access control list for filesystems that can be exported # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) # # Example for NFSv4: # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) # /export *(rw,sync,no_root_squash,no_subtree_check) ``` -------------------------------- ### Executing Private Cloud Adapter Installation Script Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=installation-installing-cloud-cost-asset-management-private-cloud-adapter This command executes the shell script responsible for creating the necessary namespace and secrets for the IBM Cloud Cost and Asset Management Private Cloud Adapter. It requires the 'installPrivateCloud.properties' file for configuration. ```bash sh installPrivateCloud.sh -c -f installPrivateCloud.properties ``` -------------------------------- ### Example PersistentVolume for Openstack Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=accounts-configuring-deploying-openstack-providers This snippet shows the structure of a PersistentVolume (PV) definition in YAML format for Openstack. It specifies storage class, capacity, access modes, and NFS server details. Ensure the 'server' and 'path' values are updated to match your NFS setup. ```yaml kind: PersistentVolume apiVersion: v1 metadata: name: openstack-pv0 labels: type: openstack spec: storageClassName: standard capacity: storage: 2Gi accessModes: - ReadWriteMany nfs: server: NFS Server path: Mount path of NFS Server ``` -------------------------------- ### Install K8S Provider using Shell Script Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=accounts-deploying-kubernetes-providers This command runs the main installation script for the K8S provider. It creates the necessary namespace, secrets, and deployments, and registers a custom provider named 'k8s-beta' within the ICCAM UI. The '-c' flag likely indicates a specific installation mode. ```bash sh installK8s.sh -c -f installK8s.properties ``` -------------------------------- ### Verify API Gateway URL for Cost and Asset Management Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=troubleshooting-iccam-login-issues This command retrieves the API gateway URL for the IBM Cloud Cost and Asset Management release. It uses `helm get` and filters the output for `apigatewayurl`. This is used to verify the correct URL is configured. ```bash helm get <> --tls | grep -i apigatewayurl | uniq ``` -------------------------------- ### Create ICCAM Namespace and Secrets Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=installation-installing-cost-asset-management Executes a script to create the necessary namespace and secrets for IBM Cloud Cost and Asset Management (ICCAM) using a properties file. ```bash sh preCCAM.sh -c -f preCCAM.properties ``` -------------------------------- ### Verify API Gateway URL and Certificate Validation for Management Platform Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=troubleshooting-iccam-login-issues This command retrieves both the API gateway URL and the certificate validation setting for the IBM Management Platform release. It uses `helm get` and filters for `apiGatewayUrl` and `enforce`. This helps ensure consistent configuration with Cost and Asset Management. ```bash helm get <> --tls|grep -e apiGateway -e enforce| sort --u ``` -------------------------------- ### Example credentials.json structure Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=accounts-configuring-deploying-openstack-providers This JSON object contains credentials and connection details for the Openstack server. It supports a single account configuration and requires accurate values for 'asset_account_number', 'host_ip', 'username', and 'Password'. Ensure the 'asset_account_number' matches the adapter configuration. ```json { "asset_account_number": "Asset account number for Openstack", "host_ip": "IP address of Openstack Server", "username": "root user", "Password": "Password for root user" } ``` -------------------------------- ### Generic Rate Card YAML Structure Example Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=accounts-private-cloud This example outlines the structure of a GenericRateCard.yaml file used for calculating costs in the VMware extract tool. It specifies different types of rate cards (flat, config, custom) and provides a placeholder for pricing-related configurations. ```yaml # GenericRateCard.yaml - Example Structure rate_card_type: "flat" # or "config" or "custom" # Flat rate card example # flat_rate: # cost_per_unit: 0.1 # unit_of_measure: "hour" # currency: "USD" # Config rate card example (refer to specific implementation) # config_rate: # ... configuration details ... # Custom rate card configuration (refer to plugin implementation) # custom_rate: # plugin_name: "CustomRateCard" # configuration_file: "path/to/custom_config.yaml" ``` -------------------------------- ### Log in to OpenShift Cluster CLI Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=installation-installing-cost-asset-management Logs into an OpenShift cluster using the oc command-line tool. Requires cluster host name and port. User will be prompted for admin credentials. ```bash oc login https://: ``` -------------------------------- ### Configure Chart Parameters for Bound Persistent Volume Claims Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=troubleshooting-issues-in-installation YAML configuration snippets to set existing claim names for various Cost and Asset Management persistent volumes when they are in a 'Bound' state. ```yaml core-couchdb-pv0: persistence: existingClaimName: dev-core/core-couchdb-claim0 ``` ```yaml mariadb-tmp-pv0: persistence: existingClaimName: dev-core/mariadb-tmp-claim0 ``` ```yaml mariadb-data-pv0: persistence: existingClaimName: dev-core/mariadb-data-claim0 ``` ```yaml mariadb-backup-pv0: persistence: existingClaimName: dev-core/mariadb-backup-claim0 ``` ```yaml cam-rabbitmq-pv0: persistence: existingClaimName: dev-core/cam-rabbitmq-claim0 ``` ```yaml cam-data-pv0: persistence: existingClaimName: dev-core/cam-data-claim0 ``` -------------------------------- ### Clean Up Failed Helm Releases and Namespaces Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=troubleshooting-issues-in-installation Commands to remove a failed helm release and delete the associated Kubernetes namespace. Ensure to replace placeholder values like and . ```bash helm delete --purge --tls ``` ```bash kubectl delete namespace ``` -------------------------------- ### Configure CCAM Post-Install Properties Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=installation-post-install-configuration-cost-asset-management This snippet shows an example of the `post-install.properties` file content, demonstrating how to set the `cluster_name`. The `host_ip`, `icp_proxy_ip`, `clientSecret`, `clientID`, `app_user`, `api_key`, and `new_password` properties also need to be configured. ```yaml # cluster_domain: cluster.local cluster_name: clusternamechange # cluster_CA_domain: "{{ cluster_name }}.icp" ``` -------------------------------- ### NFS /etc/exports settings sample Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=management-creating-cost-asset-persistent-volumes A sample reference for NFS /etc/exports settings, illustrating how to configure filesystem exports for NFS clients. This can be customized based on specific environment requirements. ```text # /etc/exports: the access control list for filesystems which may be exported # to NFS clients. See exports(5). # # Example for NFSv2 and NFSv3: # /srv/homes hostname1(rw,sync,no_subtree_check) hostname2(ro,sync,no_subtree_check) # # Example for NFSv4: # /srv/nfs4 gss/krb5i(rw,sync,fsid=0,crossmnt,no_subtree_check) # /srv/nfs4/homes gss/krb5i(rw,sync,no_subtree_check) ``` -------------------------------- ### Apply Kubernetes RoleBinding using kubectl Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=management-prerequisites-installing-cost-asset Command to create a RoleBinding resource in Kubernetes by applying a YAML file. Replace `` with the actual name of the file containing the RoleBinding definition. ```bash kubectl create -f ``` -------------------------------- ### Load PPA Archive into IBM Cloud Private Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=installation-installing-cloud-cost-asset-management-private-cloud-adapter This command loads the offline PPA (Platform Private Archive) images into the IBM Cloud Private environment. The '--archive' flag specifies the path to the .tar.gz file containing the images. Replace '1.X.X' with the actual version number. ```bash cloudctl catalog load-ppa-archive --archive ibm-cloud-cost-asset-mgmt-private-cloud-adapter-1.X.X.tar.gz ``` -------------------------------- ### Docker Login for ICP Registry Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=installation-installing-cost-asset-management Logs into the Docker registry for an IBM Cloud Private (ICP) environment. Requires the registry name. User will be prompted for credentials. ```bash docker login << registry name>> Example : docker login mycluster.icp:8500 ``` -------------------------------- ### Debug Cost and Asset Management Containers with kubectl Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=troubleshooting-issues-in-installation Kubectl commands to describe pods, check their status, and retrieve logs for debugging containers that are not in a running state. Requires specifying the namespace and pod name. ```bash kubectl get pods -n ``` ```bash kubectl describe pod -n ``` ```bash kubectl logs -n ``` -------------------------------- ### Apply OpenShift SCC using oc Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=management-prerequisites-installing-cost-asset Command to create an SCC resource in OpenShift by applying a YAML file. This command requires OpenShift Administrator privileges. Replace `platform-mgmt.yaml` with the filename of your SCC definition. ```bash oc create -f platform-mgmt.yaml ``` -------------------------------- ### Delete Cost and Asset Management Persistent Volume Claims Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=troubleshooting-issues-in-installation Command to delete Cost and Asset Management persistent volume claims if they are not in the 'Bound' state. This is necessary before reinstallation. ```bash kubectl delete pvc -l release= ``` -------------------------------- ### Example adapter_config.json structure Source: https://www.ibm.com/docs/en/cc-and-am/3.1_topic=accounts-configuring-deploying-openstack-providers This JSON object represents a configuration file for the adapter. It includes a billing account ID. Key fields like 'billingAccountId' must match corresponding entries in other configuration files, and specific values should not be altered to ensure collector functionality. ```json { "billingAccountId": "asset_account_number" } ``` -------------------------------- ### Kubernetes Role for PodSecurityPolicy Source: https://www.ibm.com/docs/en/cc-and-am/3.2_topic=installation-installing-cost-asset-management Defines a Kubernetes Role named 'cam-security-role' that grants 'use' permissions on the 'cam-security' PodSecurityPolicy. This is essential for controlling pod security settings within the cluster. ```yaml --- apiVersion: rbac.authorization.k8s.io/v1 kind: Role metadata: name: cam-security-role labels: rules: - apiGroups: - extensions resourceNames: - cam-security resources: - podsecuritypolicies verbs: - use ```