Jfrog as an Enterprise Universal Artifact Manager in DevOps
Universal artifact managers are a core feature of DevOps. Smart DevOps developers know how to use them appropriately to streamline testing and coding. Jfrog is a good tool for developing them in-house.
Using Jfrog as a Universal Artifact Manager
One thing that JfrogDevOps tools also excel at is library management. A library is a set of resources, functions, methods, code that is already implemented. Libraries can be reused when developing software.
When we develop programs, we don’t want to reinvent the wheel. Universal artifact managers can be useful for minimizing redundancy.
We tend to reuse code and resources to save us time and facilitate development. Universal artifact managers like Jfrog are ideal for this.
This will allow us to focus on more difficult and specialized aspects of our new application.
For example, we typically need a system of logs to record the bugs that may arise when running the application and be able to fix them.
This is something that is very often used in all software development projects. The most common thing is that we are not interested in programming our own log system for our software. Instead, we can use one that is already developed, tested and widely adapted. Chances are there is a library that implements something like this and we can use it in our software. Universal artifact managers make this much easier.
We may also want to do unit tests. If we are not going to start programming a framework, we need an interface that allows us to create and run the tests. We can use a platform like jUnit and incorporate this library into our development.
All these are examples of external libraries, which are built by third-party companies and independent developers all over the world. However, we might already have an existing code from our own organization.
Instead of having to manually search and install the libraries for our projects, Jfrog enables us to indicate which libraries our project needs in the pom.xml (Jfrog’s configuration file for the project). We will look for them so that we can use the methods, resources of those libraries when programming and compiling.
Where does Jfrog look for these libraries?
In the library repositories.
If you look, when we download Jfrog, we see that it is a tool that takes up very little disk space for how much it does.
Where does Jfrog have the libraries?
Where do you look for them?
To understand how Jfrog manages the libraries and compiles code, it’s good to see how its architecture is organized. This makes it easier to use Jfrog as an enterprise artifact manager.
Jfrog organizes itself through repositories, where those libraries that we have commented before will be.
In a simple Jfrog setup, we have a local repository in each computer where we have Jfrog installed (Jfrog is in charge of creating and managing it) and a remote and public repository, called Jfrog Central.
In Jfrog Central, almost all the libraries you may need when developing software are stored.
When compiling the code or when we want to use (install) the libraries, Jfrog would do the following:
1 – In the pom.xml of the project, in the dependencies section, we indicate the libraries that our project uses and that are hosted in central Jfrog.
2 – When you give the order to compile the code or install the libraries, Jfrog will look in my local repository for those libraries.
If they are not there, it will go to the central Jfrog to look for them, download them and install them in the local repository.
It will then compile the code using those central Jfrog libraries that are in the local repository. We can already use the methods they provide in our code.
For example, the next time Jfrog compiles, it will conduct the same process. However, it will be faster, because it has those libraries already installed in the local repository.
Where do Nexus and artifact manager tools come in?
As we can see, Jfrog is already very useful and saves us a lot of time. It is even more useful when it is repurposed with Nexus as an enterprise universal artifact manager.
However, thinking about a company, the truth is that we are not interested in leveraging a third-party solution.
This is especially true if we want to use the company’s own libraries. In this case, what do we do?
Do we upload them to Jfrog Central, thus allowing everyone to use them and see them?
Do we hang them in a place for each developer to install them as well as they can?
Do we upload them to version control?
These options are rarely ideal.
There are better ways to use a universal artifact manager.
Among other things, repository managers such as Nexus or a universal artifact manager are used for this. They don’t depend on something external at all times and being able to keep the company’s own libraries under control.