-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
871 additions
and
224 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 |
---|---|---|
@@ -0,0 +1,129 @@ | ||
--- | ||
title: Configuration | ||
--- | ||
|
||
``` yaml | ||
log: | ||
level: debug | ||
# proxy for another registry(eg: docker.io) log level | ||
proxyLevel: info | ||
|
||
database: | ||
# The database type to use. Supported types are: sqlite3, mysql, postgresql | ||
type: sqlite3 | ||
sqlite3: | ||
path: sigma.db | ||
mysql: | ||
host: localhost | ||
port: 3306 | ||
user: sigma | ||
password: sigma | ||
dbname: sigma | ||
postgresql: | ||
host: localhost | ||
port: 5432 | ||
user: sigma | ||
password: sigma | ||
dbname: sigma | ||
sslmode: disable | ||
|
||
redis: | ||
# redis type available: none, external | ||
# none: means never use redis | ||
# external: means use the specific redis instance | ||
type: none | ||
url: redis://:sigma@localhost:6379/0 | ||
|
||
cache: | ||
# the cache type available is: redis, inmemory, database | ||
type: redis | ||
inmemory: | ||
size: 10240 | ||
redis: | ||
ttl: 72h | ||
database: | ||
size: 10240 | ||
threshold: 0.2 | ||
|
||
workqueue: | ||
# the workqueue type available: redis, kafka, database | ||
type: redis | ||
redis: | ||
concurrency: 10 | ||
kafka: {} | ||
database: {} | ||
|
||
locker: | ||
# the locker type available: redis, database | ||
type: database | ||
database: {} | ||
redis: {} | ||
|
||
namespace: | ||
# push image to registry, if namespace not exist, it will be created automatically | ||
autoCreate: false | ||
# the automatic created namespace visibility, available: public, private | ||
visibility: public | ||
|
||
http: | ||
# endpoint can be a domain or domain with port, eg: http://sigma.test.io, https://sigma.test.io:30080, http://127.0.0.1:3000 | ||
# this endpoint will be used to generate the token service url in auth middleware, | ||
# you can leave it blank and it will use http://127.0.0.1:3000 as internal domain by default, | ||
# because the front page need show this endpoint. | ||
endpoint: | ||
# in some cases, daemon may pull image and scan it, but we don't want to pull image from public registry domain, | ||
# so use this internal domain to pull image from registry. | ||
# you can leave it blank and it will use http://127.0.0.1:3000 as internal domain by default. | ||
# in k8s cluster, it will be set to the distribution service which is used to pull image from registry, eg: http://registry.default.svc.cluster.local:3000 | ||
# in docker-compose, it will be set to the registry service which is used to pull image from registry, eg: http://registry:3000 | ||
# eg: http://sigma.test.io, http://sigma.test.io:3000, https://sigma.test.io:30080 | ||
internalEndpoint: | ||
tls: | ||
enabled: false | ||
certificate: ./conf/sigma.test.io.crt | ||
key: ./conf/sigma.test.io.key | ||
storage: | ||
rootdirectory: ./storage | ||
type: filesystem | ||
filesystem: | ||
path: /var/lib/sigma/oci/ | ||
s3: | ||
ak: sigma | ||
sk: sigma-sigma | ||
endpoint: http://127.0.0.1:9000 | ||
region: cn-north-1 | ||
bucket: sigma | ||
forcePathStyle: true | ||
# Notice: the tag never update after the first pulled from remote registry, unless you delete the image and pull again. | ||
proxy: | ||
enabled: false | ||
endpoint: https://registry-1.docker.io | ||
tlsVerify: true | ||
username: "" | ||
password: "" | ||
daemon: | ||
gc: | ||
# if blob not associate with artifact | ||
retention: 72h | ||
# At 02:00 on Saturday | ||
cron: 0 2 * * 6 | ||
auth: | ||
internalUser: | ||
username: internal-sigma | ||
password: internal-sigma | ||
admin: | ||
username: sigma | ||
password: sigma | ||
token: | ||
realm: "" | ||
service: "" | ||
jwt: | ||
ttl: 1h | ||
refreshTtl: 24h | ||
privateKey: "LS0tLS1CRUdJTiBSU0EgUFJJVkFURSB" | ||
oauth2: | ||
github: | ||
clientId: "e5f9fa9e372dfac66aed" | ||
clientSecret: "49ab83f4d0665f8579516f7a3f2f753a6a57189b" | ||
|
||
``` |
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,41 @@ | ||
--- | ||
title: Docker | ||
description: Push image to sigma | ||
--- | ||
|
||
# Push image to sigma | ||
|
||
### Push single image to sigma | ||
|
||
``` sh | ||
docker pull redis:7 | ||
docker tag redis:7 127.0.0.1:3000/library/redis:7 | ||
docker push 127.0.0.1:3000/library/redis:7 | ||
``` | ||
|
||
### Push multiarch image to sigma | ||
|
||
Create 'buildkit.toml' with content: | ||
|
||
``` toml | ||
[registry."10.3.201.221:3000"] # replace it with your host ip | ||
http = true | ||
``` | ||
|
||
Create buildx instance: | ||
|
||
``` sh | ||
docker buildx create --use --config ./buildkit.toml | ||
``` | ||
|
||
Create Dockerfile with content: | ||
|
||
``` dockerfile | ||
FROM alpine:3.18 | ||
``` | ||
|
||
Push multiarch image to sigma: | ||
|
||
``` sh | ||
docker buildx build --platform linux/amd64,linux/arm64 --tag 10.3.201.221:3000/library/alpine:3.18.0 --file alpine.Dockerfile --push . | ||
``` |
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,39 @@ | ||
--- | ||
title: Helm | ||
description: Push helm chart to sigma | ||
--- | ||
|
||
# Push helm chart to sigma | ||
|
||
### Generate a sample helm chart | ||
|
||
``` sh | ||
helm create demo | ||
``` | ||
|
||
This command will create 'demo' directory, and a sample helm chart in it. | ||
|
||
``` sh | ||
helm package demo | ||
``` | ||
|
||
Run this command outside the 'demo' directory, and you will get a file which named 'demo-0.1.0.tgz'. | ||
|
||
### Push the helm chart to sigma | ||
|
||
Note: before helm version v3.13.0, it doesn't support push helm chart to OCI registry over HTTP, you must use HTTPS. | ||
You can see the v3.13.0 [release note](https://github.com/helm/helm/releases/tag/v3.13.0). | ||
|
||
Before helm version v3.13.0: | ||
|
||
``` sh | ||
helm registry login --insecure -u sigma -p sigma 127.0.0.1:3000 | ||
helm push demo-0.1.0.tgz oci://127.0.0.1:3000/library/demo --insecure-skip-tls-verify | ||
``` | ||
|
||
After helm version v3.13.0: | ||
|
||
``` sh | ||
helm registry login -u sigma -p sigma 127.0.0.1:3000 | ||
helm push demo-0.1.0.tgz oci://127.0.0.1:3000/library/demo --plain-http | ||
``` |
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
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
Oops, something went wrong.