Directory structure built on OCP DCI agents
Back to all posts

Introduction

Some DCI users may not clearly understand how the agents' code is structured once they are installed in their servers, so they take long time to locate the resources they would need to check during the usage of the DCI agents or during troubleshooting.

Currently, the README documentation of each agent explains what are the files that are installed and their location in the server. Based on that information, this blog post will help users to understand why these files are placed in these locations and their roles in the execution process.

The projects covered on this blog post are the following:

General concepts

If you look at the GitHub repositories mentioned earlier, you will see a clear directory structure, but these files are not placed in the same directory once onboarded in the server where you install the DCI agents.

Remember that these DCI agents are all packaged and available as RPMs, so you eventually install the DCI agents using the RPM. If you take a look at each project's repository, you will find a .spec file, which contains the instructions used by rpmbuild to generate the RPM.

In the case of dci-pipeline, the .spec file directly includes the commands that are launched to place each folder/file in the correct destination. However, for dci-openshift-agent (1) and dci-openshift-app-agent (2), you can also find a Makefile for each case: (1), (2), which is eventually called in the .spec file to run the installation steps.

In addition to placing files and folders in the server, each RPM also holds instructions to create system users with sudo permissions and system groups, or to create system services. These features and utilities are beyond the scope of this blog post; we will just concentrate on files and folders that directly impact DCI users when dealing with the execution of DCI jobs.

So, let's delve into the project structure of each agent, checking the meaning of the most important files and folders provided, and identifying their location after installing the RPM on your server.

dci-openshift-agent

From the README, you will have some introductory information regarding the places where folders and files are located. Here, we will expand this information:

dci-openshift-app-agent

The structure of dci-openshift-app-agent is quite similar to dci-openshift-agent's one, but it focuses on the deployment of workloads, or running processes, on top of an already deployed OCP cluster. In the README, you can find some information, but here we provide the differences compared with dci-openshift-agent:

dci-pipeline

The case of dci-pipeline differs from the agents as it's not an "agent" at all; it provides a set of tools to enable the deployment of pipelines to run DCI jobs. In the README, you can find a review of the files and folders you can find here. Details are below:

Conclusions

We hope this information is useful for you when dealing with any of dci-openshift-agent, dci-openshift-app-agent and dci-pipeline projects, to be able to easily locate the resources you may need to check when dealing with troubleshooting.