Uploaded image for project: 'Docs for Red Hat Developers'
  1. Docs for Red Hat Developers
  2. RHDEVDOCS-2302

[EUG] Rework section 'Creating a workspace using chectl and a local devfile'

XMLWordPrintable

    • 5
    • Undefined
    • ---
    • ---

       Section Creating a workspace using chectl and a local devfile is completely wrong, needs a full rewrite.

      • crwctl workspace:start has no --devfile parameter, will try to start a workspace called “-devfile=devfile.yaml”
      • Correct command appears to be workspace:create, but:
        $➔ ~/bin/crwctl workspace:create --name=my-workspace --devfile=devfile.yaml -n nb-clk-pty --start

        ... will fail without token.

      • Suggested method for getting token (from abazko):
          CHE_USER=admin
          CHE_PASSWORD=admin # unless you changed it from the default
          KEYCLOAK_HOSTNAME=keycloak-che.192.168.99.100.nip.io # or your RH-SSO route for CRW
          TOKEN_ENDPOINT="https://${KEYCLOAK_HOSTNAME}/auth/realms/che/protocol/openid-connect/token"
          export CHE_ACCESS_TOKEN=$(curl -sfSL --cacert ~/cheCA.crt --data "grant_type=password&client_id=che-public&username=${CHE_USER}&password=${CHE_PASSWORD}" ${TOKEN_ENDPOINT} | jq -r .access_token)
        
      • then use it to create and start a workspace
        ~/bin/crwctl workspace:create --name=my-workspace --devfile=devfile.yaml -n nb-clk-pty --start --access-token=${CHE_ACCESS_TOKEN}       
           

            abazko Anatolii Bazko
            mmaler@redhat.com Michal Maléř
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: