-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Vagrant beats building and testing plattform #14148
Comments
@philippkahr could you check if something has improved now after migrating to Python 3 and venv (#14798) so you don't need the virtual machine for development? |
@jsoriano thanks for the heads up! everything seems to work now with python 3. I still think that the vagrant boxes might be useful for some. I will still try to build it and run it once in the vagrant box before committing it, to see if it really builds on a proper new platform all the time :) |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
Describe the enhancement:
Hi,
I hope it is ok that I ping you on this issue @andrewkroh as I saw that you worked on this Vagrantfile.
I am currently trying to develop modules for beats and add more dashboards. However, my MacOS is cluttered with multiple python and go environments from other OSS projects and scientific research. Thus I am facing issues with beats not honoring python environments setup by anaconda, not properly resolving dependencies for python libs like
import yaml
and many more weird issues.I started using the provided Vagrantfiles to bootstrap me a ubuntu1804, which works sort of fine. When using
make import-dashboards
it tries to resolve the two environment variablesES_URL
andKIBANA_URL
if they are not set, it will set them tohttp://localhost:9200
andhttp://localhost:5601
. The variables are set inside the https://github.com/elastic/beats/blob/master/libbeat/scripts/Makefile. This is a problem as the vagrant box cannot contact my elastic search and kibana via localhost. When using VirtualBox as a provider, the localhost is always reachable under10.0.2.2
while using NAT as a network mode. Per default, Vagrant creates such a NAT network adapter. I solved this issue by adding the following code and adding it as a shell provisioner to the ubuntu1804 box. The script will check if it is virtualized by Oracle (VirtualBox) and set theES_URL
andKIBANA_URL
to the localhost10.0.2.2
.Additionally, the VirtualBox image created by Vagrant defaults to 1024mb of RAM which is not enough to even build a single beat. Therefore, I propose to add this section the boxes you are using. I found it failing with 2048MB sometimes, I could not find the sweet spot yet, at least with 4096MB it is working without any issue. The default Vagrant box uses only 2 cores which makes the build slower, changing the VirtualBox CPUs to 4 adds more power.
Error logs
Not enough RAM error
Ressources
https://docs.oracle.com/cd/E97728_01/F12469/html/changenat.html
The text was updated successfully, but these errors were encountered: