Overview
In versions prior to 9.10, Designer used only the “default” Integration Server instance as the local development server. However, from version 9.10, you have the flexibility to designate any Integration Server instance as your local development server, provided that the selected instance is installed in the same directory as the active Designer instance. Furthermore, Software AG Designer 10.15 and later versions introduced local service development in containerized Integration Server or Microservices Runtime. The ability to designate any Integration Server instance as your local development server brings a new level of flexibility to your workflow.
This tutorial will guide you through leveraging the Integration Server or Microservices Runtime in a Docker container as your local development server.
Prerequisites
Before delving further, let’s ensure that:
- Docker and Designer are installed on the same host.
- Docker images are available in the Container Registry at https://containers.softwareag.com/
Note: The Microservices Runtime images are readily available in the registry. However, you must create images for the Integration Server. - The latest fix is installed for Software AG Designer 10.15.
- An existing Git repository is available.
To start off, let’s clone your existing Git repository to your local machine using the following command:
git clone <repository URL>
In this tutorial, the repository name is larrepo.
Setting Integration Server or Microservices Runtime as the Local Development Server
The tutorial helps you to streamline your local development server process in four easy steps:
- Create or pull Docker images from the specified registry.
- Use Designer to map the container volume.
- Add the cloned Git repository to your development environment.
- Create a local service development project.
Create or pull Docker images from the specified registry
Mount the corresponding host directory of the external Git repository in the Docker container:
- Pull the docker image with volume of the cloned repo and a valid port number using the following start up command:
- Container name
- Port number
- Host directory
- Installation directory and container path
- MSR image
Here, an MSR image is used and the port number is 5559.
You can also use the following sample command:
docker run -i -t -d \
--name $[container_name] \
-v $[container_named_volume]: [Install_Dir]/IntegrationServer/packages \
-v [host_git_project_location]:/[container_git_project_location]
-p [host_primary_port:]primary_port \
[image_name] \
/bin/bash
For MSR, there is a change in the path for the installation directory:
[Install_Dir]/IntegrationServer/packages
Copy the sample command and edit it according to your configuration.
- Confirm that the server definition is valid for the port number used by checking Window > Preferences > Software AG > Integration Servers.
As we have the option to enable local service development in a containerized Integration Server or Microservices Runtime, let’s see how to mount a file volume into the Docker container through Designer.
Use Designer to map the volume
- In Designer, select Window > Preferences > Software AG > Service Development > Local Service Development, and select Enable local service development in containerized Integration Server or Microservices Runtime.
- Click Add to set the docker volume and port details.
The Add New Volume dialog box appears. - Enter Host Path, Container Path, and click OK.
- Enter the port number in the designated field.
See the docker command and fill in the volume details:
- Click Apply to save the configuration.
Now, you can see that the package is shared:
Now, let’s add the cloned Git repository using Designer.
Add the cloned Git repository
- In Designer, go to Window > Show View > Other > Git > Git Repositories.
- In Git Repositories, click Add an existing local Git repository.
- In the Add Git Repositories dialog box that appears, browse the cloned repository from your local machine.
- Click Add.
The added Git repository is now available in Git Repositories.
So, you have enabled local service development, mounted the volume to Docker container, and added the Git repository. Now, let’s create or convert a project as a local service development project.
Create a Local Service Development project
You can create a package and convert it to a local service development project or import a package from a Git repository.
In this tutorial, you will create a package and convert it.
Create a new package and add assets
- In Designer, go to File > New > Package.
- In the New Integration Server Package dialog box, select the Integration Server in which you want to create the package.
- In the Name field, type the name for the new package using any combination of letters, numbers, and the underscore character.
- Click Finish.
Designer refreshes the Package Navigator view and displays the new package. - Create an empty flow service and define it by inserting flow steps.
Convert the package as a local service development project
- In Package Navigator view, right-click the package for which you want to create a local service development project and select Create Local Service Development Project.
- Designer notifies you to refresh your workspace resources before performing VCS operations. Click OK to proceed.
Note: Refresh your workspace using native hooks or polling preferences in Preferences > General > Workspaces or refresh manually. - Designer notifies again that containerized Integration Server or Microservices Runtime requires a local service development utility API. Click OK to install a local service development utility package.
The Repository dialog box displays the list of volumes mounted. - Select the mapped repository (Host Path and Container Path).
- Enter your path within your repository (optional).
- Click OK.
- In the Share Project dialog box that appears, select the repository location.
- Click Finish.
In the Package Navigator view, you can see the repository link created for the project.
Now, the demo package is converted to a local service development package.
We can also add these changes to a Git repository. As you have the larrepo repository cloned and added in Designer. Let’s commit these changes to the repository.
Commit changes to the cloned repository
- Right-click the newly created local service development package, select Teams > Commit.
In Git Staging, you can see the unstaged changes.
- In Git Staging, review and commit changes, then click Push Head.
- Click Commit and Push after adding a commit message.
You can verify the results in Designer.
So, you have successfully created a package, converted it as a local service development project and shared it to your cloned repository. Additionally, you also committed some changes to the shared project and pushed the changes to your existing Git repository in a few minutes. This setup allows you to efficiently collaborate on shared projects.
With Docker at the helm, your local development environment becomes a dynamic, reproducible space that adapts to the evolving demands of your projects. For further exploration and troubleshooting, consider joining our community forum.
This article is part of the TECHniques newsletter blog - technical tips and tricks for the Software AG community. Subscribe to receive our quarterly updates or read the latest issue.