Artifacts

JFrog Artifactory and Oracle Cloud

Mickey Boxell
Dec 13, 2019 · 5 min read

Overview

These days companies are releasing software faster than ever in order to stay competitive in the market. Asking distributed teams to produce updates and features at a high rate presents new operational challenges that create an opportunity for system vulnerabilities to arise. This complexity also can cause testing problems and generally slow down the pace of software releases. One way to prevent these issues is by using a universal repository to disallow developers to choose their own versions of software and using artifacts from different sources.

One such tool, JFrog Artifactory, is useful for sharing libraries and third-party components at scale. Artifactory centralizes control, storage, and management of binaries throughout the software release cycle. It is easy to integrate with a variety of build tools and coding languages and provides users with the ability to tag libraries with searchable metadata for speed, security, and quality. Artifactory Pro provides all these features, while Artifactory’s Enterprise edition can be installed for high availability, includes Xray for package security scanning, and also Mission Control for realtime, centralized control of your environment.

JFrog Artifactory

Virtual Machine Installation

Refer to the official Artifactory installation guide for a more detailed walkthrough of the Artifactory installation process.

I chose to install Artifactory on Oracle Cloud Infrastructure, a modern, second-generation cloud which was built and optimized specifically to help enterprises run their most demanding workloads securely. For this test, I used the Oracle VM.Standard1.8 instance shape, which more than met the Artifactory system requirements. I provisioned this instance with a public IP address. I chose an x64-bit Canonical-Ubuntu-18.04 image because this is the most up-to-date Ubuntu version supported by Artifactory. The JFrog Systems Requirements page includes additional information about technical pre-requisites.

Artifactory virtual machine

After provisioning a virtual machine make sure you have JDK 8 or above installed and your JAVA_HOME environmental variable set to the JDK installation. To do so, I updated my list of packages with sudo apt update and installed the JDK with apt install default-jre. Next, I updated my $JAVA_HOME with vi ~/.bashrc and added the following to the end of the file:

I chose to install Artifactory as a Docker container. Alternatively, you can install Artifactory manually or install Artifactory in multiple containers using Docker Compose.

I installed Docker onto the virtual machine by following the official documentation for installing Docker Engine on Ubuntu. After doing so, I pulled the Artifactory Pro Docker image docker pull docker.bintray.io/jfrog/artifactory-pro:latest and then ran the image in a container docker run --name artifactory -d -p 8081:8081 docker.bintray.io/jfrog/artifactory-pro:latest.

In this case, you create a docker named volume and pass it to the container. By default, the named volume is a local directory under /var/lib/docker/volumes/<name>, but can be set to work with other locations. For more details, please refer to the Docker documentation for Docker Volumes.

The example below creates a Docker named volume called artifactory_data and mounts it to the Artifactory container under /var/opt/jfrog/artifactory:

$ docker volume create --name artifactory5_data

$ docker run --name artifactory-pro -d -v artifactory5_data:/var/opt/jfrog/artifactory -p 8081:8081 docker.bintray.io/jfrog/artifactory-pro:latest

In this case, even if the container is stopped and removed, the volume persists and can be attached to a new running container using the above docker run command.

Run docker ps to verify the container is running:

Artifactory serves traffic over port 8081. After the installation is complete you can connect to the Artifactory console by navigating to http://[IP Address]:8081/artifactory/webapp/#/home

JFrog Artifactory dashboard

Kubernetes Cluster Installation

In addition to installing JFrog Artifactory onto an Oracle Cloud Virtual Machine, you also have the option to install it onto the Oracle Container Engine for Kubernetes. Container Engine for Kubernetes is a standard and conformant, developer-friendly, container-native, and enterprise-ready managed Kubernetes service for running highly available clusters with the control, security, and predictable performance of Oracle’s Cloud Infrastructure. Refer to Installing on Kubernetes section of the JFrog documentation for more information regarding installing Artifactory on Kubernetes clusters.

The installation is accomplished by means of Helm, a package management tool for Kubernetes applications. There are a number of options available on the Helm Hub, including the default Artifactory chart and a chart designed for high availability. This chart will deploy Artifactory-Pro/Artifactory-Edge (or OSS/CE if custom image is set), along with a PostgreSQL database using the stable/postgresql chart, and an Nginx server. It also provides instructions for swapping out the underlying database, deploying small/medium/large installation, expose Artifactory with Ingress, and other optional modifications.

This guide will assume you have a Kubernetes cluster with a version greater than 1.8 and Helm installed.

The first step to installing JFrog helm charts is to add the JFrog helm repository to your helm client. To do so, run:

To install the chart with the release name artifactory:

When the installation is complete you will see a prompt to get the Artifactory URL and the default credentials:

The Artifactory chart documentation on the Helm Hub provides additional information for updating your deployment, specifying resource limits, and configuring storage.

Next Steps

After installing Artifactory on a virtual machine or Kubernetes cluster, the next step is configuration. Follow the steps to configure Artifactory as you would on any platform. You can get a 30-day free trial of Artifactory and a free trial of Oracle Cloud Infrastructure. Additional information can be found on the Artifactory Getting Started page.

Oracle Groundbreakers

Aggregation of articles from Oracle and partner’s engineers, Groundbreaker Ambassadors and the developer community on all things Oracle Cloud and its technologies. The views expressed are those of the authors and not necessarily those of Oracle. Contact @jimgris or @brhubart

Mickey Boxell

Written by

Oracle Cloud Native Labs — Developer Advocate and Product Strategy

Oracle Groundbreakers

Aggregation of articles from Oracle and partner’s engineers, Groundbreaker Ambassadors and the developer community on all things Oracle Cloud and its technologies. The views expressed are those of the authors and not necessarily those of Oracle. Contact @jimgris or @brhubart

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade