https://github.com/030/yaam
Yet Another Artifact Manager (YAAM) is an artifact repository that is capable of storing and preserving artifacts.
https://github.com/030/yaam
artifact-repository artifactory artifactory-oss cache golang gradle maven nexus3 npm verdaccio
Last synced: 7 months ago
JSON representation
Yet Another Artifact Manager (YAAM) is an artifact repository that is capable of storing and preserving artifacts.
- Host: GitHub
- URL: https://github.com/030/yaam
- Owner: 030
- License: mit
- Created: 2022-05-27T13:29:11.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-06-22T14:22:52.000Z (over 1 year ago)
- Last Synced: 2025-03-16T16:40:41.589Z (7 months ago)
- Topics: artifact-repository, artifactory, artifactory-oss, cache, golang, gradle, maven, nexus3, npm, verdaccio
- Language: Go
- Homepage:
- Size: 245 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: docs/SECURITY.md
Awesome Lists containing this project
README
# YAAM
[](https://github.com/030/yaam/actions?query=workflow%3AGo)
[![GoDoc Widget]][godoc]

[](https://goreportcard.com/report/github.com/030/yaam)
[](https://stackoverflow.com/tags/yaam)
[](https://devops.stackexchange.com/tags/yaam)
[](https://serverfault.com/tags/yaam)
[](https://hub.docker.com/r/utrecht/yaam)













[](https://github.com/030/yaam/releases/latest)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://sonarcloud.io/dashboard?id=030_yaam)
[](https://codecov.io/gh/030/yaam)
[](https://golangci.com/r/github.com/030/yaam)
[](https://chocolatey.org/packages/yaam)
[](https://snapcraft.io/yaam)
[](https://codebeat.co/projects/github-com-030-yaam-main)
[](https://conventionalcommits.org)
[](https://github.com/semantic-release/semantic-release)[godoc]: https://godoc.org/github.com/030/yaam
[godoc widget]: https://godoc.org/github.com/030/yaam?status.svgAlthough there are many artifact managers, like Artifactory, Nexus3 and
Verdaccio, they are either monoliths, consume a lot of resources
(memory and CPU), lack Infrastructure as Code (IaC) or do not support all kind
of artifact types. Yet Another Artifact Manager (YAAM):- is an artifact manager like Artifactory, Nexus3 or Verdaccio.
- enforces IaC.
- has no UI.
- does not have a database.
- scales horizontally.
- supports downloading and publication of Apt, Generic, Maven and NPM
artefacts, preserves NPM and Maven packages from public repositories and
unifies Maven repositories.## Quickstart
Create a directory and change the permissions to ensure that YAAM can store
artifacts:```bash
mkdir ~/.yaam/repositories
sudo chown 9999 -R ~/.yaam/repositories
```Configure YAAM by creating a `~/.yaam/config.yml` with the following content:
```bash
---
caches:
apt:
3rdparty-ubuntu-nl-archive:
url: http://nl.archive.ubuntu.com/ubuntu/
maven:
3rdparty-maven:
url: https://repo.maven.apache.org/maven2/
3rdparty-maven-gradle-plugins:
url: https://plugins.gradle.org/m2/
3rdparty-maven-spring:
url: https://repo.spring.io/release/
other-nexus-repo-releases:
url: https://some-nexus/repository/some-repo/
user: some-user
pass: some-pass
npm:
3rdparty-npm:
url: https://registry.npmjs.org/
groups:
maven:
hello:
- maven/releases
- maven/3rdparty-maven
- maven/3rdparty-maven-gradle-plugins
- maven/3rdparty-maven-spring
publications:
generic:
- something
maven:
- releases
npm:
- 3rdparty-npm
```Start YAAM:
```bash
docker run \
-e YAAM_LOG_LEVEL=trace \
-e YAAM_USER=hello \
-e YAAM_PASS=world \
--rm \
--name=yaam \
-it \
-v /home/${USER}/.yaam:/opt/yaam/.yaam \
-p 25213:25213 utrecht/yaam:v0.5.4
```Once YAAM has been started, configure a project to ensure that artifacts will
be downloaded from this artifact manager.### Apt
sudo vim /etc/apt/auth.conf.d/hello.conf
```bash
machine http://localhost
login hello
password world
```sudo vim /etc/apt/sources.list
```bash
deb http://localhost:25213/apt/3rdparty-ubuntu-nl-archive/ focal main restricted
```Preserve the artifacts:
```bash
sudo apt-get update
```### Generic
Upload:
```bash
curl -X POST -u hello:world \
http://yaam.some-domain/generic/something/world4.iso \
--data-binary @/home/${USER}/Downloads/ubuntu-22.04.1-desktop-amd64.iso
```Troubleshooting:
```bash
413 Request Entity Too Large
```add:
```bash
data:
proxy-body-size: 5G
```and restart the controller pod.
Verify in the `/etc/nginx/nginx.conf` file that the `client_max_body_size` has
been increased to 5G.Download:
```bash
curl -u hello:world http://yaam.some-domain/generic/something/world6.iso \
-o /tmp/world6.iso
```### Gradle
Adjust the `build.gradle` and/or `settings.gradle`:
```bash
repositories {
maven {
allowInsecureProtocol true
url 'http://localhost:25213/maven/releases/'
authentication {
basic(BasicAuthentication)
}
credentials {
username "hello"
password "world"
}
}
maven {
allowInsecureProtocol true
url 'http://localhost:25213/maven/3rdparty-maven/'
authentication {
basic(BasicAuthentication)
}
credentials {
username "hello"
password "world"
}
}
maven {
allowInsecureProtocol true
url 'http://localhost:25213/maven/3rdparty-maven-gradle-plugins/'
authentication {
basic(BasicAuthentication)
}
credentials {
username "hello"
password "world"
}
}
}
```Publish:
```bash
publishing {
publications {
mavenJava(MavenPublication) {
versionMapping {
usage('java-api') {
fromResolutionOf('runtimeClasspath')
}
usage('java-runtime') {
fromResolutionResult()
}
}
}
}repositories {
maven {
allowInsecureProtocol true
url 'http://localhost:25213/maven/releases/'
authentication {
basic(BasicAuthentication)
}
credentials {
username "hello"
password "world"
}
}
}
}
```Preserve the artifacts:
```bash
./gradlew clean
```or publish them:
```bash
./gradlew publish
```### NPM
Create a `.npmrc` file in the directory of a particular NPM project:
```bash
registry=http://localhost:25213/npm/3rdparty-npm/
always-auth=true
_auth=aGVsbG86d29ybGQ=
cache=/tmp/some-yaam-repo/npm/cache20220914120431999
```Note: the `_auth` key should be populated with the output of:
`echo -n 'someuser:somepass' | openssl base64`.```bash
npm i -d
```## Run
Next to docker, one could also use a binary or K8s or OpenShift to run YAAM:
- [Binary.](docs/start/BINARY.md)
- [K8s/OpenShift.](docs/start/K8SOPENSHIFT.md)## Other
- [Background.](docs/other/BACKGROUND.md)
- [Maven unify.](docs/other/MAVEN.md)