This procedure describes how to enable SSL connections in HPE Ezmeral Container Platform deployments for which SSL was not enabled during the initial deployment process.
You are logged into the active Controller host as the user account that was used to install HPE Ezmeral Container Platform.
If you followed the instructions in Adding an SSL Certificate during the HPE Ezmeral Container Platform deployment process, you do not need to complete this task.
Use this procedure to enable SSL connections on an existing HPE Ezmeral Container Platform deployment.
The certificate and key files must be readable by the webserver process,
according to Linux file permissions and the SELinux configuration. A
standard way to do this is to assign 644 permissions to both files and place
them in the /etc/pki/tls/certs directory.
The remainder of this procedure assumes that the
certificate and key files are located in
/etc/pki/tls/certs/server.crt and
/etc/pki/tls/private/server.key, respectively.
bdconfig tool to update the
/etc/bluedata/bluedata.conf file with the certificate and
key file locations.
bdconfig --set "bds_prechecks_sslcert=/etc/pki/tls/certs/server.crt"
bdconfig --set "bds_prechecks_sslkey=/etc/pki/tls/private/server.key"cd /opt/bluedata/bundles/hpe-cp-*/scripts
exec 4>&2; source iucomponents/ha/common/ha-common.sh; set +x; exec 2>&4
If you change to a new login shell when you perform the next steps, you must execute the commands in this step in the new shell.
config files, and then restart the
webserver:
setup_https
CentOS: service httpd restart
SLES: systemctl restart apache2
'get_rpc_cmd' bd_mgmt_config init ""
'get_rpc_cmd' bd_mgmt_web stop ""
CERT_DIR=$(dirname "$bds_prechecks_sslcert")
KEY_DIR=$(dirname "$bds_prechecks_sslkey")
util_remote_exec $bds_global_user $HA_PEER "mkdir -p $CERT_DIR"
util_remote_exec $bds_global_user $HA_PEER "mkdir -p $KEY_DIR"
util_remote_sudo_copy $bds_global_user $HA_PEER $bds_prechecks_sslcert $bds_prechecks_sslcert
util_remote_sudo_copy $bds_global_user $HA_PEER $bds_prechecks_sslkey $bds_prechecks_sslkey
util_remote_exec $bds_global_user $HA_PEER "bdconfig --set \"bds_prechecks_sslcert=$bds_prechecks_sslcert\""
util_remote_exec $bds_global_user $HA_PEER "bdconfig --set \"bds_prechecks_sslkey=$bds_prechecks_sslkey\""
hpecp-agent operator to
communicate with the control plane for creating services:
On each Kubernetes Master node, execute the following commands:
URL=$(kubectl -n hpecp get secrets/hpecp-session-secret -o jsonpath='{.data.k8s-cluster-services-url}' | base64 --decode)
MOD_URL=$(echo -n $URL | sed 's/http/https/g' | base64 -w 0)
kubectl -n hpecp patch secret hpecp-session-secret --type='json' -p="[{\"op\" : \"replace\" ,\"path\" : \"/data/k8s-cluster-services-url\" ,\"value\" : \"$MOD_URL\"}]"
The preceding commands fetch the current secret, change http
to https, and then update the secret with the modified
option.