Installation from binary¶
Download¶
Artifactory Cleanup binaries are available on releases page.
Choose the archive matching the destination platform:
artifactory-cleanup_1.7.0_darwin_amd64.tar.gz
artifactory-cleanup_1.7.0_darwin_arm64.tar.gz
artifactory-cleanup_1.7.0_freebsd_386.tar.gz
artifactory-cleanup_1.7.0_freebsd_amd64.tar.gz
artifactory-cleanup_1.7.0_linux_386.tar.gz
artifactory-cleanup_1.7.0_linux_amd64.tar.gz
artifactory-cleanup_1.7.0_linux_arm64.tar.gz
artifactory-cleanup_1.7.0_linux_armv5.tar.gz
artifactory-cleanup_1.7.0_linux_armv6.tar.gz
artifactory-cleanup_1.7.0_linux_armv7.tar.gz
artifactory-cleanup_1.7.0_linux_ppc64le.tar.gz
artifactory-cleanup_1.7.0_linux_riscv64.tar.gz
artifactory-cleanup_1.7.0_linux_s390x.tar.gz
artifactory-cleanup_1.7.0_windows_386.zip
artifactory-cleanup_1.7.0_windows_amd64.zip
artifactory-cleanup_1.7.0_windows_arm64.zip
And extract Artifactory Cleanup:
wget -qO- https://github.com/crazy-max/artifactory-cleanup/releases/download/v1.7.0/artifactory-cleanup_1.7.0_linux_amd64.tar.gz | tar -zxvf - artifactory-cleanup
After getting the binary, it can be tested with ./artifactory-cleanup --help
command and moved
to a permanent location.
Server configuration¶
Steps below are the recommended server configuration.
Prepare environment¶
Create user to run Artifactory Cleanup (ex. artifactory-cleanup
)
groupadd artifactory-cleanup
useradd -s /bin/false -d /bin/null -g artifactory-cleanup artifactory-cleanup
Create required directory structure¶
mkdir -p /var/lib/artifactory-cleanup
chown artifactory-cleanup:artifactory-cleanup /var/lib/artifactory-cleanup/
chmod -R 750 /var/lib/artifactory-cleanup/
mkdir /etc/artifactory-cleanup
chown artifactory-cleanup:artifactory-cleanup /etc/artifactory-cleanup
chmod 770 /etc/artifactory-cleanup
Configuration¶
Create your first configuration file in /etc/artifactory-cleanup/artifactory-cleanup.yml
and type:
chown artifactory-cleanup:artifactory-cleanup /etc/artifactory-cleanup/artifactory-cleanup.yml
chmod 644 /etc/artifactory-cleanup/artifactory-cleanup.yml
Copy binary to global location¶
cp artifactory-cleanup /usr/local/bin/artifactory-cleanup
Running Artifactory Cleanup¶
After the above steps, two options to run Artifactory Cleanup:
1. Creating a service file (recommended)¶
See how to create Linux service to start Artifactory Cleanup automatically.
2. Running from terminal¶
/usr/local/bin/artifactory-cleanup \
--config /etc/artifactory-cleanup/artifactory-cleanup.yml \
--dry-run
Updating to a new version¶
You can update to a new version of Artifactory Cleanup by stopping it, replacing the binary
at /usr/local/bin/artifactory-cleanup
and restarting the instance.
If you have carried out the installation steps as described above, the binary should have the generic
name artifactory-cleanup
. Do not change this, i.e. to include the version number.
Created: 2020-09-24 14:21:34