Builder Wants 600 Per Drop
Welcome to this comprehensive guide on setting up a self-hosted artifact repository, specifically for the popular open-source tool `Builder`. This tutorial is designed with experienced sysadmins and DevOps engineers in.
# Builder Wants 600 Per Drop: Setting Up a Self-Hosted Artifact Repository for Your Homelab
Welcome to this comprehensive guide on setting up a self-hosted artifact repository, specifically for the popular open-source tool Builder
. This tutorial is designed with experienced sysadmins and DevOps engineers in mind, focusing on practical implementation. If you’re looking to streamline your infrastructure automation workflow within your homelab, then you’ve come to the right place!
Prerequisites
To follow this guide, ensure you have the following software installed:
- Docker (Version 20.10.5) - Install Docker
- Docker Compose (Version 1.27.4) - Install Docker Compose
Solution Overview
We’ll be setting up a self-hosted Artifactory
instance using JFrog, which is an open-source artifact repository manager. We’ll use Docker Compose
to manage the containers and configure the settings accordingly.
Steps
1. Pull the Docker Image
Start by pulling the latest version of the artifactory
docker image:
1
docker pull jfrog/artifactory-oss
2. Create a Configuration File (docker-compose.yml)
Create a new file named docker-compose.yml
with the following content:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
version: '3'
services:
artifactory:
image: jfrog/artifactory-oss:latest
container_name: artifactory
environment:
ARTIFACTORY_DBTYPE: postgres
ARTIFACTORY_DATABASE_URL: postgres://artifactory:artifactory@db:5432/artifactory
ARTIFACTORY_CONTEXT_PATH: /artifactory
ports:
- "8081:8081"
- "8093:8093"
- "8094:8094"
- "8095:8095"
- "8096:8096"
volumes:
- ./artifactory-data:/data
networks:
- artifactory-net
postgres:
image: postgres:13.2-alpine
container_name: db
environment:
POSTGRES_USER: artifactory
POSTGRES_PASSWORD: artifactory
volumes:
- ./postgres-data:/var/lib/postgresql/data
networks:
- artifactory-net
networks:
artifactory-net:
3. Initialize the Artifactory Configuration
After creating the docker-compose.yml
, navigate to the directory containing the file and initialize the Artifactory configuration with these commands:
1
2
docker-compose run --rm artifactory init
docker-compose run --rm artifactory config --webui
4. Start the Services
Start the services with this command:
1
docker-compose up -d
Troubleshooting
In case you encounter any issues, consult the official JFrog Artifactory documentation or check the Artifactory Troubleshooting Guide.
Conclusion
Now that you’ve successfully set up your self-hosted artifact repository, you can enjoy faster build times and better organization within your homelab infrastructure. Don’t forget to optimize performance by adjusting settings according to your use case and ensure proper security measures are in place!
Happy automating! 🚀🔧