IBM Cloud Docs
Deploy Kibana using Code Engine and connect to your Databases for Elasticsearch instance

Deploy Kibana using Code Engine and connect to your Databases for Elasticsearch instance

With this tutorial, deploy Kibana using Code Engine and connect to your Databases for Elasticsearch instance. Kibana is a web interface that allows you to visualise the data in Elasticsearch instances. Code Engine is a a fully managed, serverless platform that allows you to run workloads without worrying about deploying infrastructure. Elasticsearch is a NoSQL database with powerful search capabilities.

Databases for Elasticsearch does not include a managed Kibana service, but with this tutorial you can provision a Kibana instance and connect to your Databases for Elasticsearch instance within a few minutes and still using the managed service model of IBM Cloud.

NOTE: Code Engine is a paid-for service, so following this tutorial will incur charges.

Before you start

Before you begin, ensure you have the following:

Obtain an API key to deploy infrastructure to your account

Follow these steps to create an IBM Cloud API key that enables Terraform to provision infrastructure into your account. You can create up to 20 API keys.

For security reasons, the API key is only available to be copied or downloaded at the time of creation. If the API key is lost, you must create a new API key.

Clone the project

git clone https://github.com/IBM/elasticsearch-kibana-codeengine.git

Install the infrastructure

  1. Navigate into the terraform folder of the cloned project.

    cd elasticsearch-kibana-codeengine/terraform
    
  2. On your machine, create a document that is named terraform.tfvars, with the following fields:

     ibmcloud_api_key = "<your_api_key_from_step_1>"
     region = "<your_region>"
     es_url = "<the url of your elasticsearch deployment>"
     es_username = "<the username of your elasticsearch deployment>"
     es_password = "<the password of your elasticsearch user>"
     es_version="<the version of your elasticsearch deployment>"
    

    The terraform.tfvars document contains variables that you might want to keep secret.

    Kibana runs with ELASTICSEARCH_SSL_VERIFICATIONMODE set to none, so although the traffic between Kibana and Elasticsearch is encrypted, the Elasticsearch service is not verified against the CA certificate provided by IBM Databases for Elasticsearch credentials.

  3. Install the infrastructure with the following command:

    terraform init 
    terraform apply --auto-approve
    

Visit your Kibana deployment

The previous step produces a URL, which is the public URL of your Kibana deployment. It looks something like: https://kibana-app.1834dcfgrtygbg.eu-gb.codeengine.appdomain.cloud.

Visit that URL in your web browser. You should see the Kibana login screen where you can log in with your credentials and have access to your Elasticsearch deployment!

To tear down your Kibana application and project from Code Engine, run:

terraform destroy