Uploaded image for project: 'Qt Cloud'
  1. Qt Cloud
  2. CLOUD-299

Onboarding - a script that guides the user step by step to getting started with Qt cloud

    XMLWordPrintable

Details

    • Task
    • Resolution: Done
    • P2: Important
    • None
    • None
    • Business requirement
    • None
    • Gemini sprint 12, Gemini development, Gemini development, Onboarding finalization sprint

    Description

      When user purchases Qt cloud licence, in an email, we send them the link to Dashboard Plugin Archive and ask them to download this and follow instructions. 

      • Download python
      • Create virtual env
      • Install plugin

      Now, the next steps for the user is to answer few questions and finish the setup. 

      1. qtci-setup -qt-accout <qt account email>
        1. ask password from the user
        2. get the login token (CLOUD-296)
        3. check if user has qt cloud license (CLOUD-297)
        4. if no, exit
        5. if yes, go to step 2
      2. At step 2:
        1. Continue this setup on command line OR do this in your browser?
        2. OR then, just have two different endpoints:
          1. qtci-setup -cli: does everything in the CLI
          2. qtci-setup -browser: opens fastapi app to run everything in the browser
            1. opens the URL localhost:8086/setup or ask user to open this url

      In browser or in command line, please note, when in browser, a relevant form has to be created - a step by step form for the options mentioned below.  (CLOUD-293)

      1. Choose one option
        1. My project is in my Gitlab
        2. My project is in  Qt Gitlab
        3. I will create a new project in Qt Gitlab
        4. I will create a new project in my Gitlab
        5. Based on choice from the above:
          1. ask or autodetect the GitLab REST API URL e.g. https://git.qt.io/......
          2. ask the user, a private token from their Gitlab account
      2. If new project was chosen:
        1. Ask name space 
        2. Ask project name
        3. Ask example project name
        4. Ask email of people who should have access
        5. ON SUBMIT
          1. create name space
          2. create the project and example project in name space
          3. invite email addresses to join this project (or name space)
      3. If existing project is chosen, go to next step already
      4. Adding variables to CI environment
        1. Use the existing Qt cloud account token to get
          1. CONAN credentials
            1. Ask user if they have a Conan credntials for Qt account? If yes - then put that or else, request one via API (CLOUD-296)
          2. JFrog credentials 
            1. If jfrog account is not found - find ways to create one and give Qt cloud ci repo access to this jfrog account (CLOUD-308)
        2. Add CONAN_USER, CONAN_PASS to namespace env
        3. Add JFROG_USER, JFROG_PASS to namespace env
        4. Add CONAN_REPO_URL, JFROG_REPO_URL and all other such relevant items to the ENV variable
      5. Show example of how to use the Qtcloud CI, e.g. in Gitlab YML or via Dockerfile

      Next step to this would be setting up the NGrok things (because we want the user to setup the whole thing only once). 

       

      SO, how to do this in real: 

      1. Write a new script in qtci_bin which is called qtci-setup which handles -cli, -browser 
      2. Write an "onboarding" module in qtci which does the following in form of modular functions:
        1. get qt login token (CLOUD-296)
        2. check validity of qtcloud licence (CLOUD-297)
        3. read and store gitlab url and private token (related to CLOUD-303, but outside the scope of the current mvp)
        4. read and store private token in settings (related to CLOUD-303, but outside the scope of the current mvp)
        5. read and create project name space, project and example project (CLOUD-279)
        6. share_project_with_people (CLOUD-304)
        7. get conan credentials via relevant API (CLOUD-296)
        8. get jfrog credentials via relevant API (CLOUD-298)
        9. create jfrog account (CLOUD-308)
        10. add env variables to gitlab project and namespace using REST API (CLOUD-281)
      3. Create a step by step based user form and connect this form to the above mentioned modules (CLOUD-293)
      4. Create API endpoints in the _fastapi module which do the above mentioned tasks (CLOUD-305)

      Until now, once everything is done, then we can proceed to normal setup of the QtCI plugin, which includes: 

      1. NGROK tunnel integration (CLOUD-306)
        1. Read NGROK tunnel token
        2. Test settings
        3. Save token
      2. Webhook testing and integration to the plugin  (CLOUD-307)
        1. Create gitlab webhook
        2. Test settings
        3. Save what is required

       

      There will be possibly more items to be done for this in total - but for now, this is the start list. 

      Attachments

        Issue Links

          Activity

            People

              as33ms Aseem Shakuntal
              as33ms Aseem Shakuntal
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: