ocis-charts icon indicating copy to clipboard operation
ocis-charts copied to clipboard

support web apps installation

Open wkloucek opened this issue 1 year ago • 4 comments

Description

support web app installation via initContainers

Related Issue

  • fixes https://github.com/owncloud/ocis-charts/issues/714

Motivation and Context

There are now Web apps that need to be somehow installable on the oCIS Helm Chart

How Has This Been Tested?

  • see the newly introduced deployment example

https://ocis.kube.owncloud.test/config.json

{
   "server":"https://ocis.kube.owncloud.test",
   "theme":"https://ocis.kube.owncloud.test/themes/owncloud/theme.json",
   "openIdConnect":{
      "metadata_url":"https://ocis.kube.owncloud.test/.well-known/openid-configuration",
      "authority":"https://ocis.kube.owncloud.test",
      "client_id":"web",
      "response_type":"code",
      "scope":"openid profile email"
   },
   "apps":[
      "files",
      "search",
      "text-editor",
      "pdf-viewer",
      "external",
      "admin-settings",
      "epub-reader",
      "preview",
      "app-store"
   ],
   "external_apps":[
      {
         "id":"external-sites",
         "path":"/assets/apps/external-sites/external-sites.js",
         "config":{
            "sites":[
               {
                  "color":"#0D856F",
                  "icon":"cloud",
                  "name":"ownCloud",
                  "priority":50,
                  "target":"external",
                  "url":"https://www.owncloud.com"
               }
            ]
         }
      }
   ],
   "options":{
      "contextHelpersReadMore":true,
      "tokenStorageLocal":true,
      "embed":{
         
      },
      "concurrentRequests":{
         "shares":{
            
         }
      }
   }
}

Screenshots (if appropriate):

image

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [x] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Technical debt
  • [ ] Tests only (no source changes)

Checklist:

  • [x] Code changes
  • [ ] Unit tests added
  • [ ] Acceptance tests added
  • [ ] Documentation generated (make docs) and committed
  • [ ] Documentation ticket raised:
  • [ ] Documentation PR created:

wkloucek avatar Sep 13 '24 05:09 wkloucek

@kulmann what I found out:

  • external_apps cannot be used to configure apps from the asset path because something is broken in the merge logic. apps.yaml can be used for it
  • uppy companion cannot be configured via apps.yaml but needs to be configure via external_apps

We're running out of names and descriptions for those app thingies, see:

https://github.com/owncloud/ocis-charts/pull/749/files#diff-8c842c719bd4d586188397f163f81a453a91b973b98b05e09a8cbe8132e269c2R2230-R2234

Am I doing something wrong?

wkloucek avatar Sep 13 '24 09:09 wkloucek

@d7oc could you take over please with @kulmann ?

wkloucek avatar Sep 13 '24 10:09 wkloucek

@kulmann what I found out:

  • external_apps cannot be used to configure apps from the asset path because something is broken in the merge logic. apps.yaml can be used for it
  • uppy companion cannot be configured via apps.yaml but needs to be configure via external_apps

We're running out of names and descriptions for those app thingies, see:

https://github.com/owncloud/ocis-charts/pull/749/files#diff-8c842c719bd4d586188397f163f81a453a91b973b98b05e09a8cbe8132e269c2R2230-R2234

Am I doing something wrong?

Maybe the easiest solution is to extract the importer app from the web monorepo to the web-extensions repo. 🤔 anyway not a core functionality.... and that way you wouldn't need to use the external_apps config for it but could use the apps.yaml mechanism instead. thoughts @JammingBen ?

kulmann avatar Sep 13 '24 11:09 kulmann

@d7oc could you take over please with @kulmann ?

Yes, but this might need to wait until Monday.

d7oc avatar Sep 13 '24 12:09 d7oc

Had a short call with @d7oc with the following outcome:

  • we remove the option to configure the external_apps in the config.json directly
  • only apps (string array for providing the list of enabled web-monorepo-apps) and apps.yaml (the new ocis mechanism to configure external apps) is to be used
  • I'll ask @fschade what makes more sense:
    • a) either move the importer-app to the web-extensions repo and provide docker images with its assets or
    • b) keep the importer app in the web monorepo (= ocis provides the assets) but make it possible in ocis to configure the app via apps.yaml

kulmann avatar Sep 30 '24 14:09 kulmann

  • a) either move the importer-app to the web-extensions repo and provide docker images with its assets or
  • b) keep the importer app in the web monorepo (= ocis provides the assets) but make it possible in ocis to configure the app via apps.yaml

Discussed with @tbsbdr and @fschade and decided that we'll do a) because the app is anyway not sufficiently important for the web monorepo.

kulmann avatar Oct 01 '24 08:10 kulmann

@kulmann do you already have some timeframe when this change will be done? So we can plan the work on this PR accordingly.

d7oc avatar Oct 02 '24 16:10 d7oc

@kulmann do you already have some timeframe when this change will be done? So we can plan the work on this PR accordingly.

done 😅 You can find the readme about config here: https://github.com/owncloud/web-extensions/tree/main/packages/web-app-importer and the docker image is published here: https://hub.docker.com/layers/owncloud/web-extensions/importer-0.1.0/images/sha256-ac42019ba67cfbec7413a85a664fcbdb1172ea7bd272cae37b83094f96564ad8?context=explore

kulmann avatar Oct 07 '24 11:10 kulmann

we remove the option to configure the external_apps in the config.json directly

this was already done in this PR, so it's ready to be reviewed now.

wkloucek avatar Oct 08 '24 06:10 wkloucek