This repository was created to help you easily test the Elastic Stack in a Vagrant environment. It's perfect for experimenting with the latest versions of Elasticsearch, Kibana, and Fleet Server with Elastic Agent, following the current architecture promoted by Elastic for observability and security solutions.
π‘ Architecture Overview: By default, this setup deploys:
- Elasticsearch: The heart of the Elastic Stack for search and data storage.
- Kibana: The visualization layer that provides powerful analytics and dashboards.
- Fleet Server with Elastic Agent: A centralized agent management solution for gathering metrics, logs, and security data.
Additionally, you have the flexibility to deploy other components such as:
- Logstash: For advanced data processing pipelines.
- Beats (like Metricbeat, Auditbeat, etc.): Lightweight data shippers that collect and forward data to Elasticsearch.
This setup is automated using Ansible, ensuring that the deployment and configuration of each Elastic Stack component is smooth and repeatable. Ansible manages provisioning, making it easier to get your environment up and running with minimal effort.
For more information about Elastic Stack components, check the official Elastic website.
This repository use the latest version by default. You can change the version by modifying inventories/staging/group_vars/staging.yml
.
π‘ Note: Elasticsearch and Kibana are configured to use TLS/SSL by default for enhanced security.
To access the Elastic Stack services, use the following credentials:
User | Password |
---|---|
elastic | thanos |
Before you can get started, you'll need to install the following software:
Depending on your operating system, follow these steps to install Git:
-
Linux π§
For Ubuntu/Debian:
sudo apt -y install git
For CentOS/RedHat:
sudo yum -y install git
Then, clone the repository:
git clone https://github.com/rdrgporto/elastic-stack-vagrant.git
-
Windows π
Download and install Git Bash, then run:
git clone https://github.com/rdrgporto/elastic-stack-vagrant.git
Vagrant is configured with both internal and public network options. You can use the public network to log in via any SSH client like Putty, MobaXterm, or Termius.
To start the virtual machine:
-
Linux/MacOS:
cd /path/to/your/elastic-stack-vagrant/ vagrant up
-
Windows: Open Git Bash or Command Prompt and navigate to the project folder:
cd C:/path/to/your/elastic-stack-vagrant/ vagrant.exe up
Once it's up and running, you can log in via SSH:
-
Linux/MacOS:
vagrant ssh
-
Windows: Using Git Bash or Command Prompt:
vagrant.exe ssh
Here are some useful Vagrant commands to manage your virtual machine:
-
Linux/MacOS:
vagrant up # Start the virtual machine vagrant destroy # Remove/delete the virtual machine vagrant ssh # Connect to the virtual machine via SSH vagrant halt # Shutdown the virtual machine vagrant provision # Re-run Ansible provisioning
-
Windows (using Git Bash or Command Prompt):
vagrant.exe up # Start the virtual machine vagrant.exe destroy # Remove/delete the virtual machine vagrant.exe ssh # Connect to the virtual machine via SSH vagrant.exe halt # Shutdown the virtual machine vagrant.exe provision # Re-run Ansible provisioning
Contributions are welcome! Feel free to open issues or submit pull requests to improve this project. Let's make testing the Elastic Stack easier together! π‘
This project is licensed under the Apache License 2.0. See the LICENSE file for more details.