Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Add explanation for service binding options #35

Merged
merged 4 commits into from
Sep 9, 2024

Conversation

newtork
Copy link
Contributor

@newtork newtork commented Aug 27, 2024

Context

AI/ai-sdk-java-backlog#56.

Explain options:

  • Regular service binding in SAP BTP Cloud Foundry (resulting in VCAP_SERVICES env var entry).
  • Set an environment variable explicitly: AICORE_SERVICE_KEY
  • Define and use a Destination in BTP Destination Service.
  • Leveraging "user-provided" service binding (currently not recommended).
  • Define and use a custom ServiceBinding or ServiceBindingAccessor declaration in application (not recommended).

I chose to enhance the README.md (instead of starting a new docs/ document).

README.md Outdated Show resolved Hide resolved
README.md Outdated Show resolved Hide resolved
README.md Outdated
Comment on lines 425 to 430
There are multiple options to register the service binding:
* Regular service binding in SAP BTP Cloud Foundry (resulting in `VCAP_SERVICES` env var entry).
* Set an environment variable explicitly: `AICORE_SERVICE_KEY`
* Define and use a _Destination_ in _BTP Destination Service_.
* Leveraging `"user-provided"` service binding (currently not recommended).
* Define and use a custom `ServiceBinding` or `ServiceBindingAccessor` declaration in application (not recommended).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention that option 1 and 4 are Cloud only, not local. The other are both local and Cloud

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've seen devs use VCAP_SERVICES locally. Therefore I would rather not make this distinction explicit here.

README.md Outdated Show resolved Hide resolved

</details>

### Set credentials as dedicated environment variable
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mention that this is recommended if you need to access an external AI Core service instance or for local use

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Currently the README is already almost unreadable with all the details and sample code. I don't want to explain and motivate reasons for the options to resolve a service binding.
Not only because of complexity and readability, but also any documented "reasoning" is subject to change over time. I'm certain we will see changes to best-practices, once the project gains traction.

README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
README.md Show resolved Hide resolved
@newtork newtork merged commit 97b8012 into main Sep 9, 2024
5 checks passed
@newtork newtork deleted the doc/service-binding branch September 9, 2024 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants