Giter Site home page Giter Site logo

helm-charts's Introduction

Studio Helm Chart

Installation

Create namespace

We'll install Studio and related components in a dedicated studio namespace. Let's create it now:

$ kubectl create namespace studio

Note: If you want to install Studio in any other namespace, modify the --namespace flag in the commands below accordingly

Create a Docker registry secret

Configure Credentials for pulling images from our private registry:

$ kubectl create secret docker-registry iterativeai \
    --namespace studio \
    --docker-server=docker.iterative.ai \
    --docker-username=<username> \
    --docker-password=<password>

Prepare a TLS secret

It is desired to enable Studio access via the https protocol (as opposed to http). This requires setting up a TLS secret for access (whether self-signed or "real"). First, we'll need to obtain a TLS/SSL certificate and then, load it into a kubernetes secret in the namespace studio will be installed in. To create an SSL cert, you will need to know the domain (FQDN) that Studio will be accessible from (e.g. studio.iterative.ai for the official SaaS installation).

Note: We will now go over generating TLS cert with the openssl command. If you already have a TLS certificate available, skip ahead to loading the crt/key files into the kubernetes secret

As an example, we'll assume your Studio installation will be available via: https://my-studio.private.com. We'll also use a self-signed certificate for the sake of simplicity. Of course, for a production installation we recommend using a certificate signed by a trusted CA.

Let's create a self-signed SSL cert using openssl (you may need to install it):

openssl req \
  -x509 -newkey rsa:4096 -sha256 -nodes \
  -keyout tls.key -out tls.crt \
  -subj "/CN=my-studio.private.com" \
  -addext "subjectAltName = DNS:my-studio.private.com" \
  -days 365

This will create the files tls.crt & tls.key in your current dir.

Now, let's create a TLS secret containing the contents from this cert:

kubectl create secret tls studio-ingress-tls \
  --namespace studio \
  --cert=tls.crt \
  --key=tls.key

We will refer to this secret in the below installation instructions.

Install Studio

Now, we are ready to deploy Studio using the Helm chart.

Add the iterative Helm repository:

$ helm repo add iterative https://helm.iterative.ai

Minimal Installation:

To install studio with all default values (for sanity, testing), Run the following command:

$ helm install studio iterative/studio \
    --namespace studio \
    --set-json='imagePullSecrets=[{"name": "iterativeai"}]'

Functional Installation:

Realistically, for a functional Studio app instance, you'll need to configure multiple values. In this example we'll prepare a more realistic and functional installation.

