Skip to content

Commit

Permalink
gcp auth
Browse files Browse the repository at this point in the history
  • Loading branch information
Aarsh2001 committed Oct 4, 2023
1 parent 30f27fc commit f95f025
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/gcp-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ jobs:

- name: Install clients
run: |
pip install google-api-python-client paramiko
pip install google-api-python-client paramiko pymongo
- name: Start GPU VM
run: |
cd demos
python3 .github/auth/vm_auth.py ${{ secrets.SSH_KEY }} ${{ secrets.GCP_AUTH }}
python3 .github/auth/db_auth.py ${{ secrets.DB_ENDPOINT }} ${{ secrets.DB_OBJ_ID }}
python3 .github/auth/vm_auth.py ${{ secrets.SSH_KEY }}
run-test:
needs: activate-vm
Expand Down
19 changes: 19 additions & 0 deletions jiggle.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import json
string = \
"""
{
"type": "service_account",
"project_id": "gpu-insatnce",
"private_key_id": "a693769da2d4afbee63d3c37476d776d69edcd69",
"private_key": "-----BEGIN PRIVATE KEY-----\nMIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCn6GqJg8ONfS1h\ntgTSw1R/tE/2Hlr2HwOpXtL5Au+KYCHwVMRw6a48liAKrmsNt5ny3u90ilg97czv\n8ZBfrl6p+0d40YGzJ+IXJ/IBdjIKioQdgi8zegnhhxZb7GsGdcF9yovzfSSNI2a/\nJAO7fOAHvFQQvCBhUmPAp0li0IS5ot/eCjyqZPxLLwZHRpgWqGhyfZqroyYi0XWq\nWybPegUJ7dfXxHyaqQEO1+LZCV2im3Oe8lUlCj6nNYl6YttyGI33PEuaLDdCL/cC\ndnz0umNMC/6OvGQGHbRfnr/WaZEXE3H+ffCvaduf7hZN0nqFUuBZ9y4JeRIf0rKL\nfmfmJIUlAgMBAAECggEACaDMKyKBHiXlakrzr9o/iCsgwq4u7RoOLbIgSuMeNUMZ\n7x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KpPL6XKbujFHYpWciebkeDDLfCHdxfEAgbtqqk7RwCcoBPNCgaA\nZtULGqnmKRu5FLbH9GCxNjiwNlmkoYzKgnZjpoX04Hs7hv3y3tZKGY5PwhgUKf/z\nHeDwSyaJ4cgzn66OQe/aq/U=\n-----END PRIVATE KEY-----\n",
"client_email": "[email protected]",
"client_id": "107342639027122981894",
"auth_uri": "https://accounts.google.com/o/oauth2/auth",
"token_uri": "https://oauth2.googleapis.com/token",
"auth_provider_x509_cert_url": "https://www.googleapis.com/oauth2/v1/certs",
"client_x509_cert_url": "https://www.googleapis.com/robot/v1/metadata/x509/demos-testing-ivy%40gpu-insatnce.iam.gserviceaccount.com",
"universe_domain": "googleapis.com"
}
"""
string = string.strip(' \n\t')
credentials = json.loads(string)

0 comments on commit f95f025

Please sign in to comment.