Artifactory

 

Artifactory


    Software Development life cycle is a complex process that involves a team of developers working on the collaborative model by accessing the same build tool to build the artifacts which contribute to the same software product. Have you ever worried about managing these artifacts during the build process? Artifactory can do it for you by remarkably managing them.


Course Prologue

In this course, you will have a glimpse of the concepts of Artifactory.

  • Introduction to Binary Repository and Artifactory
  • Installation and Configuration of Artifactory
  • User Interface Tour
  • Integration of Jenkins with Artifactory
  • Demo on the integration of CI pipeline to Artifactory

A Glance on SDLC
A Glance on SDLC

The picture depicts the phases of the Software Development Life Cycle(SDLC). The phases of SDLC are:

  • Requirement Analysis
  • Design
  • Implementation (Development)
  • Evolution
  • Testing

This course focuses on the phases of Implementation, Evolution, and Testing.


Implementation Phase of SDLC

  • In Implementation phase of SDLC, a team of software developers builds an excellent code in build tools like Eclipse, Maven, Gradle, and Ivy.
  • Each developer declares the dependencies for their source code.
  • Without the dependencies, the build process will be a failure.
  • Once the Build is done, the developers commit the changes in some version control system like GitHub.

What are Dependencies?

Dependency in Programs

  • Dependency is a widely used Software Engineering term.
  • It refers to the concept when a piece of software depends on the other one for the successful execution.
  • Coupling: It refers to the degree of module dependency on the other modules.

Example:

In C programming language, the member functions like clrscr()getch() uses the library conio.


Where to Get Dependencies From?
Where to Get Dependencies From?

Earlier times before the Artifactory was introduced the developers would randomly access the different repository to get them as depicted in the picture.

Disadvantages

  • IT Admin: No control over what is brought in to the environment.
  • IT Security: No control over the packages and versions that are brought into the development environment.

Storage of Artifacts

After the successful build and deployment of code, where do we store the end products Artifacts(Binaries)?

The storage of Artifacts are:

  • Source Control systems like Version Control System and SubVersion
  • File System
  • Binary Repository Manager

The best option of the three is the Binary Repository Manager.


Features of Repository Managers

The key features of the repository managers are:

  • Dependency Management
  • Effective builds
  • Release stability
  • Control and audit
  • Collaborative working
Binary Repository manager

Binaries

The end products of the software development phase are the Artifacts, also called binaries.

Binary Repository Manager

  • Stores Binary Artifacts along with the metadata.
  • Metadata contains the information of versioning, promotions of build and dependencies needed for the successful deployment process.
  • Centralizes the Binary Artifact management.
  • Overcomes the complexity generated from the wide variety of artifacts and the existence of dependencies among them.
Artifactory

Welcome to the world of Artifactory! Let's explore the ocean of Artifactory.

Artifactory

  • Binary Repository Manager
  • Only Universal Repository Manager
  • Storage of Artifacts (Binaries)
  • Compatible with all Dependency Managers like Maven and Ruby
  • More Secure and high availability
  • Increases product speed and Quality



An Overview of  Artifactory

Do you want to explore more on Artifactory? See this video to know more.  https://youtube.videoken.com/embed/r2_A5CPo43U








Working of ArtifactoryWorking of Artifactory

The above picture depicts the critical role played by JFrog Artifactory in Development.

  • Artifactory acts as a central repository where the developers can access their needed packages and libraries when required.

  • In case, if the package is not found in the Artifactory, it accesses the remote site to obtain the needed packages and caches it for the developers for the further use.

Artifact Origin

The word Artifact is originated from the Latin phrase arte factum which refers to something made with skill.

Artifactory Query Language

AQL

  • Queries data related to Artifacts.
  • Formulates complex queries that specify:
    • Search criteria
    • Filters
    • Sorting options
    • Output parameters.
  • RESTful API
  • AQL is executed in Artifactory API
  • Runs on remote repositories, local repositories, and virtual repositories.

  https://youtube.videoken.com/embed/CDfTAUA2YWY




Prerequisite
  • Artifactory runs on the platform with JDK 1.5 and above.
  • JAVA_HOME environment variable must correctly point to JDK 8 installation path.
