How to access Kibana from outside cloud using ELB?

Overview

Currently to access Kibana dashboard of CSS Service, a user has to login to OTC consoleand navigate to Kibana login page.

To make the access convenient a user can utilize the provided python script which willconfigure the Dedicated Loadbalancer of OTC and a user would be able to access Kibanadashboard with a public IP.

ELB Configuration Script

Script to Configure ELB to be able to access CSS Kibana Dashboard in https mode. ThisScript will create a Dedicated Loadbalancer with a HTTPS Listener which will be forwardingthe traffic to CSS nodes at 5601 port in order to access Kibana Dashboard.

Download Script

Installing Dependency

The script depends on otcextensions library.

If you already have Python with pip installed, you can simply run:

pip install otcextensions

In addition to that a regular clouds.yaml configuration file can be used.

More information is available at:

https://docs.openstack.org/openstacksdk/latest/user/config/configuration.html

Pre-Requisites

The Script requires ID of a CSS Cluster and Certificate ID for creating a HTTPS listener.

Generating a TSL Certificate with openssl command.

openssl req -x509 -sha256 -nodes -days 365 -newkey rsa:4096 -keyout private.key -out certificate.crt

When adding the certificate and private key, Certificate Type must be "Server Certificate".

Running The Script

Once you have certificate_id and cluster_id, you are ready to run the script.

List ELB Flavors

python3 script.py elb-flavors

This will print the L7 Flavors supported by Dedicated Loadbalancer. To print all types of flavors supported you may add --all argument to the command. But we need only L7 flavor type, that's why --all argument is set as optional.

Configure ELB

 python3 script.py elb-configure --cluster-id <cluster_id> --certificate-id <certificate_id>

Argument --certificate-id is optional, if it's not provided then Loadbalancer will be configured with HTTP listener.

Configure ELB with specific Flavor

 # Prints list of Loadbalancer flavor Types
   python3 script.py elb-flavors

 # Run the script
   python3 script.py elb-configure --cluster-id <cluster_id> --certificate-id <certificate_id> --flavor-id <flavor_id>

Delete ELB

 python3 script.py elb-delete <loadbalancer_name_or_id>

Delete ELB and Release Public EIP

python3 script.py elb-delete <loadbalancer_id> --release-public-ip

Please use the elb-delete command with caution.

Logging

When you run the script a log file is created with name debug.log where you can find details of all the API requests.