Skip to main content

Setup GenAI backend in your system

  1. Switch to Python Version 3.11.9.
  2. Clone deployment-local from cm-engage and run clone-all.ps1 file in it. This will clone all the repositories required for Gen-AI.
  3. Setup ssh key with github GitHub Docs and check if your local is able to communicate with it.
  4. Add the generated filename.pub to GitHub ssh field.
ssh-keygen -t rsa -C "[email protected]" -----> can name it id_rsa
ssh-add C:\Users\your.name\.ssh\id_rsa(or the file name) ---> make sure OpenSSHHost is started before adding it
ssh -T [email protected] ----> to check the connection with github
  1. Edit the C:\Windows\System32\drivers\etc\hosts file in admin mode and add
127.0.0.1 postgres
127.0.0.1 pgbouncer
127.0.0.1 logpgbouncer
127.0.0.1 realtimeqa
127.0.0.1 datarefinery
127.0.0.1 gateway
127.0.0.1 bridgeai
127.0.0.1 cms-frontend
127.0.0.1 cmsbackend

these line before # End of section 6. Enable the OpenSSH SSH Agent in your services.msc (run it in admin mode to work) and follow 7. Run .\init.sh file for initial setup. It will generate the init.log file, check if there are any errors in the file. (comment out the first 4 steps, it is to setup azure in your local) 8. Run .\run.sh to bring the docker up. 9. To onboard a new tenant in your local:

curl --location 'http://127.0.0.1:3001/onboarding'
--header 'x-api-key: 123'
--header 'Content-Type: application/json'
--data '{"logical_account_id":"513fe993-efdb-48bc-8d37-50e92a4fc921","order_id":"8ec77a3c-f794-43e8-819c-136fdee2d9b1","orderline_id":"8ec77a3c-f794-43e8-819c-136fdee2d9b1","plan":"GENAI_BASIC","volume_tier":"TIER_0","logical_account_name":"vijay","organization_id":"490069","contract_start_date":"2024-04-01T08:53:29","provision_date":"2024-03-22T08:53:29","is_trial":false}'
  1. If 7 fails, uvicorn src.app:app --host 127.0.0.1 --port 3002 --log-level debug --reload to run datarefinary locally and then:
curl --location 'http://127.0.0.1:3002/onboarding'
--header 'x-api-key: 123'
--header 'Content-Type: application/json'
--data '{"logical_account_id":"513fe993-efdb-48bc-8d37-50e92a4fc921","order_id":"8ec77a3c-f794-43e8-819c-136fdee2d9b1","orderline_id":"8ec77a3c-f794-43e8-819c-136fdee2d9b1","plan":"GENAI_BASIC","volume_tier":"TIER_0","logical_account_name":"vijay","organization_id":"490069","contract_start_date":"2024-04-01T08:53:29","provision_date":"2024-03-22T08:53:29","is_trial":false}'
  1. If you are facing problems in running datarefinary :
    1. Download Microsoft C++ Build Tools - Visual Studio and install latest version of MSVC build tools and SDK
    2. Download and install rustup.rs - The Rust toolchain installer
    3. Restart your system
    4. Install dependencies in a virtual environment
    5. Repeat Step 8