Download the Artifactory
  • Artifactory can be downloaded here.
  • Download the open Source solution Artifactory.

Extraction

OSX or Linux : The downloaded archive can be extracted with these commands in terminal.

tar xvzf jfrog-<version>.<tar file extension>

Example:

$ tar xvzf jfrog-artifactory-oss-6.6.0.zip

In Windows, extraction can be done in command prompt by:

$ 7za.exe e jfrog-artifactory-oss-6.6.0.zip



Installation of Artifactory
  • As a result of extraction,, a folder named JFrog Artifactory -<Version> will be shown.

  • Navigate inside the /bin folder using your Terminal(Linux/MAC) or Command Prompt(Windows)

  • Run this command to start your Artifactory

    $ ./artifactory.sh
    
  • On successful starting of service, a message gets displayed on the terminal.

Artifactory successfully started!


Here it is!
  • Artifactory runs in the port number 8081 by default.
  • Open up your browser and type http://localhost:8081/artifactory/
  • It opens up the Welcome screen of Artifactory.
  • Login with the Default credentials:
    • Username: admin
    • Password: password



Welcome Screen of Artifactory
Welcome Screen of Artifactory

 

 

Explore the Process of Installation

This video gives the sequence of steps to be followed for the successful installation of Artifactory.


https://youtube.videoken.com/embed/XExvsdSITsY




Artifactory UI
Artifactory UI

The five main modules of Artifactory UI are:

  • Home
  • Artifacts
  • Search
  • Build
  • Admin
Home Screen
  • The Home screen is organized with panels that helps us in providing information and also in quick navigation to the frequently used features.
  • It contains:
    • Top Panel
    • Search Panel
    • Feature Panel
    • Set Me Up Screen
    • Statistics of Deployment
    • Reference Panel


Top Panel and Search Panel

Top Panel

  • Displays the logged-in user.
  • Provides access to Quick Search and Help.

Search Panel

The Search Panel provides the ability to do different searches on Artifacts.


Set Me Up
Set Me Up
  • Provides details on configuring the different clients to work along with the repositories that are created.
  • The picture portrays the Set Me Up screen with the different features.
Statistics and Feature Panel

Statistics of Download and Deployment

  • Provides information on the frequently accessed artifacts and the last build details.

Feature Panel

  • Present at the bottom of the screen.
  • License-based features are displayed here.
Reference Panel
Reference Panel

Reference panel provides links to the references namely:

  • User Guide
  • Support Portal
  • Blogs
  • Webinar
  • Rest API

Artifact Repository Browser
Artifact Repository Browser

The next module being Artifact repository Browser helps you in:

  • Browsing the Repositories
  • Components installed in Repositories
  • Searching Artifacts generated by the build
  • Deep diving into artifacts gives more details on them
Features of Artifact Browser

Set Me Up

This helps you in configuring the repository.

Deploy

Deployment to the production environment is done.

Actions

The actions supported by the browser are:

  • Refresh
  • Native Browser
  • Zip Cache
  • Add to favorites
Search Artifact
Search Artifact

The next module is the Search tab that helps in searching by name, package type, and properties.


Features of Search Artifacts

The features embedded in Search Artifact are:

  • Quick: File name-based search.
  • Package: Search based on package format.
  • Archive Entries: Search for files inside archives
  • Property: Based on the names and values of properties.
  • Checksum: Search based on checksum value.
  • JCenter: Search in Bintray's JCenter repository.
  • Trash Can: Search in Artifactory's trash can.

Build Module
  • The module of Artifactory UI is Build.
  • When a CI pipeline is integrated with Artifactory, the resulting builds get displayed here on the basis of:
    • Build Name
    • Last Build ID
    • Last Build Time
  • Comparisons of builds can be done here.
Admin Module
Admin Module
  • The module of Artifcatory UI is Admin module.
  • Only available for the persons who are defined as Administrators.
Features of Admin Module

The various administrative and maintenance activities performed by Admin module are:

  • Configuring Repositories (local, remote, virtual), licenses, proxies, mail servers.
  • Managing aspects of security such as LDAP.
  • Managing backup and indexing of Repositories.
  • Importing/Exporting repositories
  • Scheduling clean up operation.

Delve into UI

