# Development Setup

BDeploy uses the Eclipse IDE for backend- and VSCode for frontend-development. You will need:

# Environment Setup

  • You will want to set the JAVA_HOME environment variable to point to the path where you extracted the OpenJDK 21 package to assure that the build picks up the correct Java.
  • Make sure that the npm command works from the command line where you will run gradle builds (cmd.exe on Windows, bash on Linux).
  • Install the Angular CLI globally for easier working by running npm install -g @angular/cli.

# Repository and Gradle Build

This documentation will assume the path /work/bdeploy to be available, if not substitute it with any other path that works for you.

  • Clone the repository: cd /work/bdeploy && git clone https://github.com/bdeployteam/bdeploy.git
  • Change to the repository directory: cd bdeploy
  • Start the gradle build
    • ./gradlew build
    • The build should conclude with a BUILD SUCCESSFUL message

The gradle build will build test and package BDeploy. You can find build artifacts after the build here:

  • ./launcher/build/distributions - Distributable packages of the launcher application which is used to start client applications.
  • ./minion/build/distributions - Distributable packages of the main BDeploy binaries. They contains the start (which runs BDeploy master and node servers) command as well as all CLI commands available to BDeploy Administrators. The distribution also contains all supported launcher packages as nested ZIP files.
  • ./interfaces/build/libs/bdeploy-api-**-all.jar - The distributable API bundle including all external dependencies. This can be used to create additional integrations for BDeploy.

Additionally, documentation deliverables can be found in the ./doc/build/docs/dev and ./doc/build/docs/user directories (developer and end-user documentation respectively).

# Eclipse Workspace

To be able to build, start and debug BDeploy backend applications from the Eclipse IDE, you need to perform some extra setup steps:

  • On the command line (see Repository and Gradle Build) generate the Eclipse IDE project files by running ./gradlew eclipse.
  • Start the Eclipse IDE - choose a workspace, e.g. /work/bdeploy/workspace.
  • Open the Git Repositories view.
  • Click Add existing local repository, browse to the repository location (e.g. /work/bdeploy/bdeploy) and add it.
  • Right click the repository in the Git Repositories view and select Import Projects....
    • Select all projects with type Eclipse project
    • Don't select the projects in the eclipse-tea folder.
    • Don't select projects of type Maven.

This results in a complete BDeploy workspace setup which compiles automatically.

# Running BDeploy from Eclipse

BDeploy uses LcDsl launch configurations to run binaries. You can find launch configurations in the Launch Configurations view.

  • Find and run (hint: right click) the Master-Init launch configuration.
    • This will initialize a BDeploy master root inside the chosen workspace directory, e.g. /work/bdeploy/workspace/runtime/master.
    • A default user will be created: username = admin, password = adminadminadmin.
  • Finally find and run the Master launch configuration to spin up a BDeploy master.

# Running BDeploy's Web UI from VSCode

To spin up a matching frontend for the master started in Running BDeploy from Eclipse you need to start the Angular application from within VSCode.

  • On the command line, navigate the the ./ui/webapp directory in the repository (e.g. /work/bdeploy/bdeploy/ui/webapp) and run VSCode in the current directory using code .
  • Open a terminal in VSCode and run ng serve to start the Angular development server. This will take a while to compile the Web UI.
    • The terminal can be opened using Terminal > New Terminal.
    • The application will be started at http://localhost:4200 by default.

# Building for other platforms

You can build distribution packages for other platforms by installing their respective JDKs. You need to specify those JDKs as properties during the build. To simplify the process, you can create these entries in ~/.gradle/gradle.properties:

~/.gradle/gradle.properties
systemProp.win64jdk=/path/to/jdks/windows/jdk-21
systemProp.linux64jdk=/path/to/jdks/linux/jdk-21
#systemProp.mac64jdk=/path/to/jdks/mac/jdk-21/Contents/Home