Skip to content
This repository has been archived by the owner on Jun 6, 2024. It is now read-only.

[Marketplace] Simplify marketplace setting #5283

Merged
merged 11 commits into from
Feb 5, 2021

Conversation

yiyione
Copy link
Contributor

@yiyione yiyione commented Feb 2, 2021

  1. Admin can deploy marketplace in PAI quick start script (set enable_marketplace: true in config.yaml)
  2. Simplify marketplace settings (only need to set cluster.common.marketplace = "true"
  3. Add prerequisite to marketplace-webportal (require marketplace-restserver) and marketplace-restserver (require marketplace-db)
  4. Will auto add marketplace to webportal-plugins if set cluster.common.marketplace = "true"

Related issue & test cases: microsoft/openpaimarketplace#209 (comment)

@yiyione yiyione requested a review from debuggy February 2, 2021 12:09
@coveralls
Copy link

coveralls commented Feb 2, 2021

Coverage Status

Coverage decreased (-0.01%) to 33.896% when pulling 80b86dc on yiyi/marketplace/simplify_marketplace_setting into 30f21b3 on master.

@@ -91,7 +91,24 @@ spec:
- name: WEBPORTAL_PLUGINS
# A raw JSON formatted value is required here.
value: |
{{ cluster_cfg['webportal']['plugins'] }}
[
{% if cluster_cfg['cluster']['common']['marketplace'] == "true" %}
Copy link
Contributor

Choose a reason for hiding this comment

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

What if:

1. The admin deploys marketplace in a previous version of PAI
2. He upgrades PAI to `v1.6.0`

Will there be two duplicate marketplace entries here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, if the old webportal-plugin still in services-configurations.yaml, there will be two duplicate marketplace entries here.

Copy link
Contributor Author

@yiyione yiyione Feb 3, 2021

Choose a reason for hiding this comment

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

I add an optional config to disable the auto-added marketplace-plugin in webportal.
The admin can avoid the duplicate marketplace entries by it.

@@ -7,6 +7,7 @@ cluster:
data-path: "/datastorage"
qos-switch: "{{ env["cfg"]["qos-switch"] | default('false') }}"
docker-data-root: "{{ env['cfg']['docker_data_root'] | default('/mnt/docker') }}"
marketplace: "true"
Copy link
Contributor

@hzy46 hzy46 Feb 3, 2021

Choose a reason for hiding this comment

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

Maybe marketplace: "false"?

Or we can turn on marketplace by default, but notify all PAI devs in advance.

Copy link
Contributor Author

@yiyione yiyione Feb 4, 2021

Choose a reason for hiding this comment

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

Done, set to "false" by default, and add enable_marketplace: false to config.yaml.

@yiyione yiyione merged commit b8fa587 into master Feb 5, 2021
@yiyione yiyione deleted the yiyi/marketplace/simplify_marketplace_setting branch February 5, 2021 03:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants