Quick notes on standing up a dev environment

I recently went through the process of setting up a development environment for graylog so I can start learning how to create plugins. I performed the following steps on a Fedora 28 VM but they should be similar on other Distros. I disabled selinux for this environment. Normally, I leave selinux enabled but it gave me some issues that still need sorting out.

The first step after VM creation was to install all the prereq software.

  • java-1.8-0-openjdk + devel
  • git
  • maven
  • nodejs
  • InteliJ idea

I additional installed appropriate versions of the following

  • elasticsearch 5.x – Use 6.x if you plan to work on Graylog v3.x code
  • mongodb-server

Once the prereqs were installed, I followed instructions from here graylog-project/README.md at master · Graylog2/graylog-project · GitHub for the most part. However, there are a few things worth noting when performing the bootstrap process.

The project folder can be any arbitrary folder where you want to keep your dev files at. I choose /home/user/Projects as an example. Once you cd into ~/Projects, that is where you will run the bootstrap command, which will pull down the appropriate codebase for you.
You will see a folder structure that looks like this.

  ├── graylog-projects
  └── graylog-projects-repos

By default, the bootstrap will pull the latest master branch. To use an alternate Graylog version, add this to checkout a different branch

When importing the project into the IDE, import it as a maven project.
Once in the IDE, accept the prompts for loading maven modules if you see them.

The import can take a long time. Be patient and let it finish.

It wasn’t initially obvious where to create the server run configuration at in IntelliJ IDEA.
After the project has been imported;

  1. Select “Run”
  2. Select “Edit Configurations”
  3. Click the “+” in the upper left of the new window-> Select “Application”
  4. Fill out fields like the example screencap

Pleae add any comments or corrections to anything I mentioned. I am not a developer but this was what I did to get a working graylog environment. If anything is incorrect, feel free to let me know.

Now that the dev environment is up and running, The next step is to import a plugin or create a new one.



This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.