Skip to content

Commit

Permalink
feat(github): add helm charts test cicd (#32)
Browse files Browse the repository at this point in the history
* feat: add helm charts test cicd

Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]>

* fix: add chat thmp

* fix: add chat thmp

* fix: add chat thmp

* fix: add chat thmp

* fix: add chat thmp

* fix: add chat thmp

* fix: add chat thmp

* fix: add chat thmp

---------

Signed-off-by: Xinwei Xiong(cubxxw) <[email protected]>
  • Loading branch information
cubxxw authored Dec 4, 2023
1 parent 300fc69 commit 3d043a4
Show file tree
Hide file tree
Showing 9 changed files with 310 additions and 18 deletions.
28 changes: 18 additions & 10 deletions .github/workflows/helm-charts-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,8 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- uses: engineerd/[email protected]
- name: Create k8s Kind Cluster
uses: helm/[email protected]
- name: Testing
run: |
sudo kubectl cluster-info
Expand All @@ -23,32 +24,40 @@ jobs:
continue-on-error: true

- name: Install Helm
uses: azure/setup-helm@v3
uses: azure/setup-helm@5119fcb9089d432beecbf79bb2c7915207344b78 # v3.5
with:
version: '3.x'
id: install
version: v3.10.1 # Also update in lint-and-test.yaml

- name: Create Kubernetes Cluster
run: |
sudo kind create cluster
sudo kubectl cluster-info
sudo kubectl create namespace openim
- name: Install basic components
run: |
# ingress
helm install ingress-nginx ./infra/ingress-nginx/ -f infra/ingress-nginx/config.yaml -n kube-system
# nfs
helm install nfs-subdir-external-provisioner ./infra/nfs-subdir-external-provisioner/ -f infra/nfs-subdir-external-provisioner/config.yaml -n kube-system
- name: Install OpenIM Middleware
run: |
# Install MySQL
helm install im-mysql infra/mysql -f infra/mysql-config.yaml -n openim
helm install my-release oci://registry-1.docker.io/bitnamicharts/mysql -f infra/mysql-config.yaml -n openim --create-namespace
# Install Kafka
helm install im-kafka infra/kafka -f infra/kafka-config.yaml -n openim
helm install im-kafka infra/kafka -f infra/kafka-config.yaml -n openim --create-namespace
# Install MinIO
helm install im-minio infra/minio -f infra/minio-config.yaml -n openim
helm install im-minio infra/minio -f infra/minio-config.yaml -n openim --create-namespace
# Install MongoDB
helm install im-mongodb infra/mongodb -f infra/mongodb-config.yaml -n openim
helm install im-mongodb infra/mongodb -f infra/mongodb-config.yaml -n openim --create-namespace
# Install Redis
helm install im-redis infra/redis -f infra/redis-config.yaml -n openim
helm install im-redis infra/redis -f infra/redis-config.yaml -n openim --create-namespace
- name: Install OpenIM Services
run: |
Expand All @@ -66,7 +75,6 @@ jobs:
- name: Test Installation
run: |
# 这里添加一些基本的测试命令,例如检查 Pod 状态
sudo kubectl get pods -n openim
- name: Cleanup
Expand Down
6 changes: 4 additions & 2 deletions charts/openim-admin/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: openim-admin
description: A Helm chart for Kubernetes
description: Openim-admin is the administrative backend for openim

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,14 +15,16 @@ 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.1.0
version: 0.1.1

# 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: "1.16.0"

home: https://github.com/openimsdk/helm-charts

icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg

maintainers:
Expand Down
71 changes: 71 additions & 0 deletions charts/openim-admin/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# OpenIM-Admin Helm Chart

## Introduction

This chart bootstraps an OpenIM-Admin deployment on a Kubernetes cluster using the Helm package manager.

OpenIM-Admin is the administrative backend for OpenIM, providing an interface for managing the OpenIM infrastructure.

## Prerequisites

- Kubernetes 1.12+
- Helm 3.0+

## Installing the Chart

To install the chart with the release name `my-release`:

```bash
helm repo add openim https://github.com/openimsdk/helm-charts
helm install my-release openim/openim-admin
```

{{ template "chart.sourcesList" . }}

