Uploaded image for project: 'Hybrid Cloud Console'
  1. Hybrid Cloud Console
  2. RHCLOUD-32115

Dev Sandbox Developer Catalog Page

XMLWordPrintable

    • 5
    • False
    • Hide

      None

      Show
      None
    • False
    • None
    • Unset
    • No
    • Plat-Ex Services Sprint 16, Plat-Ex Services Sprint 17, Plat-Ex Services Sprint 18, Plat-Ex Services Q2 Tech Debt, Plat-Ex Services Sprint 19, Plat-Ex Services Sprint 20, Plat-Ex Services Sprint 21, Plat-Ex Services Sprint 22, Plat-Ex Services Sprint 23, Plat-Ex Services Sprint 24, Plat-Ex Services Sprint 25, Plat-Ex Services Sprint 26, Plat-Ex Services Sprint 27, Plat-Ex Services Sprint 28, Plat-Ex Services Sprint 29, Plat-Ex Services Sprint 30

      There is a goal for the Developers Web Site to provide our users an easy experience to browse the Developer Sandbox Catalog before signing up for the Sandbox and still drop them in their desired location.

      A general overview of the flow would be:

      1. User browses our Public Facing Catalog on developers.redhat.com. The Catalog information and URLs for items would be manually maintained on the developers website to reflect what is available inside of the Sandbox.
      2. User clicks on a catalog item that sends them to a new Sandbox “Deeplink” web page i.e. for the .NET catalog item it would look something like registration-service-toolchain-host-operator.apps.sandbox.x8i5.p1.openshiftapps.com/link.html?link=dot-net-basic.  
      3. User is prompted to register or login and then is redirected to the item within the Sandbox Developer Catalog (i.e. console-openshift-console.apps.sandbox-m4.g2pi.p1.openshiftapps.com/catalog/ns/rh-ee-evrobert-dev?selectedId=Devfile-dotnet-basic)

      The ask is to create that static page (link.html) to cover steps 2 and 3 from the above.

      Deployment/Hosting
      This site will be deployed to the Dev Sandbox so called "host" cluster and will be available at registration-service-toolchain-host-operator.apps.sandbox.x8i5.p1.openshiftapps.com/link.html or similar URL.

      Source Code
      The source code will be developed by the Console team and added here: https://github.com/codeready-toolchain/registration-service/tree/master/pkg/assets/static
      And the Dev Sandbox team will be responsible for deploying it to the cluster.

      Implementation
      The suggestion is to develop it as a static html/JS page which would do the following:

      • automatically initiate the login flow against sso.redhat.com to obtain an access token. Dev Sandbox already have a public sso.redhat.com client which we can use for that.
      • using the access token it calls Dev Sandbox reg-service API endpoint:
        GET registration-service-toolchain-host-operator.apps.sandbox.x8i5.p1.openshiftapps.com/api/v1/signup
      • if this endpoint return 404 it means the user has not signed up for Dev Sandbox yet. And I think we can just redirect user to https://console.redhat.com/openshift/sandbox to initiate the signup. We should discuss with the Developers Web Site folks if there is anything else we should do in this case.
      • if the endpoint returns 200 it will also return a JSON.
      • if the status filed of this JSON is not "ready" then we probably should redirect to https://console.redhat.com/openshift/sandbox too to finish the signup. But it's something we need to discuss with the Developers Web Site team too.
      • otherwise the page can extract all needed information about the user from this JSON. Such as: the target cluster URL for this user. The user's namespace name. Etc.
      • the page uses this information to construct an URL using it's internal hard-coded mapping. For example for the
        /link.html?link=deploy-image

        it would generate the following URL:

        https://<console_url_from_status_json>/deploy-image/ns/<user_namespace_from_status_json>

        Here is the list of the links we want to support: https://docs.google.com/spreadsheets/d/1Hw0QGFiUbGjo4UOYGmU_0XwvkYsX4UDVW6C4aGqwlEk/edit#gid=0 (only non-dynamic links are expected to be supported atm)

      • redirects the browser to that URL

              Unassigned Unassigned
              alexeykazakov Alexey Kazakov
              Votes:
              0 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: