Artifacts

JFrog Artifactory and Oracle Cloud

Mickey Boxell
Oracle Developers
Published in
5 min readDec 13, 2019

--

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:

export JAVA_HOME=/usr/bin/java
export PATH=$JAVA_HOME/bin:$PATH

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:

$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c5146646a363 docker.bintray.io/jfrog/artifactory-pro:latest "/entrypoint-artifac…" 2 days ago Up 2 days 0.0.0.0:8081->8081/tcp artifactory

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:

helm repo add jfrog https://charts.jfrog.io

To install the chart with the release name artifactory:

helm install --name artifactory jfrog/artifactory

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

1. Get the Artifactory URL by running these commands:NOTE: It may take a few minutes for the LoadBalancer IP to be available.
You can watch the status of the service by running 'kubectl get svc -w artifactory-nginx'
export SERVICE_IP=$(kubectl get svc --namespace default artifactory-nginx -o jsonpath='{.status.loadBalancer.ingress[0].ip}')
echo http://$SERVICE_IP/
2. Open Artifactory in your browser
Default credential for Artifactory:
user: admin
password: password

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.

--

--

Mickey Boxell
Oracle Developers

Product Manager — OCI Container Engine for Kubernetes (OKE)