Wednesday, October 19, 2022

Easy setup Kibana Nginx reverse proxy with Ansible

Motivation

Amazon OpenSearch Service cluster instance run inside a virtual private cloud. If you want to access Kibana dedicated to this instance you have two options. One is tunneling to EC2 bastion host which is realitvely straightforward. One of the disadvantages of this approach is that you need to share your bastion host keys to clients. Another is reverse proxy on bastion host to private OpenSearch Kibana. In this example, we are going to show how you can setup access to Kibana using Nginx reverse proxy and provision it with Ansible.

This example represent basic setup which can serve as basis for future improvements. This basis don't include secure access configuration (certifications, authentication). It uses HTTP between client and proxy server, for production environment using HTTPS is recommended in this context. It's an easier setup, but for other hand it's also less secure setup.

Example

Inventory

First you need to have inventory defined with one variable (open_search_endpoint) which should point to Kibana instance. Notice, we have two ec2 instances in our inventory. One can be for production environment, second for staging for example. 

Main playbook

Next we are going to define main Ansible playbook, which is pretty straight forward. For it to work, you need to have configuration files (default.config and ngnix.config) located in your path.

Default configuration

For default.config, we are using simple proxy pass. If you want more secure connection, this is where you would configure HTTPS.

Nginx configuration

7 comments:

  1. Helpful class overview.Live classes improve clarity.Practice builds confidence.This Python programming class covers core topics.

    ReplyDelete
  2. "OnlineITGuru’s UI/UX course helps you create stunning, user-friendly designs.training ui ux
    Learn wireframing, prototyping, and UX strategies with real projects."

    ReplyDelete
  3. "Master Java Full Stack development with OnlineITGuru.java coaching online
    Get hands-on experience in Java, front-end & back-end development, databases, and live projects."

    ReplyDelete
  4. "Learn database design and management with OnlineITGuru. data modelling courses free
    Explore ER diagrams, data modeling techniques, and best practices for real-world applications."

    ReplyDelete
  5. "OnlineITGuru’s DevOps course trains you in CI/CD, cloud deployment, automation, and containerization. devops training online
    Build skills to streamline software delivery."

    ReplyDelete
  6. EasyPayTax is an online platform offering business registration and compliance services.
    It helps with company formation, tax filings, and government registrations.online tax consultant in Hyderabad

    The platform simplifies legal and financial processes for startups and businesses.

    ReplyDelete
  7. Learn data visualization and analytics skills from anywhere with tableau classes onlinedesigned for beginners to advanced learners.

    ReplyDelete