Skip to content

Latest commit

 

History

History
148 lines (105 loc) · 7.17 KB

File metadata and controls

148 lines (105 loc) · 7.17 KB

In this document we instruct how to register all needed accounts and how to fill in the token_key_session.py from these account info. Configuring all these accounts is a one-time effort, and will take around 30 minutes.

Part1 Overview

In part 1, we will introduce all accounts needed in launching full evaluation of Toolathlon.

Remote Ones

  • google account x 1
    • to generate credentials
    • to generate api key
    • to generate service account
  • github account x 1
    • to generate github tokens
  • wandb account x 1
    • to generate wandb token
  • notion account x 1
    • to generate connection secrets
  • snowflake account x 1
    • to collect account, warehouse, etc
  • huggingface account x 1
    • to generate Huggingface token

Local Ones

All local accounts will be already automatically created after you ran bash global_preparation/deploy_containers.sh following the main README.md. see configs/users_data.json for all accounts we will create

We by default register all the accounts in config/users_data.json to Canvas and Poste, and we will register the #81 to #100 accounts to woocommerce and create a subsite for each of them.

Part2 Register Remote Accounts and Configurate Them

Google Account

We recommand register a new Google (gmail) account for Toolathlon evaluation. You can use this google account for most of the services below such as wandb, notion, snowflake, etc.

First make sure you have gcloud sdk installed, e.g.:

curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-456.0.0-linux-x86_64.tar.gz
tar -xf google-cloud-sdk-*-x86_64.tar.gz
./google-cloud-sdk/install.sh
source ~/.bashrc # or ~/.zshrc

Then go to https://console.cloud.google.com/ to accept the Terms of Service for this account before processing.

Finally, simply run:

bash global_preparation/automated_google_setup.sh

This script will help you setup new google cloud account, billing information, enable necessary APIs, etc. It will interact with you and sometimes will prompt you to some urls for manual authentication.

STEP 6 in this setup script requires some manual steps, click to expand for detailed figure instructions (these steps are already included in the script, the figures are just to help understand the process)
  • Step 6.1 Configure OAuth Consent Screen

  • Step 6.2 Publish the App

  • Step 6.3 Create OAuth Client ID Choose "Web application" as application type, give it a name and click "Create". For Web application, add http://localhost:3000/oauth2callback to the authorized redirect URIs

  • Download the JSON file of your client's OAuth keys
    Rename this key json file to gcp-oauth.keys.json and place it under configs

Github & Huggingface & WandB & Serper Accounts

# This script will prompt you to do necessary registration and authentication.
bash global_preparation/automated_additional_services.sh

Notion Account

We recommand register a new notion account with your Toolathlon-specific gmail account and create a new workspace.

First run uv run -m global_preparation.special_setup_notion_official to connect to the workspace in the above step to the official online notion mcp. This facilates us to duplicate and move pages more efficiently! This will create a .mcp-auth directory under configs to store the authentication state of the online notion mcp.

*Note: If you connect to an incorrect workspace when executing this command, you can remove the ./configs/.mcp-auth and rerun this command to reset the login state of this online notion mcp.

If you indeed want to do notion preprocessing via playwright ... (NOT RECOMMANDED!)

First run uv run utils/app_specific/notion/notion_login_helper.py --headless to generate a notion_state.json under the configs, please just follow the instructions from the script, this is a one-time effort.

You also need to change the variable notion_preprocess_with_playwright to True in configs/global_configs.py

--

Please duplicate the public page Notion Source Page to your workspace, record the url of this duplicated page (not our public page) as the source_notion_page_url variable in configs/token_key_session.py

Please also create a new page called Notion Eval Page directly under your workspace, record the url if this new page as the eval_notion_page_url variable in configs/token_key_session.py

Also, create an intrgration that include these above two pages, see https://www.notion.so/profile/integrations, and record the "Internal Integration Secret" as notion_integration_key veriable in configs/token_key_session.py

Finally, similar to the above steps, create an intrgration key for evaluation use only. Please only select Notion Eval Page into the access range of it. Record this key as notion_integration_key_eval variable in configs/token_key_session.py.

SnowFlake Account

*Due to the fast changes in snowflake's UI, the screenshots provided in this section may not 100% reflect the actual page you see in your browser. Please be careful.

We recommand register a new Snowflake account (see https://signup.snowflake.com/). After you have created and activated the account. Find your account details and fill them into the snowflake_account, snowflake_role, and snowflake_user variables in configs/token_key_session.py *Note, the User Name in the following figure now becomes Login name. We also need to generate a private key for the snowflake account, you can do this by running the following:

# generate a private key
openssl genrsa 2048 | openssl pkcs8 -topk8 -v2 des3 -inform PEM -out ./configs/snowflake_rsa_key.p8 -nocrypt
# generate a public key
openssl rsa -in ./configs/snowflake_rsa_key.p8 -pubout -out ./configs/snowflake_rsa_key.pub
# show the public key
cat ./configs/snowflake_rsa_key.pub | grep -v "BEGIN PUBLIC KEY" | grep -v "END PUBLIC KEY" | tr -d '\n'; echo

then login to your snowflake and configure the shown public key in the snowflake console:

  1. create a new SQL file
  2. enter the following SQL command after replacing YOUR_USERNAME with your snowflake username
    ALTER USER YOUR_USERNAME SET RSA_PUBLIC_KEY='MIIBIjANBg...(paste the public key you generated above)';
  3. check the public key by running the following SQL command after replacing YOUR_USERNAME with your snowflake username
    DESC USER YOUR_USERNAME;
    you will find the public key in the RSA_PUBLIC_KEY column and also the RSA_PUBLIC_KEY_FP is filled as well.