Assumptions:

  • We have an ingress controller (nginx) installed on the cluster.
  • Studio will be available from the domain: my-studio.private.com (we've registered this domain and made sure to redirect to our cluster).
  • We refer to the TLS secret studio-ingress-tls we've created in a previous step.

Create a file named studio-values.yaml, with the following contents:

imagePullSecrets:
  - name: iterativeai

global:
  host: "my-studio.private.com"
  secretKey: "768d4238-1257-4500-89ce-7ac6aea5c5c9"
  ingress:
    enabled: true
    className: nginx
    tlsEnabled: true
    tlsSecretName: studio-ingress-tls
  scmProviders:
    github:
      enabled: true
      appId: "<app-id>"
      appName: "iterative-studio-selfhosted"
      clientId: "<gh-client-id>"
      clientSecret: "<gh-app-secret>"
      privateKey: |-
        -----BEGIN RSA PRIVATE KEY-----
        ...
        -----END RSA PRIVATE KEY-----

Upgrading to 0.60.x and above

Version 0.60.0 fixes an issue with Ingress objects not getting cleaned up.
To upgrade to 0.60.0 and above, you need to manually delete the existing Ingress object before upgrading:

kubectl delete ingress -l app.kubernetes.io/managed-by=Helm --namespace studio
kubectl delete ingress blobvault --namespace studio

The rest of the upgrade process is the same as described below.

Update Studio Version

Studio's studio-values.yaml file points to the latest image tag, instructing Helm to always pull down the latest image from the registry.

Optional: Pinning Studio Version

If you wish to install/update Studio at a specific version, update the studio-values.yaml file with the following:

studioUi:
  image:
    tag: "<version>"

studioBackend:
  image:
    tag: "<version>"

To update the existing Studio deployment, run the following commands

$ helm dependency update
$ helm upgrade --install studio studio/ --namespace studio -f override.yaml

Uninstall Studio

Execute the following command to uninstall Studio from your environment:

$ helm uninstall studio --namespace studio

Available Configuration

See values file with all available configuration flags.

helm-charts's People

Contributors

0x2b3bfa0 avatar dacbd avatar dreadatour avatar gurobokum avatar iterative-olivaw avatar jesper7 avatar mattseddon avatar mjasion avatar omesser avatar renovate[bot] avatar rishabhdas avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

helm-charts's Issues

Support read-only mode in pod security context

Currently, enabling read-only mode in the security context for the UI pod causes it to crash.
This is because the UI uses server-side rendering and must write compiled files to the local filesystem. We should mount the directory for the compiled files as a volume to fix this.

Make blobvault PVC storage optional, if S3 bucket is used

In #82 we introduced the local baking store to fix issues with Minio (missing path based routing). Delivering the change we started deploying nginx container, which was mounting the PVC volume blobvault attached to worker pod.

C4Dynamic
    ContainerDb(c1, "blobvault", "PVC")
    Container_Boundary(B, "Worker") {
      Container(c2, "Worker Pod")
    }
    Container_Boundary(c, "Nginx Pod",) {
      Container(c3, "Nginx")
    }
    Rel(c2, c1, "")
    Rel(c1, c3, "")

Tasks

Ingress support for path based routing

Please extend the helm chart to provide a way for hosting studio with path based routing. For instance, serve studio and its sub-components on /studio path instead of default /.

Create a changelog

We should have a changelog for our Helm charts so that users can read about breaking changes and adjust their values.yml accordingly.

Add provision to inject additional environment variables to Studio

Customer specific features are controlled through environment variables / flags. Need to extend Helm chart providing a way to inject customer specific environment variables through values.yaml / override file.

For instance:

extra_vars:
  - name: CUSTOMER_SPEC_VAR_1
     value: customer-variable-value-1
  - name: CUSTOMER_SPEC_VAR_2
     value: customer-variable-value-2

These can then be added to various studio components as needed.

Redis - support for non SSL protected environments

Please provide a way to securely configure Redis connection using a secret and SSL.

Use case is for using external Redis cache service instead of in-cluster. The service, by policy, has non-SSL port 6379 disabled. The service only accepts connections on port 6380 and is secured by a secret (access key / password).

Enabling Ingress configuration sets from API_URL and UI_URL

Bug

In the env_file.tpl there is a range loop:


which for more than one entry in values.yaml

Can cause, that the result of the range loop will have multiple values:

- name: API_URL
  value: https://api1/api
  value: https://api2/api

Expected result

The expected value here is a single endpoint.

Provision to add CA cert for Studio UI component

Studio UI being a node component, needs an extra variable to pass the CA certificate file path. Need to extend the chart to accommodate cert injection and variable configuration.

A possible solution could be:

  • Create an optional configmap with CA certs which can be mounted as a volume to the UI component
  • If the configmap exists, export NODE_EXTRA_CA_CERTS environment variable to UI component with value set as path/to/certificate-file

Adding Opt-in Analytics (mixpanel) Support

Opt-in value to fill in MIXPANEL_PROJECT_TOKEN env var and send it to frontend pod.
We should keep this opt-in - it's both an unexpected behavior, and also will most likely not be wanted or possible for most self-hosted installations (no internet access).

This is not considered secret, but can arguably be in the secret and not configmap ๐Ÿคท

UPGRADE FAILED: nil pointer evaluating interface

From #123 (comment)

The lint-test workflow may break unexpectedly when the pull request branch contains new values not present in the main branch. As per #123 (comment), we can wrap every level with parenteses to avoid the error, but values will still be null.

Example

Error: UPGRADE FAILED: template: studio/templates/raycluster-studio.yaml:1:14: executing "studio/templates/raycluster-studio.yaml" at <.Values.ray.enabled>: nil pointer evaluating interface {}.enabled

References

Standardize commit messages

We'd like to include information in all git commit messages about the type of change. To achieve this, we can implement Conventional Commits or use prefixes like bug:, docs:, feat:, etc.

Lastly, we must ensure that all contributor's commit messages conform to this standard via some safeguards like pre-commit or a CI job.

Autogenerate Minio and Postgres passwords

Like we do for SECRET_KEY, we should also autogenerate Minio and Postgres passwords unless provided in values.yaml

# Set secretKey to existing value or generate a random one
{{- if .Values.global.secrets.secretKey }}
secretKey: {{ .Values.global.secrets.secretKey | b64enc }}
{{- else }}
{{- $secretObj := (lookup "v1" "Secret" .Release.Namespace "studio") | default dict }}
{{- $secretData := (get $secretObj "data") | default dict }}
{{- $secretKey := (get $secretData "secretKey") | default (randAscii 40 | b64enc) }}
secretKey: {{ $secretKey | quote }}
{{- end }}

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Edited/Blocked

These updates have been manually edited so Renovate will no longer make changes. To discard all commits and start over, click on a checkbox.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Ignored or Blocked

These are blocked by an existing closed PR and will not be recreated unless you click a checkbox below.

Detected dependencies

github-actions
.github/workflows/helm-docs.yaml
  • tibdex/github-app-token b62528385c34dbc9f38e5f4225ac829252d1ea92
  • actions/checkout v4
  • stefanzweifel/git-auto-commit-action v5
.github/workflows/helm-lint-and-install.yaml
  • actions/checkout v4
  • azure/setup-helm v4
  • actions/setup-python v5
  • helm/chart-testing-action v2.6.1
  • helm/kind-action v1.9.0
  • actions/checkout v4
  • azure/setup-helm v4
.github/workflows/helm.yaml
  • actions/checkout v4
  • dorny/paths-filter v3.0.2
  • actions/checkout v4
  • azure/setup-helm v4
  • helm/chart-releaser-action v1.6.0
.github/workflows/leaked_secrets_scan.yaml
  • actions/checkout v4
.github/workflows/studio_release.yml
  • actions/checkout v4
  • iterative/setup-cml v1
helm-values
charts/studio/values.yaml
  • rayproject/ray 2.9.3-py310-cpu
  • docker.io/bitnami/pgbouncer 1.22.1
  • nginx 1.25.1-alpine
helmv3
charts/studio/Chart.yaml
  • redis 17.14.3
  • postgresql 11.9.13
  • kuberay-operator 0.6.0

  • Check this box to trigger a request for Renovate to run again on this repository

Support Setting User limit

Should be SELF_HOSTED_USER_LIMIT (currently using old on-prem terminology)
Need to add to values + configmap and pass to backend

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.