You are on page 1of 11

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.

Earlier times before the Artifactory has 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.

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.

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:
o Search criteria
o Filters
o Sorting options
o Output parameters.
 RESTful API
 AQL is executed in Artifactory API
 Runs on remote repositories, local repositories, and virtual repositories.

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:
o Username: admin
o Password: password

The five main modules of Artifactory UI are:

 Home
 Artifacts
 Search
 Build
 AdminIt contains:

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.


 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 provides links to the references namely:

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

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

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:
o Build Name
o Last Build ID
o Last Build Time
 Comparisons of builds can be done here.
 The module of Artifcatory UI is Admin module.
 Only available for the persons who are defined as Administrators.
 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.

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.
o Updates: Notifies the latest releases
o Available: Plugins that are not installed yet.
o 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.

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
o Server ID: artifactoryrepo (any user defined name).
o URL: http://localhost:8081/artifactory (URL of Artifactory).
 Click Test Connection option.

On successful configuration, it displays the message:


Found Artifactory

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

 Jenkins
 Maven

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

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
o Enable Artifacts Release Management
o 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:
o Include Environmental variables
o 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.

Course Summary
Applauses! You are at the end of the course. Here is the quick recap of what you
have learned in this course.
 Role in SDLC
 Binary Repository
 Introduction to Artifactory
 Installation and Configuration of Artifactory
 A Tour on Artifactory UI
 Integration of Artifactory with Jenkins
 Integration of CI pipeline to Artifactory - Demo

Hope this node course was helpful.

POM Project Object Model (Maven project file)

You might also like