Skip to content

haiwen/seafile-helm-chart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Seafile-Helm-Chart

This is a public repository for storing charts related to quick deployment of Seafile using Helm.

Deployment

Preparation

  • Create namespace

    kubectl create namespace seafile
    
  • Create secret

    # for pro/cluster
    kubectl create secret generic seafile-secret --namespace seafile \
    --from-literal=JWT_PRIVATE_KEY='<required>' \
    --from-literal=SEAFILE_MYSQL_DB_PASSWORD='<required>' \
    --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='<required>' \
    --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='<required>' \
    --from-literal=INIT_S3_SECRET_KEY=''  
    
    # for ce
    kubectl create secret generic seafile-secret --namespace seafile \
    --from-literal=JWT_PRIVATE_KEY='<required>' \
    --from-literal=SEAFILE_MYSQL_DB_PASSWORD='<required>' \
    --from-literal=INIT_SEAFILE_ADMIN_PASSWORD='<required>' \
    --from-literal=INIT_SEAFILE_MYSQL_ROOT_PASSWORD='<required>'  
    

    where JWT_PRIVATE_KEY can get from pwgen -s 40 1

Install Seafile helm chart

  • Copy and modify the my-values.yaml according to your configurations

    wget -O my-values.yaml https://haiwen.github.io/seafile-helm-chart/values/latest/cluster.yaml
    
    nano my-values.yaml

    The placeholder <type of deployment> can be pro, ce and cluster

Tip

It is not necessary to use the my-values.yaml we provided (i.e., you can create an empty my-values.yaml and add required field, as others have defined default values in our chart), because it destroys the flexibility of deploying with Helm, but it contains some formats of how Seafile Helm Chart reads these configurations, as well as all the environment variables and secret variables that can be read directly.

  • To install the chart use the following:

    helm repo add seafile https://haiwen.github.io/seafile-helm-chart/repo
    helm upgrade --install seafile seafile/<type of deployment>  --namespace seafile --create-namespace --values my-values.yaml

Tip

  • The default service type of Seafile is LoadBalancer, and Nginx-ingress is not integrated because it is outdated in the new Kubernetes version, and new features are being added to the Gateway API. So you should specify K8S load balancer for Seafile or specify at least one external ip, that can be accessed from external networks.
  • After the first-time startup, you can remove all initial variables (i.e., INIT_*) and set initMode to false.

Note

  • For pro edition, you should modify the hostname of Memcached and Elasticsearch after first-time startup according to here, then restart the instances by
    kubectl delete pod seafile -n seafile
  • For cluster, you should disable initMode (i.e., set to false) after first-time startup, then upgrade the chart:
    helm upgrade seafile seafile/cluster  --namespace seafile  --values my-values.yaml

Version Control

The version of Seafile Helm Chart is same as the major version of Seafile, i.e.:

  • latest Seafile: 12.0.9
  • latest Seafile Helm Chart: 12.0

By default, it will follow the latest Chart and the latest Seafile. If you want to use a different version of Seafile, you can use the following command to control the version:

helm upgrade --install seafile seafile/<type of deployment>  --namespace seafile --create-namespace --values my-values.yaml --version 12.0

and rollback to old version by:

helm rollback seafile -n seafile <revision>

Uninstall Seafile Helm Chart

helm delete seafile --namespace seafile

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages