devfile / api

Kube-native API for cloud development workspaces specification
Apache License 2.0
257 stars 61 forks source link

Support External Dependencies in DevFile & Che Workspace #28

Closed triceam closed 2 months ago

triceam commented 4 years ago

Feature request: A mechanism to define/access external dependencies in the workspace. This would consist of links to external dependencies so that a developer could easily access those dependencies directly from the context of the workspace.

External dependencies could be url links to any resouce on the web. Common uses that I foresee are:

Proposed externalDependency component definition in the defile.yaml:

apiVersion: 1.0.0
metadata:
  name: My-Workspace
projects:
  - name: My-App
    source:
      location: 'https://github.com/triceam/my-sample-app-repo'
      type: git
components:
  - id: che-incubator/typescript/latest
    memoryLimit: 512Mi
    type: chePlugin
  - mountSources: true
    endpoints:
      - name: nodejs
        port: 3000
    memoryLimit: 512Mi
    type: dockerimage
    alias: nodejs
    image: 'quay.io/eclipse/che-nodejs10-ubi:7.8.0'
  - name: IBM Watson Visual Recognition
    url: http://cloud.ibm.com/watson/instance
    type: externalDependency
  - name: IBM Cloud Continuous Delivery
    url: http://cloud.ibm.com/devops/instance
    type: externalDependency
  - name: My on-prem Database
    url: http://url.to.my.database/foo
    type: externalDependency
  - name: My on-prem OpenShift cluster
    url: http://url.to.my.openshift/dashboard
    type: externalDependency

Proposed visualization in the Eclipse Che workspace: image

Clicking on the external dependency link would open a new tab or window to access the external dependency.

davidfestal commented 4 years ago

I assume that, in the current 2.0.0 syntax of components (as first proposed on master, and discussed here ), the current proposal would be written:

...
components:
  - chePlugin:
      ...
  - container:
      ...
  - externalDependency:
      name: IBM Watson Visual Recognition
      url: http://cloud.ibm.com/watson/instance
  - externalDependency:
      name: IBM Cloud Continuous Delivery
      url: http://cloud.ibm.com/devops/instance
  - externalDependency:
      name: My on-prem Database
      url: http://url.to.my.database/foo
  - externalDependency:
      name: My on-prem OpenShift cluster
      url: http://url.to.my.openshift/dashboard
...
triceam commented 4 years ago

That format would be fine with me.

l0rd commented 4 years ago

@triceam is it a list of links that a user can click and they will open in browser tab? Or are you thinking at making URLs available to the application (i.e. the link to an external API or a database connection)?

triceam commented 4 years ago

I was thinking this is just a link to external services in a new browser tab, so that the dependent services are easily accessible by the user.

Having those be links that are accessible to the application feels like the wrong mechanism. I'd expect app-specific settings that are used by the app at runtime to live in a config file for that specific app, so we don't confuse or conflate app settings with devenvironment/ide settings.

github-actions[bot] commented 4 months ago

This issue is stale because it has been open for 90 days with no activity. Remove stale label or comment or this will be closed in 60 days.