Ubuntu Environment Setup Guide for Aletyx Enterprise Build of Kogito and Drools¶
This guide provides step-by-step instructions for setting up your development environment for Aletyx Enterprise Build of Kogito and Drools on UbuntuĀ®. The setup includes DockerĀ®, Java⢠17, Apache Mavenā¢, and Visual Studio CodeĀ®.
Docker Installation¶
1. Remove Potentially Conflicting Packages¶
First, remove any old or conflicting Docker installations to ensure a clean setup:
2. Install Prerequisites¶
Install necessary packages to allow apt to use repositories over HTTPS:
3. Set Up Docker Repository¶
Add Docker's official GPG key to ensure package authenticity:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
Add the stable Docker repository to APT sources:
echo \
"deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
4. Install Docker Engine¶
Update package index and install the latest version of Docker Engine and containerd:
5. Configure Docker User Permissions¶
Add your user to the docker group to run Docker commands without sudo:
6. Configure Docker Service¶
Start and enable the Docker service to run on system startup:
Docker Compose⢠Installation¶
1. Install Docker Compose¶
Download and install the latest stable version of Docker Compose:
sudo curl -L "https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-linux-x86_64" -o /usr/local/bin/docker-compose
Make the binary executable:
Verify the installation:
Visual Studio Code Installation¶
Install Visual Studio Code, a powerful IDE with excellent Docker and Java support. This benefit is only grown more within the Apache KIE⢠Community with provided plugins to add to the power of the tool!
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
sudo install -D -o root -g root -m 644 packages.microsoft.gpg /etc/apt/keyrings/packages.microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/keyrings/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
rm -f packages.microsoft.gpg
sudo apt update
sudo apt install -y code
Java Development Environment¶
1. Install OpenJDK 17¶
Install the Java Development Kit - JDK 17:
2. Install and Configure Maven¶
Download and install Apache Maven Maven 3.9.6:
wget https://dlcdn.apache.org/maven/maven-3/Maven 3.9.6/binaries/apache-maven-Maven 3.9.6-bin.tar.gz
Extract Maven to the /opt directory:
Create a symbolic link for easier version management:
Confirm the Java that you're using with:
Tip
Make sure you understand which version of Java you're using, if you're using an arm64 deployment of Ubuntu, then you will probably have /usr/lib/jvm/java-17-openjdk-arm64/bin/java instead of -amd64 as seen in the message above.
Configure environment variables for Java and Maven in your ~/.bashrc:
export M2_HOME=/opt/maven
export PATH=${M2_HOME}/bin:${PATH}
export JAVA_HOME=/usr/lib/jvm/java-17-openjdk-amd64
export PATH=$JAVA_HOME/bin:$PATH
Load the new environment variables:
Verify Maven installation:
Next Steps¶
After completing this setup:
- Log out and log back in for group changes to take effect
- Test Docker installation by running:
docker run hello-world
- Install recommended VS Code extensions for Java and Docker development
- Configure Maven settings if working with private repositories
Troubleshooting Tips¶
- If Docker commands fail, ensure your user is properly added to the docker group
- If Maven isn't recognized, verify the environment variables are properly set
- For VS Code extensions, ensure Java Extension Pack is installed for full Java support