Skip to content

Commit

Permalink
feat: add dragonfly-stack charts (#291)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Jun 25, 2024
1 parent 33bcd6f commit 867657e
Show file tree
Hide file tree
Showing 10 changed files with 2,307 additions and 7 deletions.
1 change: 1 addition & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
paths:
- charts/dragonfly-stack/Chart.yaml
- charts/dragonfly/Chart.yaml
- charts/nydus-snapshotter/Chart.yaml

Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Dragonfly Community Helm Charts

[![Dragonfly Stack Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/dragonfly-stack)](https://artifacthub.io/packages/helm/dragonfly/dragonfly-stack)
[![Dragonfly Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/dragonfly)](https://artifacthub.io/packages/helm/dragonfly/dragonfly)
[![Nydus Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/nydus-snapshotter)](https://artifacthub.io/packages/helm/dragonfly/nydus-snapshotter)
![Release Charts](https://github.com/dragonflyoss/helm-charts/workflows/Release%20Charts/badge.svg?branch=main)
Expand All @@ -20,9 +21,10 @@ Please refer to the [document][install] to install Dragonfly & Nydus on Kubernet

## Documentation

- [Install Dragonfly & Nydus on Kubernetes][install]
- [Install Dragonfly Stack on Kubernetes](./charts/dragonfly-stack/README.md)
- [Install Dragonfly on Kubernetes](./charts/dragonfly/README.md)
- [Install Nydus on Kubernetes](./charts/nydus-snapshotter/README.md)
- [Install Dragonfly & Nydus on Kubernetes][install]

## Community

Expand Down
23 changes: 23 additions & 0 deletions charts/dragonfly-stack/.helmignore
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/
52 changes: 52 additions & 0 deletions charts/dragonfly-stack/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
apiVersion: v2
name: dragonfly-stack
description: Collects Dragonfly component and Nydus component into a single chart to provide a complete solution for the Dragonfly stack.
icon: https://raw.githubusercontent.com/dragonflyoss/Dragonfly2/main/docs/images/logo/dragonfly.svg
type: application
version: 0.1.0
appVersion: 2.1.49
keywords:
- dragonfly-stack
- dragonfly
- nydus
- d7y
- P2P
- image

maintainers:
- name: gaius-qi
email: [email protected]
- name: imeoer
email: [email protected]

home: https://d7y.io/

sources:
- https://github.com/dragonflyoss/Dragonfly2
- https://github.com/dragonflyoss/client
- https://github.com/dragonflyoss/image-service
- https://github.com/containerd/nydus-snapshotter/

annotations:
artifacthub.io/changes: |
- Init commit for dragonfly-stack.
artifacthub.io/links: |
- name: Chart Source
url: https://github.com/dragonflyoss/helm-charts
- name: Source
url: https://github.com/dragonflyoss/Dragonfly2
- name: Source
url: https://github.com/dragonflyoss/client
- name: Source
url: https://github.com/containerd/nydus-snapshotter
dependencies:
- name: dragonfly
version: 1.1.67
repository: https://dragonflyoss.github.io/helm-charts/
condition: dragonfly.enable
- name: nydus-snapshotter
version: 0.0.9
repository: https://dragonflyoss.github.io/helm-charts/
condition: nydus-snapshotter.enable
569 changes: 569 additions & 0 deletions charts/dragonfly-stack/README.md

Large diffs are not rendered by default.

133 changes: 133 additions & 0 deletions charts/dragonfly-stack/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
# Dragonfly Stack Helm Chart

[![Artifact Hub](https://img.shields.io/endpoint?url=https://artifacthub.io/badge/repository/dragonfly)](https://artifacthub.io/packages/search?repo=dragonfly-stack)

Collects Dragonfly component and Nydus component into a single chart to provide a complete solution for the Dragonfly stack.

## TL;DR

```shell
helm repo add dragonfly-stack https://dragonflyoss.github.io/helm-charts/
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly-stask
```

## Introduction

Dragonfly is an open source intelligent P2P based image and file distribution system. Its goal is to tackle all distribution problems in cloud native scenarios. Currently Dragonfly focuses on being:

- Simple: well-defined user-facing API (HTTP), non-invasive to all container engines;
- Efficient: Seed peer support, P2P based file distribution to save enterprise bandwidth;
- Intelligent: host level speed limit, intelligent flow control due to host detection;
- Secure: block transmission encryption, HTTPS connection support.

Dragonfly is now hosted by the Cloud Native Computing Foundation (CNCF) as an Incubating Level Project. Originally it was born to solve all kinds of distribution at very large scales, such as application distribution, cache distribution, log distribution, image distribution, and so on.

## Prerequisites

- Kubernetes cluster 1.20+
- Helm v3.8.0+

## Installation Guide

When use Dragonfly in Kubernetes, a container runtime must be configured. These work can be done by init script in this charts.

For more detail about installation is available in [Kubernetes with Dragonfly](https://d7y.io/docs/getting-started/quick-start/kubernetes/)

We recommend read the details about [Kubernetes with Dragonfly](https://d7y.io/docs/getting-started/quick-start/kubernetes/) before install.

> **We did not recommend to using dragonfly with docker in Kubernetes** due to many reasons: 1. no fallback image pulling policy. 2. deprecated in Kubernetes.

## Installation

### Install with custom configuration

Create the `values.yaml` configuration file. It is recommended to use external redis and mysql instead of containers. This example uses external mysql and redis.

```yaml
dragonfly:
mysql:
enable: false

externalMysql:
migrate: true
host: mysql-host
username: dragonfly
password: dragonfly
database: manager
port: 3306

redis:
enable: false

externalRedis:
addrs:
- redis.example.com:6379
password: dragonfly
```

Install dragonfly-stack chart with release name `dragonfly`:

```shell
helm repo add dragonfly-stack https://dragonflyoss.github.io/helm-charts/
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly-stack -f values.yaml
```

### Install with an existing manager

Create the `values.yaml` configuration file. Need to configure the cluster id associated with scheduler and seed peer. This example is to deploy a cluster using the existing manager and redis.

```yaml
dragonfly:
scheduler:
config:
manager:
schedulerClusterID: 1

seedClient:
config:
seedPeer:
enable: true
type: super
clusterID: 1

manager:
enable: false

externalManager:
enable: true
host: "dragonfly-manager.dragonfly-system.svc.cluster.local"
restPort: 8080
grpcPort: 65003

redis:
enable: false

externalRedis:
addrs:
- redis.example.com:6379
password: dragonfly

mysql:
enable: false
```

Install dragonfly-stack chart with release name `dragonfly`:

```shell
helm repo add dragonfly-stack https://dragonflyoss.github.io/helm-charts/
helm install --create-namespace --namespace dragonfly-system dragonfly dragonfly/dragonfly-stack -f values.yaml
```

## Uninstall

Uninstall the `dragonfly` deployment:

```shell
helm delete dragonfly --namespace dragonfly-system
```

{{ template "chart.valuesSection" . }}

## Chart dependencies

{{ template "chart.requirementsTable" . }}
Loading

0 comments on commit 867657e

Please sign in to comment.