JFrog Artifactory is a widely used and powerful repository management software currently used by many companies to manage and distribute their software packages, containers, and artifacts. JFrog Artifactory provides a central management portal from where you can store, version, and distribute your artifacts with ease in the entire software development lifecycle. Below are the main features and functionalities of JFrog Artifactory.
- Artifacts management through its repository function
- Version control of all artifacts, containers, and packages
- Flexible access control function that enables you limit access based on roles
- Ease of integration with build tools such as Jenkins and other tools.
- Features that enables you to manage releases
Installing JFrog Artifactory on Ubuntu 22.04 (Jammy Jellyfish)
The quickest installation method involves the use of pre-packaged container images with all dependencies required to run JFrog Artifactory. An alternative installation method will involve the use of debian packages distributed by the developers of this great software.
Method 1: Install JFrog Artifactory using Deb packages
In this method we need to install dependencies, add the repository, then install JFrog Artifactory on Ubuntu 22.04 (Jammy Jellyfish).
Step 1: Install Java and MariaDB
Install Java on your Ubuntu system.
sudo apt update
sudo apt install -y default-jdk
Validate version of Java installed
$ java -version
openjdk version "11.0.18" 2023-01-17
OpenJDK Runtime Environment (build 11.0.18+10-post-Ubuntu-0ubuntu122.04)
OpenJDK 64-Bit Server VM (build 11.0.18+10-post-Ubuntu-0ubuntu122.04, mixed mode, sharing)
Add MariaDB database server repository as well into the system.
curl -LsS https://downloads.mariadb.com/MariaDB/mariadb_repo_setup | sudo bash -s --
Install MariaDB server and client packages.
sudo apt update
sudo apt install mariadb-server mariadb-client -y
Start database service
sudo systemctl enable --now mariadb
Step 2: Add JFrog Artifactory repository
Add JFrog Artifactory APT repository.
echo "deb https://releases.jfrog.io/artifactory/artifactory-debs xenial main" | sudo tee -a /etc/apt/sources.list.d/artifactory.list;
deb https://releases.jfrog.io/artifactory/artifactory-debs xenial main
Import repository GGP key by running the following commands.
curl -fsSL https://releases.jfrog.io/artifactory/api/gpg/key/public|sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/artifactory.gpg
Applications debian applications package index.
sudo apt update
Step 3: Install JFrog Artifactory on Ubuntu 22.04
Next we can install JFrog Artifactory on Ubuntu 22.04 since the package repositories are working.
sudo apt install jfrog-artifactory-oss
You should get a success message after the installation.
Group artifactory doesn't exist. Creating ...
Checking if user artifactory exists...
User artifactory doesn't exist. Creating ...
Checking if artifactory data directory exists
Removing tomcat work directory
Unpacking jfrog-artifactory-oss (7.55.13) ...
Setting up jfrog-artifactory-oss (7.55.13) ...
Adding the artifactory service to auto-start... DONE
************ SUCCESS ****************
The Installation of Artifactory has completed successfully.
Start the service after installation.
sudo systemctl start artifactory.service && sudo systemctl enable artifactory.service
To check service status use:
systemctl status artifactory.service
Create MariaDB database for JFrog Artifactory:
$ sudo mariadb -u root
MariaDB [(none)]> source /opt/jfrog/artifactory/app/misc/db/createdb_mariadb.sql;
Query OK, 1 row affected (0.002 sec)
Query OK, 0 rows affected (0.003 sec)
Query OK, 0 rows affected (0.002 sec)
MariaDB [(none)]> exit
Bye
Method 2: Install JFrog Artifactory using Deb packages
With this method you don’t have to spend lots of time troubleshooting build failures and why the application can’t run on the base OS.
1. Install Docker & Docker Compose
Begin with the installation of Docker runtime.
Confirm your docker installation
$ docker version
Client: Docker Engine - Community
Version: 23.0.6
API version: 1.42
Go version: go1.19.9
Git commit: ef23cbc
Built: Fri May 5 21:18:13 2023
OS/Arch: linux/amd64
Context: default
Server: Docker Engine - Community
Engine:
Version: 23.0.6
API version: 1.42 (minimum version 1.12)
Go version: go1.19.9
Git commit: 9dbdbd4
Built: Fri May 5 21:18:13 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.21
GitCommit: 3dce8eb055cbb6872793272b4f20ed16117344f8
runc:
Version: 1.1.7
GitCommit: v1.1.7-0-g860f061
docker-init:
Version: 0.19.0
GitCommit: de40ad0
$ docker compose version
Docker Compose version v2.17.3
Note that for Docker and Docker Compose installations, JFrog services require Docker v18 and above (for Pipelines 18.09 and above) and Docker Compose v1.24 and up to be installed on the machine on which you want to run on.
2. Choose Installation type
There are three major subscription types. Refer to table below:
Subscription Type | Install Type | Download the Package |
---|---|---|
Pro Pro X Enterprise X Enterprise+ | pro | Download Link |
Artifactory OSS | oss | Download Link |
JFrog Container Registry | jcr | Download Link |
Our deployment example will show how to use either of the types shown above.
3. Run JFrog Artifactory in Docker Container
Here we cover how to perform Artifactory single node installation with Docker. I’m working on a system with the following hardware requirements:
- 8GB of Memory
- 4 CPU cores
Define JFROG_HOME in a variable
JFROG_HOME=~/jfrog
Create required data directories:
mkdir -p $JFROG_HOME/artifactory/var/etc/
cd $JFROG_HOME/artifactory/var/etc/
Create an empty system.yaml
file
touch ./system.yaml
chown -R 1030:1030 $JFROG_HOME/artifactory/var
Create a container matching your edition of Artifactory.
### Artifactory Open Source ###
docker run --name artifactory -v $JFROG_HOME/artifactory/var/:/var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-oss:latest
### Artifactory Pro ###
docker run --name artifactory -v $JFROG_HOME/artifactory/var/:/var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-pro:latest
### Artifactory Community Edition for C/C++ ###
docker run --name artifactory -v $JFROG_HOME/artifactory/var/:/var/opt/jfrog/artifactory -d -p 8081:8081 -p 8082:8082 releases-docker.jfrog.io/jfrog/artifactory-cpp-ce:latest
Sample execution output:
Unable to find image 'releases-docker.jfrog.io/jfrog/artifactory-oss:latest' locally
latest: Pulling from jfrog/artifactory-oss
ae9e8620cc67: Pull complete
ce9be3d6ba6c: Pull complete
b0e450ecab8e: Pull complete
31dab46d8925: Pull complete
4a18ef7f5251: Pull complete
4f4fb700ef54: Pull complete
4d8347ace69f: Pull complete
dddafb5fd988: Pull complete
571a0b9e48b2: Pull complete
5557000c2460: Pull complete
Digest: sha256:988b2eb4eb2b7edf578cf7016e9a5dff69ba86636f579c386f8fcca7570afb7b
Status: Downloaded newer image for releases-docker.jfrog.io/jfrog/artifactory-oss:latest
c6c397fbb4b0a896f65f2fd2b50d287c2dd831cd1288450804b7b412aecb8360
You can configure all your system settings using the system.yaml
file located in the $JFROG_HOME/artifactory/var/etc
folder. For more information, see Artifactory YAML Configuration.
Check Artifactory container using the following commands:
$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c6c397fbb4b0 releases-docker.jfrog.io/jfrog/artifactory-oss:latest "/entrypoint-artifac…" 47 seconds ago Up 45 seconds 0.0.0.0:8081-8082->8081-8082/tcp, :::8081-8082->8081-8082/tcp artifactory
To check Artifactory logs use:
docker logs -f artifactory
To stop the container use the stop
docker container option.
docker stop artifactory
Access JFrog Web UI
Artifactory web interface can be accessed from your browser at: http://SERVER_HOSTNAME:8082/ui/
. For example, on your local machine: http://localhost:8082/ui/
.
The default logins are:
- User: admin
- Password: password
Click the “Get Started” button to begin web configuration.
Next set new password for the admin user account.
Next set the Base URL that will be used as the custom URL for accessing the JFrog Platform. For example, https://yourdomain.com, will be used as the Base URL in redirect responses, and generated emails.
Follow the next prompts to complete the installation of JFrog Artifactory on Ubuntu 22.04 Linux system. Once it’s complete you can start using it to manage your application artifacts, containers. and all other capabilities of Artifactory application.
To configure reverse Proxy using Nginx use the guide below:
Conclusion
In this blog post we’ve demonstrated how you can install, configure and use JFrog Artifactory on Ubuntu 22.04. We were not able to cover in detail the usage of Artifactory but there are a lot of online resources on the same. The official website will be the first place to start searching for how to use content.