This command deploys OpenIM-Admin on the Kubernetes cluster in the default configuration. The [Parameters](https://chat.openai.com/c/892a8ceb-729a-496a-829b-98d2d1b74cc3#parameters) section lists the parameters that can be configured during installation.

## Uninstalling the Chart

To uninstall/delete the `my-release` deployment:

```bash
helm delete my-release
```

This command removes all the Kubernetes components associated with the chart and deletes the release.

## Parameters

The following table lists the configurable parameters of the OpenIM-Admin chart and their default values.

| Parameter | Description | Default |
| ------------------ | ----------------- | -------------- |
| `image.repository` | Image repository | `nil` |
| `image.tag` | Image tag | `nil` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| ... | ... | ... |

## Configuration

Refer to [values.yaml](https://github.com/openimsdk/helm-charts/blob/main/charts/openim-admin/values.yaml) for the full run-down on defaults. These are YAML files that supply values to your templates.

## Upgrading

To upgrade the chart:

```bash
helm upgrade my-release openim/openim-admin
```

## Additional Information

+ Learn more about OpenIM: [OpenIM GitHub](https://github.com/openimsdk)
+ Source code for OpenIM Server: [OpenIM Server GitHub](https://github.com/openimsdk/open-im-server)

## Maintainers

+ [OpenIM](https://github.com/openimsdk)

## License

This project is licensed under the [Apache License 2.0](https://github.com/openimsdk/open-im-server/blob/main/LICENSE).
6 changes: 4 additions & 2 deletions charts/openim-chat/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: admin-api
description: A Helm chart for Kubernetes
description: OpenIM chat is an open source openim's business server

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,14 +15,16 @@ 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.1.0
version: 0.1.1

# 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: "1.16.0"

home: https://github.com/openimsdk/helm-charts

icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg

maintainers:
Expand Down
69 changes: 69 additions & 0 deletions charts/openim-chat/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Admin-API Helm Chart

## Introduction

This chart bootstraps an Admin-API deployment on a Kubernetes cluster using the Helm package manager.

Admin-API is the business server component of OpenIM Chat, an open source instant messaging platform.

## Prerequisites

- Kubernetes 1.12+
- Helm 3.0+

## Installing the Chart

To install the chart with the release name `my-admin-api`:

```bash
helm repo add openim https://github.com/openimsdk/helm-charts
helm install my-admin-api openim/admin-api
```

This command deploys Admin-API on the Kubernetes cluster in the default configuration. The [Parameters](https://chat.openai.com/c/892a8ceb-729a-496a-829b-98d2d1b74cc3#parameters) section lists the parameters that can be configured during installation.

## Uninstalling the Chart

To uninstall/delete the `my-admin-api` deployment:

```bash
helm delete my-admin-api
```

This command removes all the Kubernetes components associated with the chart and deletes the release.

## Parameters

The following table lists the configurable parameters of the Admin-API chart and their default values.

| Parameter | Description | Default |
| ------------------ | ----------------- | -------------- |
| `image.repository` | Image repository | `nil` |
| `image.tag` | Image tag | `nil` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| ... | ... | ... |

## Configuration

Refer to [values.yaml](https://github.com/openimsdk/helm-charts/blob/main/charts/admin-api/values.yaml) for the full run-down on defaults. These are YAML files that supply values to your templates.

## Upgrading

To upgrade the chart:

```bash
helm upgrade my-admin-api openim/admin-api
```

## Additional Information

+ Learn more about OpenIM Chat: [OpenIM Chat GitHub](https://github.com/openimsdk/chat)
+ OpenIM Helm Charts: [OpenIM Helm Charts GitHub](https://github.com/openimsdk/helm-charts)

## Maintainers

+ [OpenIM](https://github.com/openimsdk)

## License

This project is licensed under the [Apache License 2.0](https://github.com/openimsdk/chat/blob/main/LICENSE).
6 changes: 4 additions & 2 deletions charts/openim-server/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: openim-api
description: A Helm chart for Kubernetes
description: OpenIM is an open source instant messaging server based on the open source framework of the open source instant messaging SDK.

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,14 +15,16 @@ 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.1.0
version: 0.1.1

# 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: "1.16.0"

home: https://github.com/openimsdk/helm-charts

icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg

maintainers:
Expand Down
67 changes: 67 additions & 0 deletions charts/openim-server/README.md.gotmpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# OpenIM-API Helm Chart

## Introduction

This chart facilitates the deployment of OpenIM-API, an open source instant messaging server, on a Kubernetes cluster. OpenIM-API is built upon the open source framework of the OpenIM instant messaging SDK.

## Prerequisites

- Kubernetes 1.12+
- Helm 3.0+

## Installing the Chart

To install the chart with the release name `my-openim-api`:

```bash
helm repo add openim https://github.com/openimsdk/helm-charts
helm install my-openim-api openim/openim-api
```

This command deploys OpenIM-API on the Kubernetes cluster using the default configuration. The [Parameters](https://chat.openai.com/c/892a8ceb-729a-496a-829b-98d2d1b74cc3#parameters) section lists the parameters that can be configured during installation.

## Uninstalling the Chart

To uninstall/delete the `my-openim-api` deployment:

```bash
helm delete my-openim-api
```

This command removes all the Kubernetes components associated with the chart and deletes the release.

## Parameters

The following table lists the configurable parameters of the OpenIM-API chart and their default values.

| Parameter | Description | Default |
| ------------------ | ----------------- | -------------- |
| `image.repository` | Image repository | `nil` |
| `image.tag` | Image tag | `nil` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| ... | ... | ... |

## Configuration

Refer to the [values.yaml](https://github.com/openimsdk/helm-charts/blob/main/charts/openim-api/values.yaml) for a comprehensive rundown on defaults. These YAML files supply values to your templates.

## Upgrading

To upgrade the chart:

```bash
helm upgrade my-openim-api openim/openim-api
```

## Additional Information

+ Explore more about OpenIM: [OpenIM GitHub](https://github.com/openimsdk/open-im-server)
+ Helm Charts repository: [OpenIM Helm Charts](https://github.com/openimsdk/helm-charts)

## Maintainers

+ [OpenIM](https://github.com/openimsdk)

## License

This project is licensed under the [Apache License 2.0](https://github.com/openimsdk/open-im-server/blob/main/LICENSE).
6 changes: 4 additions & 2 deletions charts/openim-web/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: openim-web
description: A Helm chart for Kubernetes
description: Openim-web is the front-end web chat of openim

# A chart can be either an 'application' or a 'library' chart.
#
Expand All @@ -15,14 +15,16 @@ 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.1.0
version: 0.1.1

# 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: "1.16.0"

home: https://github.com/openimsdk/helm-charts

icon: https://raw.githubusercontent.com/openimsdk/open-im-server/main/assets/openim-logo-gradient.svg

maintainers:
Expand Down
Loading

0 comments on commit 3d043a4

Please sign in to comment.