Creating virtual clusters
In Cloudera Data Engineering (CDE), a virtual cluster is an individual auto-scaling cluster with defined CPU and memory ranges. Jobs are associated with virtual clusters, and virtual clusters are associated with an environment. You can create as many virtual clusters as you need.
To create a virtual cluster, you must have an environment with Cloudera Data Engineering (CDE) enabled.
- Download
cdp-cde-utils.sh
to your local machine. - Create a directory to store the files, and change to that directory:
mkdir -p /tmp/cde-latest && cd /tmp/cde-latest
-
- Embedded Container Service (ECS)
- Copy the extracted utility script (
cdp-cde-utils.sh
) to the Embedded Container Service (ECS) cluster host which has the ECS Master installed. To identify the ECS cluster hosts:- Log in to the Cloudera Manager web interface.
- Go to .
- Select the host which has the ECS Master installed, and copy the script to that host.
- Red Hat OpenShift Container Platform (OCP)
- Copy the extracted utility script (
cdp-cde-utils.sh
) and the OpenShiftkubeconfig
file to one of the HDFS service gateway hosts, and install thekubectl
utility:- Log in to the Cloudera Manager web interface.
- Go to .
- Select one of the Gateway hosts, log in using the security password that was set, and copy the script to that host.
- Copy the OCP kubeconfig file to the same host.
- Export the OCP kubeconfig
file:
export KUBECONFIG=[***path_of_the_copied_OCP_Kubeconfig_file***]
- On that host, install the
kubectl
utility following the instructions in the Kubernetes documentation. Make sure to install akubectl
version between 1.16 and 1.22 (inclusive). Cloudera recommends installing the version that matches the Kubernetes version installed on the OpenShift cluster.
- On the cluster host that you copied the script to, set the script permissions to be
executable:
chmod +x /path/to/cdp-cde-utils.sh
- Identify the virtual cluster endpoint:
- In the Cloudera Manager web UI, go to the Experiences page, and then click Open CDP Private Cloud Experiences.
- Click the Data Engineering tile.
- Select the CDE service containing the virtual cluster you want to activate.
- Click Cluster Details.
- Click JOBS API URL to copy the URL to your clipboard.
- Paste the URL into a text editor to identify the endpoint host. For example, the URL
is similar to the
following:
http://dfdj6kgx.cde-2cdxw5x5.ecs-demo.example.com/dex/api/v1
The endpoint host is
dfdj6kgx.cde-2cdxw5x5.ecs-demo.example.com
.
- On the ECS or HDFS gateway host you selected previously, initialize the virtual cluster
using the
cdp-cde-utils.sh
script. You can either generate and use a self-signed certificate, or provide a signed certificate and private key.- Generate a self-signed certificate
For example, using the previous example URL, the endpoint host is./cdp-cde-utils.sh init-virtual-cluster -h <endpoint_host> -a
dfdj6kgx.cde-2cdxw5x5.ecs-demo.example.com
:./cdp-cde-utils.sh init-virtual-cluster -h dfdj6kgx.cde-2cdxw5x5.ecs-demo.example.com -a
- Use a signed certificate and private key
- Make sure that the certificate is a wildcard certificate for the cluster endpoint.
For example,
*.dfdj6kgx.cde-2cdxw5x5.ecs-demo.example.com
You must perform this procedure for each virtual cluster you create.