See this video to know more about Artifactory UI.


https://youtube.videoken.com/embed/WrKEozY9efQ



Artifactory with Jenkins

To blend Artifactory with Jenkins, Plugin has to be installed in Jenkins. Follow the sequence for the magic installation of Artifactory in Jenkins.

  • Choose Manage Jenkins tile.

  • Select Manage plugin tab that shows the various colors of plugins like Updates, Available and Installed.

    • Updates: Notifies the latest releases
    • Available: Plugins that are not installed yet.
    • Installed: Plugins that are installed.
  • Go to Available and install the plugin named Artifactory to integrate Artifactory` into Jenkins.

  • Finally, choose Install without Restart option to help Jenkins embrace Artifactory plugin.



An Overview of Integration
An Overview of Integration
Configuration of Artifactory in Jenkins

Follow the Sequence of steps to configure the Artifactory in Jenkins platform.

  • Open the Jenkins.
  • Click Manage Jenkins tile.
  • Click Configure System option.
  • Scroll down until the Artifactory Section appears.
  • Click Add Artifactory Server button.
  • Populate the required fields like
    • Server ID: artifactoryrepo (any user defined name).
    • URLhttp://localhost:8081/artifactory (URL of Artifactory).
  • Click Test Connection option.

On successful configuration, it displays the message:

Found Artifactory

An Overview of Configuration
An Overview of Configuration
Explore More!

This video gives an overview of Integrating Artifactory with Jenkins.


https://youtube.videoken.com/embed/fxtQThl8B-8
Problem Statement

A Client of the company wants to store their Artifacts (binaries) in a central repository so that they can make the development phase of the Software Development Life Cycle much more efficient by the collaborative working supported by the central repository.

Let's help them with our Artifactory!


Prerequisite

Adequate knowledge in

The sequence of steps to be followed:

  • The Client has given their GitHub repository link of their project.
  • We will try building the Maven project using Jenkins.
  • The generated Artifacts at the end of the build process is directed to your Artifactory so that it acts as Central storage.
To be Noted

Make sure to install and configure the following plugins in Jenkins as seen in the earlier courses.

  • Maven
  • GitHub
  • Artifactory
https://youtube.videoken.com/embed/lTQGi5jzjvo


Configuring Maven Project in Jenkins(1)

The following sequence of steps gives us the picture of configuring the Maven Project in Jenkins.

  • Open up the Jenkins in your web browser.

Creating Project

  • Click the New Item tile in the left panel.
  • Provide the suitable project name and choose Maven Project. Click OK.

Configuring Source Code

  • Navigate to the Source Code Management tab and check on Git option.
  • Provide the URL of the GitHub repository.

Configuring Maven Project in Jenkins(2)

Build Environment

  • Navigate to Build Environment tab.
  • Click the check boxes of
    • Enable Artifacts Release Management
    • Resolve Artifacts from the Artifcatory.
  • In Resolve Artifacts from Artifactory section, we will have to provide the URL of the Artifactory Server.
  • Now Click on Refresh Repositories.
  • The release and the snapshot repositories will be auto-populated. Changes can be done when needed.

Post Build Actions(1)

Build

  • Navigate to Build tab.
  • Provide the path of your POM file and the goals to be done like Clean, install, and deploy.

Post Build

  • Navigate to the Post-Build Actions tab.
  • Drop down the options of Add Post Build Actions by clicking on it.
  • Choose Deploy Artifacts to Artifactory.
  • Provide the URL of the Server and click on Refresh.
Post Build Actions(2)
  • Scroll down until you get an option namely:
    • Include Environmental variables
    • Run Artifactory License Checks
  • Check the boxes of both the options.
  • Click on Apply.

Build process

  • Once done click Build option.
  • Check for the Console output until Finished: Success appears.

Hurray! We have done configuring the Maven Project in Jenkins.


Now it's Time to Check

Let's check if the Artifacts got directed to the Artifactory from Jenkins Build.

  • Open up the Artifactory in your web browser.
  • Navigate to Artifact Repository Browser tab.
  • There you can find the Artifacts (both releases and snapshots) stored in the suitable repositories as given during the project build.


Check your Artifactory
Check your Artifactory






Comments