Before you proceed, see System Requirements for information on supported platforms, supported browsers, and other requirements.
In addition, review the Docker requirements.
Docker Requirements
For Docker and Docker Compose installations, JFrog services require Docker 20.10.10 and above, and Docker Compose v1.24 and above to be installed on the machine where you want to run them.
For more information, see Docker and Docker Compose.
Follow these steps to install the product:
Extract the contents of the compressed archive and go to the extracted folder.
tar -xvf jfrog-xray-<version>-compose.tar.gz
.env file included within the Docker-Compose archive
The .env file is used by docker-compose and is updated during installations and upgrades.
Some operating systems do not display dot files by default. If you make any changes to the file, remember to backup before an upgrade.
Create the following folder structure under
JFROG_HOME
.|-- [ ] app |-- [ ] third-party |-- [999 999] rabbitmq |-- [1035 1035] var |-- [1035 1035] data |-- [1035 1035] etc
Copy the appropriate docker-compose templates from the templates folder to the extracted folder. Rename it as
docker-compose.yaml
.Requirement
Template
Xray
docker-compose.yaml
RabbitMQ
docker-compose-rabbitmq.yaml
PostgreSQL
docker-compose-postgres.yaml
Docker for Mac
When you use Docker Compose in Mac,
/etc/localtime
might not work as expected since it might not be a shared location in the docker-for-mac settings.You can remove the following line from the selected
docker-compose.yaml
file to avoid installation issues.- /etc/localtime:/etc/localtime:ro
Update the
.env
file.## The installation directory for Xray. Default [$HOME/.jfrog/xray] ROOT_DATA_DIR= # Host ID. Other nodes in the cluster will use this ID to identify this node HOST_ID= # ID of the active node. Please leave the value as "None" for active nodes. (shared.rabbitMq.active.node.name). JF_SHARED_RABBITMQ_ACTIVE_NODE_NAME=None # IP of the active node. (shared.rabbitMq.active.node.ip) JF_SHARED_RABBITMQ_ACTIVE_NODE_IP=127.0.0.1 # Bind IP for Internal ports of Third party applications JF_THIRD_PARTY_BIND_IP=127.0.0.1ROOT_DATA_DIR=
Customize the product configuration.
Set the Artifactory connection details.
Customize the PostgreSQL Database connection details. (optional)
Set any additional configurations (for example: ports, node id) using the Xray
system.yaml
file.Note
Ensure the host's ID and IP are added to the
system.yaml
. This is important to ensure that other products and Platform deployments can reach this instance.Enter the RabbitMQ information in system.yaml. If you want to setup a RabbitMQ HA cluster, enter the information in all the slave nodes.
shared: rabbitMq: active: node: ip: <IP> name: <xray-master-node-id> # Enter the value of HOST_ID from the .env file as xray-master-node-id and the value of JF_THIRD_PARTY_BIND_IP value from the .env file as the IP.
Customize any additional product configuration (optional) including, Java Opts and filestore.
Copy the
rabbitmq.conf
andsetRabbitCluster.sh
files to the folderapp/third-party/rabbitmq
.Ensure both are owned by 999:999 (rabbitmq uid/gid)
Edit
rabbitmq.conf
and enter the following information. If you want to setup a RabbitMQ HA cluster, enter the information in all the slave nodes.cluster_formation.peer_discovery_backend = rabbit_peer_discovery_classic_config cluster_formation.classic_config.nodes.1 = rabbit@<xray-master-node-id># Enter the value of HOST_ID from the .env file as xray-master-node-id.
Start Xray and PostgreSQL using docker-compose commands.
## Start RabbitMQ before starting other services docker-compose -p xray-rabbitmq -f docker-compose-rabbitmq.yaml up -d ## From Xray 3.8.x, Start PostgreSQL before starting the other services. docker-compose -p xray-postgres -f docker-compose-postgres.yaml up -d docker-compose -p xray up -d ## Check whether service is up docker-compose -p xray psdocker-compose -p distribution logs docker-compose -p distribution ps docker-compose -p distribution up -d docker-compose -p distribution down
Access Artifactory from your browser at:
http://SERVER_HOSTNAME/ui/
.For example, on your local machine:
http://localhost/ui/
.Check the Xray log.
docker-compose -p xray logs
Configure log rotation of the console log
The
console.log
file can grow quickly since all services write to it. For more information, see configure the log rotation.