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

chore: add BPDM to umbrella chart #106

Merged
merged 3 commits into from
Jul 31, 2024

Conversation

gomezbc
Copy link
Contributor

@gomezbc gomezbc commented Jul 8, 2024

Description

This PR adds BPDM chart to the umbrella repository. Due to incompatible Portal version, I had to bump portal chart to 2.0.0. As mentioned in this issue, eclipse-tractusx/portal#248, in version 1.8.1 of Portal, it calls this enpoint /companies/test-company/v6/ of the gate, which is incompatible with the added gate.

This BPDM is prepared to work with centralidp, but as it is planned for future release eclipse-tractusx/sig-release#751, currently it will return 403 error in BPN step.

eclipse-tractusx/sig-release#710

Pre-review checks

Please ensure to do as many of the following checks as possible, before asking for committer review:

@gomezbc
Copy link
Contributor Author

gomezbc commented Jul 8, 2024

@evegufy

Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

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

Hi @gomezbc thank you so much for the contribution!

@@ -36,7 +36,7 @@ dependencies:
- condition: portal.enabled
name: portal
repository: https://eclipse-tractusx.github.io/charts/dev
version: 1.8.1
version: 2.0.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Could you please restrict your changes to bpdm?
I know it won't work as a whole as long as portal isn't upgrade as well (that's why we work on a separate upgrade branch until all components are ready). I'd upgrade portal, centraldip and sharedidp all together in a separate PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Understood. I'll revert portal version upgrade. I'm ready to help with the portal, centraldip, and sharedidp upgrades if needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Awesome that you offer to support with portal, centralidp and sharedidp! That would be very welcome.
Essentially it would be a take over from the state of the localdev chart here (I already upgraded that). Maybe after this pull request has been merged?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure! In that case, should I create a separate pull request for each component, or do I upgrade them in one?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think one pull request with the upgrade of all 3 components would be also good :)

@gomezbc gomezbc requested a review from evegufy July 8, 2024 17:50
charts/umbrella/Chart.yaml Outdated Show resolved Hide resolved
charts/umbrella/values.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

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

could you pleas also raise the chart version to 0.17.0? (the helm test workflow requires the increment to run https://github.com/eclipse-tractusx/tractus-x-umbrella/actions/runs/9844462507/job/27182944379?pr=106)

@gomezbc gomezbc requested a review from evegufy July 9, 2024 06:53
@gomezbc gomezbc changed the title Chore/BPDM added BPDM to umbrela chart (Forced to update Portal to 2.0.0) Chore/BPDM added BPDM to umbrela chart Jul 9, 2024
@evegufy
Copy link
Contributor

evegufy commented Jul 9, 2024

@gomezbc the review is currently blocked by the merged of #107, after it has been merged it would be great if you could rebase to the upgrade/24.05 branch

@evegufy
Copy link
Contributor

evegufy commented Jul 10, 2024

@gomezbc the review is currently blocked by the merged of #107, after it has been merged it would be great if you could rebase to the upgrade/24.05 branch

@gomezbc the pr #107 has been merged now, could you please rebase? then the helm test workflow should pass the check for chart version bump

@gomezbc
Copy link
Contributor Author

gomezbc commented Jul 10, 2024

@evegufy Done 👍🏼

Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

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

Hi @gomezbc the helm test workflow did its job correctly now :) and uncovered some linting issues, could you please fix them?

@gomezbc
Copy link
Contributor Author

gomezbc commented Jul 10, 2024

@evegufy I have resolved the linting issues. I noticed that other components disable PostgreSQL persistence by default, so I have done the same for the BPDM database.

@gomezbc gomezbc requested a review from evegufy July 10, 2024 22:13
Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

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

one linting issue still:

charts/umbrella/values.yaml
Error: 748:19 [trailing-spaces] trailing spaces

@gomezbc gomezbc requested a review from evegufy July 11, 2024 07:19
@gomezbc
Copy link
Contributor Author

gomezbc commented Jul 12, 2024

Hi @evegufy, the action failed due to a timeout

Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

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

...

@evegufy evegufy requested review from nicoprow and evegufy July 18, 2024 19:35
Copy link
Contributor

@evegufy evegufy left a comment

Choose a reason for hiding this comment

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

Hi @gomezbc sorry for the delay, I finally came around to reviewing again.
When install I'm facing 401 errors for pool, gate and dummy:
logs-from-bpdm-pool-in-umbrella-bpdm-pool-f5bb96f6d-d8xtn.log
logs-from-bpdm-cleaning-service-dummy-in-umbrella-bpdm-cleaning-service-dummy-678cc46bb9-hps8t.log
logs-from-bpdm-gate-in-umbrella-bpdm-gate-6d6cc7fdff-8mnkp.log

