Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
mguptahub committed Jun 13, 2024
1 parent 5299c7e commit 1923309
Show file tree
Hide file tree
Showing 35 changed files with 2,007 additions and 0 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/releaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: Chart Release

on:
push:
branches:
- master

env:
CR_CONFIGFILE: "${{ github.workspace }}/cr.yaml"
CR_TOOL_PATH: "${{ github.workspace }}/.cr-tool"
CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
TARGET_BRANCH: "${{ github.ref_name }}"

jobs:
setup:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure Git
run: |
git config user.name "$GITHUB_ACTOR"
git config user.email "[email protected]"
- name: Install Helm
uses: azure/setup-helm@v4

- name: Prepare GPG key #this step is for using exported keys and make your github runner
run: |
gpg_dir=.cr-gpg
mkdir "$gpg_dir"
keyring="$gpg_dir/secring.gpg" #referring keyring to private key of gpg
base64 -d <<< "$GPG_KEYRING_BASE64" > "$keyring" #storing base64 GPG key into keyring
passphrase_file="$gpg_dir/passphrase"
echo "$GPG_PASSPHRASE" > "$passphrase_file" #storing passphrase data into a file
echo "CR_PASSPHRASE_FILE=$passphrase_file" >> "$GITHUB_ENV" #saving passphrase into github-environment
echo "CR_KEYRING=$keyring" >> "$GITHUB_ENV" #saving private key into github-environemnt
env:
GPG_KEYRING_BASE64: "${{ secrets.GPG_KEYRING_BASE64 }}" #Referring secrets of github above
GPG_PASSPHRASE: "${{ secrets.GPG_PASSPHRASE }}"

- name: Rename Chart
if: github.ref_name != 'master'
run: |
flatBranchName=$(echo "${{ env.TARGET_BRANCH }}" | sed 's/\//\-/g')
sed -i "s/name: plane-ce/name: plane-ce-${flatBranchName}/" charts/plane-ce/Chart.yaml
sed -i "s/name: plane-enterprise/name: plane-enterprise-${flatBranchName}/" charts/plane-enterprise/Chart.yaml
- name: Release Charts
uses: helm/[email protected]
with:
charts_dir: charts
config: cr.yaml
packages_with_index: false
skip_existing: true
env:
CR_TOKEN: ${{ env.CR_TOKEN }}
CR_KEY: "Plane"
CR_KEYRING: ${{ env.CR_KEYRING }}
CR_PASSPHRASE_FILE: ${{ env.CR_PASSPHRASE_FILE }}
CR_SIGN: true
6 changes: 6 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
dist/
test-helm.yaml
.DS_Store
*/local-values.yaml
test.yaml
test-*.yaml
16 changes: 16 additions & 0 deletions artifacthub-repo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Artifact Hub repository metadata file
#
# Some settings like the verified publisher flag or the ignored packages won't
# be applied until the next time the repository is processed. Please keep in
# mind that the repository won't be processed if it has not changed since the
# last time it was processed. Depending on the repository kind, this is checked
# in a different way. For Helm http based repositories, we consider it has
# changed if the `index.yaml` file changes. For git based repositories, it does
# when the hash of the last commit in the branch you set up changes. This does
# NOT apply to ownership claim operations, which are processed immediately.
#
repositoryID: 1f012931-5011-4f86-bd8e-c0ef4f819ace

ignore:
- name: plane-ce
version: develop
24 changes: 24 additions & 0 deletions charts/plane-ce/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 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/
test-*.yaml
Empty file added charts/plane-ce/Chart.lock
Empty file.
17 changes: 17 additions & 0 deletions charts/plane-ce/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
apiVersion: v2

name: plane-ce
description: Meet Plane. An open-source software development tool to manage issues, sprints, and product roadmaps with peace of mind.

type: application

version: 1.0.18
appVersion: "0.20.0"

home: https://plane.so
icon: https://plane.so/favicon/favicon-32x32.png
sources:
- https://github.com/makeplane/plane

annotations:
artifacthub.io/license: AGPL-3.0
130 changes: 130 additions & 0 deletions charts/plane-ce/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,130 @@
### Plane Helm Setup
---

Follow below steps to setup **Plane**

Add Helm Repo
```
helm repo add makeplane https://helm.plane.so/
```

You must refer the configuration variables before proceeding. This can be done by running the below command or visiting **Configuration** tab.
```
helm show values plane-ce --repo https://helm.plane.so
```


Basic Install
```
helm install \
--create-namespace \
--namespace plane-ns \
--set ingress.appHost="plane.example.com" \
--set ingress.minioHost="plane-minio.example.com" \
my-plane makeplane/plane-ce
```

Customise Remote Postgress URL
```
--set postgres.local_setup=false \
--set env.pgdb_remote_url="postgress://[username]:[password]@[pg-host]/[db-name]" \
```

Customise Remote Redis URL
```
--set redis.local_setup=false \
--set env.remote_redis_url="redis://[redis-host]:[6379]" \
```

Customise Document Store - Change from Minio to AWS S3
```
--set minio.local_setup=false \
--set env.aws_access_key="xxxxxxx" \
--set env.aws_secret_access_key="xxxxxxx" \
--set env.aws_region="xxxxxxx" \
--set env.docstore_bucket="xxxxxxx" \
```

Customise with SSL

_Before proceeding with SSL configuration, make sure you have followed the steps in "**SSL Certificate**" tab_
```
--set ssl.createIssuer=true \
--set ssl.issuer=cloudflare \
--set ssl.token=xxxxxxxx \
--set ssl.email="[email protected]" \
--set ssl.generateCerts=true \
```

Configuration Settings Available

| Setting | Default | Required | Description |
|--- |:---: |:---: |--- |
| planeVersion | stable | Yes | |
| **Ingress Setup** | | | |
| ingress.appHost | 'plane.example.com' | Yes | |
| ingress.minioHost | 'plane-minio.example.com' | | (Optional) Required to open minio console interface |
| ingress.ingressClass | 'nginx' | Yes | can be any of the supported ingress controller class (eg. nginx, traefik, etc) |
| ingress.clientMaxBodySize | 5m | Yes | This is set at the ingress controller level to support max data from client. |
| **SSL Settings** | | | |
| ssl.createIssuer | false | | Set it to true to create Let's Encrypt Service based issuer |
| ssl.issuer | http | | (Yes, if createIssuer = true) Allowed - cloudflare, digitalocean, http |
| ssl.token | | | (Yes, if createIssuer = true) api token of dns provider, not required for http |
| ssl.server | https://acme-v02.api.letsencrypt.org/directory | | (Yes, if createIssuer = true)Lets Encrypt SSL Generation API. Staging: https://acme-staging-v02.api.letsencrypt.org/directory |
| ssl.email | [email protected] | | (Yes, if createIssuer = true) Required by Let's Encrypt. Change to a valid email id |
| ssl.generateCerts | false | | |
| **Redis Setup** | | | |
| redis.local_setup | true | | |
| redis.image | redis:6.2.7-alpine | | |
| redis.servicePort | 6379 | | Yes, if redis.local_setup=true |
| redis.storageClass | longhorn | | Yes, if redis.local_setup=true |
| redis.volumeSize | 1Gi | | Yes, if redis.local_setup=true |
| **Postgress DB Setup** | | | |
| postgres.local_setup | true | | |
| postgres.image | postgres:15.5-alpine | | Yes, if postgres.local_setup=true |
| postgres.servicePort | 5432 | | Yes, if postgres.local_setup=true |
| postgres.cliConnectPort | | | Provide if you want to expose the NODE PORT for local connectivity |
| postgres.storageClass | longhorn | | Yes, if postgres.local_setup=true |
| postgres.volumeSize | 5Gi | | Yes, if postgres.local_setup=true |
| **Doc Store (Minio) Setup** | | | |
| minio.local_setup | true | | In case this is false, AWS-S3 will settings will be required |
| minio.image | minio/minio:latest | | Yes, if minio.local_setup=true |
| minio.storageClass | longhorn | | Yes, if minio.local_setup=true |
| minio.volumeSize | 5Gi | | Yes, if minio.local_setup=true |
| minio.root_user | admin | | Yes, if minio.local_setup=true |
| minio.root_password | password | | Yes, if minio.local_setup=true |
| **Web Deployment** | | | |
| web.replicas | 1 | Yes | must be >=1 |
| web.memoryLimit | 1000Mi | | |
| web.cpuLimit | 500m | | |
| **Space Deployment** | | | |
| space.replicas | 1 | Yes | must be >=1 |
| space.memoryLimit | 1000Mi | | |
| space.cpuLimit | 500m | | |
| **API Deployment** | | | |
| api.replicas | 1 | Yes | must be >=1 |
| api.memoryLimit | 1000Mi | | |
| api.cpuLimit | 500m | | |
| **Worker Deployment** | | | |
| worker.replicas | 1 | Yes | must be >=1 |
| worker.memoryLimit | 1000Mi | | |
| worker.cpuLimit | 500m | | |
| **Beat Worker Deployment** | | | |
| beatworker.replicas | 1 | Yes | must be >=1 |
| beatworker.memoryLimit | 1000Mi | | |
| beatworker.cpuLimit | 500m | | |
| **Common Environment Settings** | | | |
| env.pgdb_username | plane | | Used for postgres.local_setup=true |
| env.pgdb_password | plane | | Used for postgres.local_setup=true |
| env.pgdb_name | plane | | Used for postgres.local_setup=true |
| env.pgdb_remote_url | '' | | Provided with Postgress Remote DB URI when postgres.local_setup=false |
| env.remote_redis_url | '' | | Provided with Remote Redis URI when redis.local_setup=false |
| env.docstore_bucket | 'uploads' | YES | Minio / AWS-S3 Bucket Name |
| env.doc_upload_size_limit | 5242880 | YES | Document Upload Size Limit (default to 5Mb) |
| env.aws_access_key | '' | | Required, in case minio.local_setup = false |
| env.aws_secret_access_key | '' | | Required, in case minio.local_setup = false |
| env.aws_region | '' | | Required, in case minio.local_setup = false |
| env.secret_key | '60gp0byfz2dvffa45cxl20p1scy9xbpf6d8c5y0geejgkyp1b5' | | Random secret key for data encoding during transit. |
| env.sentry_dsn | '' | | Sentry DSN for error logging |
| env.sentry_environment | '' | | Sentry Environment Name |
Loading

0 comments on commit 1923309

Please sign in to comment.