Cloud credentials for local provisioning
Provide the Cloudera Cloud Core, AWS, Google Cloud, or Azure credentials in a separate file that INFRA_CLOUD_CREDENTIALS_FILE references, because the installer never reads credentials from bootstrap.env.
Credentials file
Put the standard credential variables of the cloud provider in a separate file in the working folder, and set INFRA_CLOUD_CREDENTIALS_FILE in bootstrap.env to the name of that file. The setting is mandatory when DEPLOY_INFRA is true, and the preflight checks fail when the value is empty or the file does not exist. For example:
INFRA_CLOUD_CREDENTIALS_FILE="openstack.rc"
The installer applies the following rules to the credentials file:
- Each line is a
KEY=valueor anexport KEY=valueline, so a Cloudera Cloud Core keystonerc file works without changes. - The installer ignores comments and blank lines.
- The file does not support shell expansion or commands.
- The installer passes the values only to the OpenTofu or Terraform runs and to the Kubernetes installation run, because the cloud provider roles read them as well. The installer does not save or log the values, and it does not show them in the dry-run output.
- The installer resolves a relative value of
GOOGLE_APPLICATION_CREDENTIALS,AWS_SHARED_CREDENTIALS_FILE,AWS_CONFIG_FILE,OS_CLIENT_CONFIG_FILE,OS_CACERT,OS_CERT, andOS_KEYagainst the working folder, and the preflight checks confirm that each file exists. - A variable that is already exported in the environment takes precedence over the same variable in the file.
The standard docker run command does not pass the environment of the host to the container, so the credentials file is the way to provide credentials to the installer image. The installer image reads the file from the working folder that you mount as /config:
docker run -it --rm \
-v "$(pwd)":/config \
--network host \
container.repository.cloudera.com/cloudera/ccf-install:<TAG>
Interactive logins, such as gcloud auth application-default login, az login, and AWS SSO, store tokens in the home directory, which the container cannot see. Use a service account key on Google Cloud, a service principal on Azure, and access keys or a credentials file that you copy into the working folder on AWS.
Provide only the credentials for the provider that INFRA_TERRAFORM_PROVIDER selects. Never commit the credentials file to a repository.
Cloudera Cloud Core credentials
The Terraform provider for Cloudera Cloud Core reads the standard OS_* variables. The following example shows a credentials file for password authentication:
export OS_AUTH_URL="https://openstack.example.com:5000"
export OS_PROJECT_NAME="my-project"
export OS_USER_DOMAIN_NAME="Default"
export OS_PROJECT_DOMAIN_NAME="Default"
export OS_TENANT_ID="<project-id>"
export OS_REGION_NAME="RegionOne"
export OS_INTERFACE="public"
export OS_IDENTITY_API_VERSION="3"
export OS_USERNAME="my-user"
export OS_PASSWORD="<password>"
export OS_INSECURE="false"
export OS_COMPUTE_API_VERSION="2.42"
To use application credential authentication, replace OS_USERNAME and OS_PASSWORD with the standard application credential variables:
export OS_APPLICATION_CREDENTIAL_ID="<application-credential-id>"
export OS_APPLICATION_CREDENTIAL_SECRET="<application-credential-secret>"
export OS_AUTH_TYPE="v3applicationcredential"
If the Cloudera Cloud Factory API and Tekton flow already generate an equivalent keystonerc file, copy the file into the working folder, and reference it from bootstrap.env:
cp /path/to/keystonerc ./openstack.rc
# bootstrap.env: INFRA_CLOUD_CREDENTIALS_FILE="openstack.rc"AWS credentials
The AWS provider uses the standard AWS credential chain. To use static access keys, add the following lines to the credentials file:
export AWS_ACCESS_KEY_ID="<access-key-id>"
export AWS_SECRET_ACCESS_KEY="<secret-access-key>"
# Only for temporary (STS) credentials:
export AWS_SESSION_TOKEN="<session-token>"
To use a named profile, copy the credentials file of your AWS CLI into the working folder, and reference the copy and the profile in the credentials file:
AWS_SHARED_CREDENTIALS_FILE="aws-credentials"
AWS_PROFILE="my-profile"
The region comes from INFRA_AWS_REGION, not from AWS_REGION.
Google Cloud credentials
The Google provider uses Application Default Credentials. Copy a service account key file into the working folder, and reference it with a relative path in the credentials file:
GOOGLE_APPLICATION_CREDENTIALS="gcp-sa.json"
Set the project, region, and zone with INFRA_GCE_PROJECT_ID, INFRA_GCE_REGION, and INFRA_GCE_ZONE. The service account must be able to manage Compute Engine resources in that project. When you run the installer from source, you can use your user credentials instead, which you create with gcloud auth application-default login.
Azure credentials
The Azure templates pass the credentials to the azurerm provider explicitly, so you must provide them as Terraform variables. The ARM_* variables or az login alone are not enough. The preflight checks fail when one of the following variables is missing from the credentials file:
export TF_VAR_azure_subscription_id="00000000-0000-0000-0000-000000000000"
export TF_VAR_azure_tenant_id="00000000-0000-0000-0000-000000000000"
export TF_VAR_azure_client_id="00000000-0000-0000-0000-000000000000"
export TF_VAR_azure_client_secret="<client-secret>"
Create a service principal with the following command:
az ad sp create-for-rbac --name ccf-install --role Contributor \
--scopes /subscriptions/<subscription-id>
Map the output of the command to the variables in the following way:
appIdtoTF_VAR_azure_client_idpasswordtoTF_VAR_azure_client_secrettenanttoTF_VAR_azure_tenant_id
Do not put azure_client_secret in the Terraform variables file.