This might be due to missing the bdpm config discussed here eclipse-tractusx/portal-backend#819 (comment)

@nicoprow has opened #108 which might contains the config.

@nicoprow
Copy link

Hi @gomezbc sorry for the delay, I finally came around to reviewing again. When install I'm facing 401 errors for pool, gate and dummy: logs-from-bpdm-pool-in-umbrella-bpdm-pool-f5bb96f6d-d8xtn.log logs-from-bpdm-cleaning-service-dummy-in-umbrella-bpdm-cleaning-service-dummy-678cc46bb9-hps8t.log logs-from-bpdm-gate-in-umbrella-bpdm-gate-6d6cc7fdff-8mnkp.log

This might be due to missing the bdpm config discussed here eclipse-tractusx/portal-backend#819 (comment)

@nicoprow has opened #108 which might contains the config.

@gomezbc:

As @evegufy already said, you can use the newest hotfix version for BPDM 5.0.3 with the configuration provided in #108. The files also contain README instructions and a workflow to test the BPDM chart dependency setup.

The new version has the advantage that the postgres does not need to have a fullnameOverride anymore.

The ingress can be changed for BPDM but I experienced compatibility problems with the Portal. At least for the Partner Network page, I discovered that that Portal version has outdated endpoint URLs when trying to access the Pool. I don't see a way to fix that except upgrading the Portal so the correct endpoint paths are used.

I did not try the registration workflow with the Portal, so I don't know which path to the BPDM Gate the Portal expects there.

charts/umbrella/README.md Outdated Show resolved Hide resolved
@gomezbc
Copy link
Contributor Author

gomezbc commented Jul 19, 2024

Hi @nicoprow, thanks for the comments. I have review your configuration and is awesome. As you have a better understanding of BPDM, I think the best approach would be to use your configuration.

Regarding the compatibility with the portal, in my local setup, I had to upgrade to version 2.0.0 to make it compatible with BPDM. Using that version, the registration process works correctly.

