Closed juju4 closed 1 year ago
One item we've struggled to document is that when setting the config
section of an integration in the config.yaml file, we have to convert the format a bit from the normal format we would place in a .env file to accommodate .yaml file conventions. This means that where our Azure integration would normally have a .env file like:
CLIENT_ID=app_registration_service_principal_client_id CLIENT_SECRET=app_registration_service_principal_client_secret DIRECTORY_ID=development_directory_id SUBSCRIPTION_ID=development_subscription_id INGEST_ACTIVE_DIRECTORY=true INGEST_RESOURCE_MANAGER=true
We would need to switch it to look something like this for the Starbase .yaml file:
name: graph-azure
instanceId: testAzureInstance
directory: ./.integrations/graph-azure
gitRemoteUrl: https://github.com/JupiterOne/graph-azure.git
config:
CLIENT_ID: app_registration_service_principal_client_id
CLIENT_SECRET: app_registration_service_principal_client_secret
DIRECTORY_ID: development_directory_id
SUBSCRIPTION_ID: development_subscription_id
INGEST_ACTIVE_DIRECTORY: true
INGEST_RESOURCE_MANAGER: true
The biggest difference is that we separate the config properties from their values with a colon in the .yaml file instead of the normal equals sign we would use in a .env file.
Would you be able to double check your config.yaml and see if that is at all related to the error you're getting?
Thanks. After checking, yes, that's it. I think a contributing factor is sometimes it is not clear part of documentation if it is just for .env or yaml file. Also, it seems some entries like CLIENT_ID, CLIENT_SECRET, or DIRECTORY_ID must be string. Enclosing in single quotes, worked fine. strangely not SUBSCRIPTION_ID.
It would be good to have a validate/configcheck option (something like yarn starbase configcheck
) to ensure configuration is correctly formatted and operational. That could be used inside automation tool like ansible to automatically validate config when deploying.
After, still failing setup because of nodejs 14 to 18 switch.
Any way to use an older version of integration?
I tried gitRemoteUrl: https://github.com/JupiterOne/graph-azure.git@vX.Y.Z
but it did not help. starbase is still picking latest release.
Unfortunately we don't currently have a method for pulling a specific release yet. We've captured that in the past as a new feature to add but haven't had availability to get to it yet.
For your node version error, are you using Starbase version 0.7.0 or the latest 0.9.0? The older version 0.7.0 that you have listed in your initial issue comment was before the transition to node 18 and should be working without any node version errors with integrations like our graph-azure integration that haven't been updated to node 18 yet.
My current test system is 0.7.0. Testing both in CI but one of the integration was already transitioned to nodejs 18 and thus not working. If only azure one, fine. Thanks a lot for the help. Closing.
Thanks for sharing this project. I'm currently testing it and getting above error at starbase setup or run with azure integration and another. Problem is there is no field type in my config.yaml, nor I see one in the docs. Config setup following https://github.com/JupiterOne/graph-azure/blob/main/docs/development.md#azure-setup-for-integration
Not sure if I miss something.
(starbase v0.7.0)