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

webportal do not work for v1.6.0 #5455

Closed
siaimes opened this issue Apr 27, 2021 · 8 comments
Closed

webportal do not work for v1.6.0 #5455

siaimes opened this issue Apr 27, 2021 · 8 comments

Comments

@siaimes
Copy link
Contributor

siaimes commented Apr 27, 2021

Organization Name:

Short summary about the issue/question:
After config marketplace based on this comment. The link https://master_ip/marketplace/api/ and https://master_ip/marketplace/plugin.js can work well.

but webportal config based on this how to does not work.

related section of service file.

cluster:
  common:
    cluster-id: pai
    cluster-type: k8s
    k8s-rbac: "true"
    job-history: "true"
    data-path: "/datastorage"
    qos-switch: "false"
    docker-data-root: "/mnt/docker"
    marketplace: "true"
webportal:
  server-port: 9286

  plugins:
  - title: Marketplace
    uri: /marketplace/plugin.js

marketplace-webportal:
  marketplace_api_uri: https://master_ip/marketplace/api

Brief what process you are following:

How to reproduce it:

OpenPAI Environment:

  • OpenPAI version: v1.6.0
  • Cloud provider or hardware configuration:
  • OS (e.g. from /etc/os-release):
  • Kernel (e.g. uname -a):
  • Hardware (e.g. core number, memory size, storage size, GPU type etc.):
  • Others:

Anything else we need to know:

@siaimes
Copy link
Contributor Author

siaimes commented Apr 27, 2021

image

@debuggy
Copy link
Contributor

debuggy commented Apr 28, 2021

could you start a dev-box, go to /pai and run commands:
paictl.py service stop -n marketplace-db marketplace-restserver marketplace-webportal
paictl.py service start -n marketplace-db marketplace-restserver marketplace-webportal

to see the results? It is recommended to use dev-box manage the pai cluster after using quick-start deployment.

@siaimes
Copy link
Contributor Author

siaimes commented Apr 28, 2021

could you start a dev-box, go to /pai and run commands:
paictl.py service stop -n marketplace-db marketplace-restserver marketplace-webportal
paictl.py service start -n marketplace-db marketplace-restserver marketplace-webportal

to see the results? It is recommended to use dev-box manage the pai cluster after using quick-start deployment.

I have run these two commands, and these three containers are already working. The link https://master_ip/marketplace/api/ and https://master_ip/marketplace/plugin.js can return files successfully.

My problem is that the plugin is not displayed on the homepage.

And, this issue is more urgent, can you take a look, thank you.

@yiyione
Copy link
Contributor

yiyione commented Apr 28, 2021

could you start a dev-box, go to /pai and run commands:
paictl.py service stop -n marketplace-db marketplace-restserver marketplace-webportal
paictl.py service start -n marketplace-db marketplace-restserver marketplace-webportal
to see the results? It is recommended to use dev-box manage the pai cluster after using quick-start deployment.

I have run these two commands, and these three containers are already working. The link https://master_ip/marketplace/api/ and https://master_ip/marketplace/plugin.js can return files successfully.

My problem is that the plugin is not displayed on the homepage.

And, this issue is more urgent, can you take a look, thank you.

Looks like you have resolve #5457, thanks for your answer , and we are going to fix the ansible version in deployment (or you can submit PRs if you want).
And for this issue can you try to visit the page https://<master_ip>/plugin.html?index=0 ?

@yiyione
Copy link
Contributor

yiyione commented Apr 28, 2021

is there any error in console after Press 'F12' & refresh the page ?

@siaimes
Copy link
Contributor Author

siaimes commented Apr 28, 2021

is there any error in console after Press 'F12' & refresh the page ?

image

@yiyione
Copy link
Contributor

yiyione commented Apr 28, 2021

Looks like the configuration of webportal plugin miss the id, can you try to add an id like this:

webportal:
  server-port: 9286

  plugins:
  - id: marketplace 
    title: Marketplace
    uri: /marketplace/plugin.js

@siaimes
Copy link
Contributor Author

siaimes commented Apr 28, 2021

Looks like the configuration of webportal plugin miss the id, can you try to add an id like this:

webportal:
  server-port: 9286

  plugins:
  - id: marketplace 
    title: Marketplace
    uri: /marketplace/plugin.js

After I added the id according to this configuration, something strange happened.

window.PAI_PLUGINS = [[

  {
    "id": "marketplace",
    "title": "Marketplace",

    "uri": "https://master_id/marketplace/plugin.js"

  },



    {'uri': '/marketplace/plugin.js', 'id': 'marketplace', 'title': 'Marketplace'},


]
][0] || [];

Then I directly deleted this part of the configuration and everything was normal.

@yiyione Thanks.

@siaimes siaimes closed this as completed Apr 28, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants