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

[Question] How to deploy dashboard ? #3587

Closed
1 task done
HadesKing opened this issue Mar 31, 2023 · 13 comments
Closed
1 task done

[Question] How to deploy dashboard ? #3587

HadesKing opened this issue Mar 31, 2023 · 13 comments
Labels
question Further information is requested

Comments

@HadesKing
Copy link

Search before asking

  • I had searched in the issues and found no similar issues.

Question

When I wanted to run and deploy dashboard on my computer, I had some problems.

  1. After I studied the tutorial (https://eventmesh.apache.org/docs/instruction/runtime-with-docker), I deployed runtime in a virtual machine (it works fine. I wrote a demo based on the http protocol that also works well.)
  2. Then I opened the dashboard project source code using the IDE (VS Code) and executed the command npm run dev.
  3. Then use google browser to visit https://localhost:3000/ as the following picture shows.

I don't know how to do the next step, what is https://localhost:10106? What should I fill in?

image

Help me, thanks.

@HadesKing HadesKing added the question Further information is requested label Mar 31, 2023
@github-actions
Copy link
Contributor

Welcome to the Apache EventMesh community!!
We are glad that you are contributing by opening this issue. :D

Please make sure to include all the relevant context.
We will be here shortly.

If you are interested in contributing to our project, please let us know!
You can check out our contributing guide on contributing to EventMesh.

Want to get closer to the community?

WeChat Assistant WeChat Public Account Slack
Join Slack Chat

Mailing Lists:

Name Description Subscribe Unsubscribe Archive
Users User support and questions mailing list Subscribe Unsubscribe Mail Archives
Development Development related discussions Subscribe Unsubscribe Mail Archives
Commits All commits to repositories Subscribe Unsubscribe Mail Archives

@mxsm
Copy link
Member

mxsm commented Apr 1, 2023

@HadesKing If you are using the 1.4.0 version of EventMesh Docker, you may have trouble connecting to the dashboard because the image does not expose port 10106 for admin access. The current solution is to build a Docker image using the latest EventMesh code and run the updated image, which should allow you to connect to the dashboard.
image
image
docker run on WSL.
The current dashboard does not load the admin address through the local configuration file, but the address can be modified in the Endpoint.tsx file.
image

Dockerfile

FROM openjdk:8u111-jdk

MAINTAINER mxsm [email protected]

WORKDIR /data
RUN mkdir /data/app
ADD eventmesh-1.8.0-release.tar.gz  /data/app/eventmesh
WORKDIR /data/app/eventmesh/bin

EXPOSE 10000
EXPOSE 10105
EXPOSE 10106

ENV DOCKER true

CMD bash start.sh

@HadesKing
Copy link
Author

HadesKing commented Apr 2, 2023

Thank you for your reply!

  1. What is it ? What files are in this package ?

image

  1. Is start.sh ?
    https://github.com/apache/eventmesh/blob/1.3.0/eventmesh-runtime/bin/start.sh

@HadesKing
Copy link
Author

HadesKing commented Apr 4, 2023

@mxsm
Solved.
Prerequisites: You need to read this tutorial and install rocketmq first.(https://eventmesh.apache.org/docs/instruction/store-with-docker)
Here are the steps I took to solve this problem.
First, you need a runtime image of the latest code(from https://github.com/apache/eventmesh ) . Since in the 1.4.0 eventmesh image there is no expose 10106 port open, you need to make your own image)

  1. Open cmd in the root directory and use these command.
    gradlew.bat clean jar dist
    gradlew.bat installPlugin
    gradlew.bat tar
  2. You can see a tar.gz archive in the build directory.
  3. Use Dockerfile to package the image, its content is this.
FROM openjdk:8u111-jdk
MAINTAINER mxsm [email protected]

WORKDIR /data
RUN mkdir /data/app
ADD eventmesh-1.8.0-release.tar.gz  /data/app/eventmesh
WORKDIR /data/app/eventmesh/bin

EXPOSE 10000
EXPOSE 10105
EXPOSE 10106

ENV DOCKER true

CMD bash start.sh
  1. Excute a docker command.
    docker build -t apache-eventmesh-runtime:20230404-1 .
    Congratulations. You can get an event mesh image.

  2. Run this image.

docker run -d -p 10000:10000 -p 10105:10105 -p 10106:10106 \
-v /data/eventmesh/rocketmq/conf/eventmesh.properties:/data/app/eventmesh/conf/eventmesh.properties \
-v /data/eventmesh/rocketmq/conf/rocketmq-client.properties:/data/app/eventmesh/conf/rocketmq-client.properties \
apache-eventmesh-runtime:20230404-1

Second,download the dashboard source code.(Is a zip package from https://github.com/apache/eventmesh-dashboard.)
Open the source code of dashboard using VS Code(or other IDEs).

  1. Run the following command in the terminal.(Wait a few minutes.)
    npm install next react react-dom
  2. Then execute the command.
    npm run dev
  3. Open https://localhost:3000 in your browser and configure the address for runtime(and use 10106 port).

The end!

@HattoriHenzo
Copy link
Contributor

HattoriHenzo commented Apr 21, 2023

@HadesKing Thanks for this documentation. I am on Windows and in my case I have reproduced those steps but I have an error:

image

Is your Dockerfile is in the docker folder or in the root folder?

@xwm1992
Copy link
Contributor

xwm1992 commented Apr 24, 2023

@HadesKing Thanks for this documentation. I am on Windows and in my case I have reproduced those steps but I have an error:

image

Is your Dockerfile is in the docker folder or in the root folder?

you need make the tar.gz package and the dockerfile same directory.

@HadesKing
Copy link
Author

@HadesKing Thanks for this documentation. I am on Windows and in my case I have reproduced those steps but I have an error:

image

Is your Dockerfile is in the docker folder or in the root folder?

@xwm1992 Yes.
@HattoriHenzo you need make the tar.gz package and the dockerfile same directory.

@HattoriHenzo
Copy link
Contributor

@xwm1992 it works fine on my Windows pc. Thanks

@brampurnot
Copy link

Has anyone succeeded in making this work with an HTTPS connection? I deployed event mesh on K8S and exposed it over Istio. The API endpoints are working fine but it keeps on returning an HTTP 404 when I try to configure it in the dashboard.

Not sure what the problem is so before I debug it a bit more, I would like to know if others faced issues with this.

Bram

@Pil0tXia
Copy link
Member

@brampurnot May you please provide some debug logs? It will be helpful.

Dashboard now only supports localhost connection. It will support connecting to any instance in the near future.

@brampurnot
Copy link

brampurnot commented Dec 17, 2023

Hi @Pil0tXia ,
It's a bit strange but it actually works. I think something might be wrong with the error message in the dashboard. When you enter the URL and click on save, it shows the error as you can see on the screenshot:
Screenshot 2023-12-17 at 20 00 38

However after a while, I noticed that the configuration and the metrics started populating so it seems to work. Could it be that the /client endpoint does not exist? Because that's the endpoint it calls when you click on save:
Screenshot 2023-12-17 at 20 04 41

Bram

@Pil0tXia
Copy link
Member

@brampurnot It is a known issue for us and we have already assigned a develeoper to resolve it. For now the only way to use the dashboard properly is to access it from a machine that has Runtime started.

@brampurnot
Copy link

Ok thanks for the info!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

6 participants