-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Adphi <philippe.adrien.nousse@gmail.com>
- Loading branch information
Showing
27 changed files
with
1,136 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,3 +4,4 @@ tmp | |
bin | ||
**/node_modules | ||
**/build | ||
docs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
<p align="center"> | ||
<img alt="LK Artifact Registry" src="ui/src/img/lkar-no-background.png" width='720px'/> | ||
</p> | ||
|
||
|
||
# LK Artifact Registry | ||
|
||
[![PkgGoDev](https://pkg.go.dev/badge/go.linka.cloud/artifact-registry)](https://pkg.go.dev/go.linka.cloud/artifact-registry) | ||
[![Go Report Card](https://goreportcard.com/badge/go.linka.cloud/artifact-registry)](https://goreportcard.com/report/go.linka.cloud/artifact-registry) | ||
|
||
*Distribute your artifacts to your end users without any additional administration or maintenance costs.* | ||
|
||
Artifact Registry is a 100% stateless enterprise ready artifact registry. | ||
|
||
It uses any compatible oci-registry as backend, for both storage, authentication and authorization, making it easy to deploy and maintain. | ||
|
||
It can host as many repositories as you want, all being backed by a single oci-repository (docker image). | ||
|
||
It has two main parts: | ||
- lkard: the registry server which expose a small web-ui | ||
- lkar: the command line client | ||
|
||
## Packages formats | ||
|
||
The following package formats are supported: | ||
|
||
- deb | ||
- rpm | ||
- apk | ||
- helm | ||
- ... (more to come) | ||
|
||
## Quick start (evaluation only) | ||
|
||
Let's start by deploying a docker registry (without authentication), the artifact registry and an alpine based client to test it: | ||
|
||
```yaml | ||
version: '3.7' | ||
services: | ||
registry: | ||
image: registry:2 | ||
artifact-registry: | ||
container_name: artifact-registry | ||
image: linkacloud/artifact-registry:dev | ||
environment: | ||
ARTIFACT_REGISTRY_AES_KEY: "noop" | ||
command: | ||
- --backend=registry:5000 | ||
- --no-https | ||
ports: | ||
- "9887:9887" | ||
artifact-registry-client: | ||
container_name: artifact-registry-client | ||
image: linkacloud/artifact-registry:dev | ||
init: true | ||
entrypoint: ["/bin/sh", "-c"] | ||
command: | ||
- sleep infinity | ||
``` | ||
|
||
```bash | ||
curl https://raw.githubusercontent.com/linka-cloud/artifact-registry/main/docker-compose.yaml | docker compose -f - up -d | ||
``` | ||
|
||
Now, let's get some packages: | ||
|
||
```bash | ||
docker exec -it artifact-registry-client sh -c "apk fetch --no-cache -o /tmp -R curl jq" | ||
``` | ||
|
||
Upload them to the registry: | ||
|
||
```bash | ||
docker exec -it artifact-registry-client sh -c "find /tmp -name '*.apk' -exec lkar apk push --plain-http artifact-registry:9887/test v3.18 main {} \;" | ||
# remove any existing apk repository and cache | ||
docker exec -it artifact-registry-client sh -c "rm -rf /tmp/* && rm -rf /var/cache/apk/* && rm -rf /etc/apk/repositories" | ||
``` | ||
|
||
Setup artifact-registry as repository: | ||
|
||
```bash | ||
docker exec -it artifact-registry-client sh -c "lkar apk setup --plain-http artifact-registry:9887/test v3.18 main" | ||
``` | ||
|
||
And finally, install the packages: | ||
|
||
```bash | ||
docker exec -it artifact-registry-client sh -c "apk add --no-cache curl jq" | ||
``` | ||
|
||
|
||
Clean up: | ||
|
||
```bash | ||
curl https://raw.githubusercontent.com/linka-cloud/artifact-registry/main/docker-compose.yaml | docker compose -f - down --volumes --remove-orphans | ||
``` | ||
|
||
## Getting started | ||
|
||
### Deploying the registry | ||
|
||
Deploy the registry using helm: | ||
|
||
```bash | ||
helm repo add linka-cloud https://helm.linka.cloud | ||
|
||
REGISTRY=registry.example.org | ||
|
||
helm upgrade \ | ||
--install \ | ||
--create-namespace \ | ||
--namespace artifact-registry \ | ||
--set config.backend.host=$REGISTRY \ | ||
artifact-registry \ | ||
linka-cloud/artifact-registry | ||
``` | ||
|
||
See the [values.yaml](./helm/artifact-registry/values.yaml) for the available configuration options. | ||
|
||
|
||
<!--- ### Using the registry ---> | ||
|
||
<!--- TODO(adphi): add instructions for installing the client ---> | ||
|
||
|
||
<!--- TODO(adphi): add lkard and lkar usage ---> | ||
|
||
|
||
## Acknowledgements | ||
|
||
This package formats implementations are based on the amazing work done of the [Gitea](https://gitea.io) team. | ||
|
||
Many thanks to them for their work, especially to [@KN4CK3R](https://github.com/KN4CK3R). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//go:build docs | ||
|
||
// Copyright 2023 Linka Cloud All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/spf13/cobra" | ||
"github.com/spf13/cobra/doc" | ||
) | ||
|
||
var docsCmd = &cobra.Command{ | ||
Use: "docs", | ||
Short: "Generate documentation", | ||
Hidden: true, | ||
Args: cobra.ExactArgs(1), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
if err := os.MkdirAll(args[0], 0755); err != nil { | ||
return err | ||
} | ||
cmd.Root().DisableAutoGenTag = true | ||
if err := doc.GenMarkdownTree(cmd.Root(), args[0]); err != nil { | ||
return err | ||
} | ||
return nil | ||
}, | ||
} | ||
|
||
func init() { | ||
rootCmd.AddCommand(docsCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
//go:build docs | ||
|
||
// Copyright 2023 Linka Cloud All rights reserved. | ||
// | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package main | ||
|
||
import ( | ||
"os" | ||
|
||
"github.com/spf13/cobra" | ||
"github.com/spf13/cobra/doc" | ||
) | ||
|
||
var docsCmd = &cobra.Command{ | ||
Use: "docs", | ||
Short: "Generate documentation", | ||
Hidden: true, | ||
Args: cobra.ExactArgs(1), | ||
RunE: func(cmd *cobra.Command, args []string) error { | ||
if err := os.MkdirAll(args[0], 0755); err != nil { | ||
return err | ||
} | ||
cmd.Root().DisableAutoGenTag = true | ||
if err := doc.GenMarkdownTree(cmd.Root(), args[0]); err != nil { | ||
return err | ||
} | ||
return nil | ||
}, | ||
} | ||
|
||
func init() { | ||
cmd.AddCommand(docsCmd) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
version: '3.7' | ||
services: | ||
registry: | ||
image: registry:2 | ||
artifact-registry: | ||
container_name: artifact-registry | ||
image: linkacloud/artifact-registry:dev | ||
environment: | ||
ARTIFACT_REGISTRY_AES_KEY: "noop" | ||
command: | ||
- --backend=registry:5000 | ||
- --no-https | ||
ports: | ||
- "9887:9887" | ||
artifact-registry-client: | ||
container_name: artifact-registry-client | ||
image: linkacloud/artifact-registry:dev | ||
init: true | ||
entrypoint: ["/bin/sh", "-c"] | ||
command: | ||
- sleep infinity |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
dependencies: | ||
- name: docker-registry | ||
repository: https://helm.twun.io | ||
version: 2.2.2 | ||
digest: sha256:be42beba50635bbb5361c016785d80e382c14604f2690afbebf8d297df745b7b | ||
generated: "2023-10-17T16:04:51.57078+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: v2 | ||
name: artifact-registry | ||
description: A Helm chart for LK Artifact Registry | ||
home: https://github.com/linka-cloud/artifact-registry | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.0.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "v0.0.0" | ||
|
||
dependencies: | ||
- name: docker-registry | ||
version: 2.2.2 | ||
repository: https://helm.twun.io | ||
alias: registry | ||
condition: registry.enabled |
Oops, something went wrong.