How to manage dss nodes through python API when using fleetmanager

성식
성식 Registered Posts: 2

hello

I want to manage fleetmanager's resources using API. After searching, I found out that only pythonapi was available, and a problem occurred during testing.

I received the following error message:

import dataikuapi

key_id = "?"
key_secret = "?"

# <Cloud vendor> is either AWS, Azure or GCP
client = dataikuapi.fmclient.FMClientAWS("https://xxxx.xxx.xx", key_id, key_secret)
my_template_id = "Default template"
my_network_id = "test"
print(client.list_instances())
error message requests.exceptions.SSLError: HTTPSConnectionPool(host='3.38.94.187', port=443): Max retries exceeded with url: /api/public/tenants/main/instances (Caused by SSLError(SSLCertVerificationError(1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1122)')))

I know it's an ssl related error.

what is key_id, key_secret ?

how to get key_id and key_secret ?

Operating system used: AWS

Answers

  • Turribeach
    Turribeach Dataiku DSS Core Designer, Neuron, Dataiku DSS Adv Designer, Registered, Neuron 2023 Posts: 2,070 Neuron

    This error happens because your Python kernel doesn't trust the SSL certificate of your DSS server. This is likely to be due to not having the correct CA root certificates installed or you are using a self-signed certificate. Install the CA root certificates in your system and have Python use them or use a non-self signed certificate.

    Alternatevely you can ignore the SSL certificate in your client call:

    client = dataikuapi.fmclient.FMClientAWS("https://xxxx.xxx.xx", key_id, key_secret, insecure_tls=True)
    

Setup Info
    Tags
      Help me…