As I discussed with @evegufy (#106 (comment)), I will provide an upgrade to the portal, centralidp, and sharedidp. I will try to provide it as soon as I can.

@gomezbc
Copy link
Contributor Author

gomezbc commented Jul 19, 2024

Hi @nicoprow

After creating the PR for the portal version update #110, I switched my configuration to yours to connect the portal with BPDM. However, I encountered some permission issues. Upon comparing the roles required by BPDM with those defined in CentralIdp, I resolved these issues.

The roles you defined for the Gate, Pool, and Orchestrator do not match those used by the CentralIdp sa-cl7-cx-5 client.

For example, here are the roles you set for Gate (Cl16-CX-BPDMGate):

permissions:
  readInputPartner: view_company_data
  writeInputPartner: update_company_data
  readOutputPartner: view_shared_data
  readInputChangelog: view_company_data
  readOutputChangelog: view_shared_data
  readSharingState: view_company_data
  writeSharingState: update_company_data
  read_stats: view_company_data

And here are the roles provided by CentralIdp:

image

To fix the Gate and Pool permissions, I deleted those settings, as the default configuration matches Cl16-CX-BPDMGate and Cl17-CX-BPDM.

For the Orchestrator, I modified the values you set in permissions to these:

permissions:
  createTask: "write_partner"
  readTask: "write_partner"
  reservation:
    clean: "write_partner"
    cleanAndSync: "write_partner"
    poolSync: "write_partner"
  result:
    clean: "write_partner"
    cleanAndSync: "write_partner"
    poolSync: "write_partner"

Warning

I have successfully completed the BPN creation process from the portal using the updated portal version here. It will not be possible to complete the BPN creation process with the portal version defined in this PR.

@evegufy
Copy link
Contributor

evegufy commented Jul 19, 2024

Hi @gomezbc sorry for the delay, I finally came around to reviewing again. When install I'm facing 401 errors for pool, gate and dummy: logs-from-bpdm-pool-in-umbrella-bpdm-pool-f5bb96f6d-d8xtn.log logs-from-bpdm-cleaning-service-dummy-in-umbrella-bpdm-cleaning-service-dummy-678cc46bb9-hps8t.log logs-from-bpdm-gate-in-umbrella-bpdm-gate-6d6cc7fdff-8mnkp.log
This might be due to missing the bdpm config discussed here eclipse-tractusx/portal-backend#819 (comment)
@nicoprow has opened #108 which might contains the config.

@gomezbc:

As @evegufy already said, you can use the newest hotfix version for BPDM 5.0.3 with the configuration provided in #108. The files also contain README instructions and a workflow to test the BPDM chart dependency setup.

The new version has the advantage that the postgres does not need to have a fullnameOverride anymore.

The ingress can be changed for BPDM but I experienced compatibility problems with the Portal. At least for the Partner Network page, I discovered that that Portal version has outdated endpoint URLs when trying to access the Pool. I don't see a way to fix that except upgrading the Portal so the correct endpoint paths are used.

I did not try the registration workflow with the Portal, so I don't know which path to the BPDM Gate the Portal expects there.

Just quickly clarifying on what you mentioned regarding outdated endpoints in the portal: I assume you tested with the version of the portal which is currently still in the main branch of the umbrella repo, which is the portal version 1.8.0 for the release 24.03, that one is expected to be not compatible with the BPDM version for 24.05, the portal version for the 24.05 release is the 2.0.0.
Overview of compatible version for the for R24.05 https://eclipse-tractusx.github.io/CHANGELOG#2405---2024-05-29

@nicoprow
Copy link

Hi @nicoprow

After creating the PR for the portal version update #110, I switched my configuration to yours to connect the portal with BPDM. However, I encountered some permission issues. Upon comparing the roles required by BPDM with those defined in CentralIdp, I resolved these issues.

The roles you defined for the Gate, Pool, and Orchestrator do not match those used by the CentralIdp sa-cl7-cx-5 client.

For example, here are the roles you set for Gate (Cl16-CX-BPDMGate):

permissions:
  readInputPartner: view_company_data
  writeInputPartner: update_company_data
  readOutputPartner: view_shared_data
  readInputChangelog: view_company_data
  readOutputChangelog: view_shared_data
  readSharingState: view_company_data
  writeSharingState: update_company_data
  read_stats: view_company_data

And here are the roles provided by CentralIdp:

image

To fix the Gate and Pool permissions, I deleted those settings, as the default configuration matches Cl16-CX-BPDMGate and Cl17-CX-BPDM.

For the Orchestrator, I modified the values you set in permissions to these:

permissions:
  createTask: "write_partner"
  readTask: "write_partner"
  reservation:
    clean: "write_partner"
    cleanAndSync: "write_partner"
    poolSync: "write_partner"
  result:
    clean: "write_partner"
    cleanAndSync: "write_partner"
    poolSync: "write_partner"

Warning

I have successfully completed the BPN creation process from the portal using the updated portal version here. It will not be possible to complete the BPN creation process with the portal version defined in this PR.

Yea, your permission configuration is exactly right to do for the Central-IDP 24.05 release. Great that you made it work!

If you want you can remove the base-URL overwrite for the BPDM clients as they are able to find each other by service name. I don't think is necessary to change it but I thought I should mention it (see the comment below)

Copy link

@nicoprow nicoprow left a comment

Choose a reason for hiding this comment

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

Comments below as an option to further simplify the configuration.

Since there is now also the values-test-bpdm.yaml inside I would also expect the BPDM chart test to be part of this pull request.

charts/umbrella/values.yaml Outdated Show resolved Hide resolved
charts/umbrella/values.yaml Outdated Show resolved Hide resolved
charts/umbrella/values.yaml Outdated Show resolved Hide resolved
charts/umbrella/values.yaml Outdated Show resolved Hide resolved
@evegufy
Copy link
Contributor

evegufy commented Jul 22, 2024

@evegufy will check out the chart testing

@evegufy evegufy self-assigned this Jul 22, 2024
@evegufy evegufy mentioned this pull request Jul 29, 2024
2 tasks
@evegufy
Copy link
Contributor

evegufy commented Jul 29, 2024

Hi @gomezbc #113 has been merged, could you please add bpdm to the the 1rst test file?

@gomezbc gomezbc force-pushed the upgrade/24.05 branch 2 times, most recently from 1f75ae1 to fd12616 Compare July 29, 2024 11:45
@gomezbc gomezbc force-pushed the upgrade/24.05 branch 6 times, most recently from a5afa79 to cfd8477 Compare July 29, 2024 15:54
@gomezbc gomezbc requested a review from evegufy July 30, 2024 13:17
@gomezbc
Copy link
Contributor Author

gomezbc commented Jul 30, 2024

Hi @gomezbc #113 has been merged, could you please add bpdm to the the 1rst test file?

Done! 😀

@evegufy evegufy changed the title Chore/BPDM added BPDM to umbrela chart chore: add BPDM to umbrella chart Jul 31, 2024
@evegufy
Copy link
Contributor

evegufy commented Jul 31, 2024

Hi @gomezbc #113 has been merged, could you please add bpdm to the the 1rst test file?

Done! 😀

Awesome :)

@evegufy evegufy merged commit de9e9a2 into eclipse-tractusx:upgrade/24.05 Jul 31, 2024
4 checks passed
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