Configuring the certificate

After you install IBM Z® ChatOps, you need to configure your certificate before you start to use Z ChatOps. You can use your own certificate or the tool that Z ChatOps provides to generate a self-assigned certificate.

Before you begin

Make sure that you have successfully installed IBM Z ChatOps.

Procedure

  • For Container users:
    1. If you don't have your own certificate, you can generate a self-assigned certificate with the following steps.
      1. Go to the directory where you extract the IBM Z ChatOps Container archive.
      2. Use the following command to generate a self-assigned certificate. Replace the host name and IP address with the values of your Z ChatOps server.
        ./tools/generateCert.sh host_name IP_address
      A folder named with your hostname will be created. You can find the generated certificate bnzsvr-server.crt and the key file bnzsvr-server.key in that folder.
    2. Upload your certificate and key file with your <Container_management_tool>, for example, docker.
      1. Get your container ID.
        docker container ls --all -q --filter name="zchatops"
      2. Change the ownership of your certificate file and key file. From IBM Z ChatOps 1.1.3, ChatOps container runs as a non-root user zchatops. You need to change the ownership of the certificate and key files before you use command docker cp to upload your certificate so that user zchatops has permission to access them..
        chown 1000:0 certificate_file_path key_file_path
        Note: The file path should contain the file name. The following is the same.
      3. Upload your certificate.
        docker cp certificate_file_path chatops_container_id:/opt/ibm/zchatops/config/ssl/bnzsvr-server.crt
      4. Upload your key file.
        docker cp key_file_path chatops_container_id:/opt/ibm/zchatops/config/ssl/bnzsvr-server.key
  • For Native installation package users:
    1. If you don't have your own certificate, you can generate a self-assigned certificate with the following steps.
      1. Go to the directory where you extract the IBM Z ChatOps package.
      2. Use the following command to generate a self-assigned certificate. Replace the host name and IP address with the values of your Z ChatOps server.
        ./tools/generateCert.sh host_name IP_address
      A folder with the name of your hostname will be created. You can find the generated certificate bnzsvr-server.crt and the key file bnzsvr-server.key in that folder.
    2. Upload your certificate and key file.
      1. Upload your certificate.
        cp -f certificate_file_path $ZCHATOPS_HOME/config/ssl/bnzsvr-server.crt
        Note: The file path should contain the file name. The following is the same.
      2. Upload your key file.
        cp -f key_file_path $ZCHATOPS_HOME/config/ssl/bnzsvr-server.key