EPICS Home

Experimental Physics and Industrial Control System


 
1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025  Index 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
<== Date ==> <== Thread ==>

Subject: Phoebus Olog and Web Client
From: "Dr. Simon Friederich via Tech-talk" <tech-talk at aps.anl.gov>
To: <tech-talk at aps.anl.gov>
Date: Wed, 2 Oct 2024 21:59:21 +0200
Dear Kunal,
Dear George,
Dear Phoebus-Olog-Team,

Phoebus Olog:
I am currently testing olog as your modern alternative for elog.
Thanks to your example from the repository [1], I have now a running elasticsearch, mongo and olog service.
I can access it via Phoebus with the settings.ini:

    ################################
    # Package org.phoebus.olog.es.api
    #################################
    org.phoebus.logbook/logbook_factory=olog-es
    org.phoebus.olog.es.api/olog_url=https://urldefense.us/v3/__http://testmesaolog:8080/Olog__;!!G_uCfscf7eWS!dso4dmkrF-LWpZlpdNz3MRexqz8vRrLcyJnfweqt58VzNYt-zlwPQTyYVFpwEeDeXJQs8xSu-UMk4ZV4BLuBn_nBCHrJ8zzX$     org.phoebus.olog.es.api/username=user
    org.phoebus.olog.es.api/password=userPass

But I have some further questions I was not able to figure out for myself:
- If I run the olog-docker I am in a demo mode with a user admin and user?
- How do I customize my olog? I have found a cuple of files in phoebus-olog/src/main/resources. You mention a special github repository where only application.properties is used for this [2]. - Can I change these properties any time? (e.g. I need more logbooks, different users or tags?) - How do I add/remove users and/or groups? I do not quite understand the correct syntax in application.properties. Could you provide an example?   E.g. I want admin, operator, rfeng, cryoeng. If it's not mandatory, I don't want to use the LDAP service, unless it makes everything easier.
- Where are the logbooks stored and how would you backup them?
- I have these two docker-managed volumes esdata and mongodata in the docker-compose.yml file. Are these important to backup? - Can I use a mongo-GUI like mongodb compass to manage the logbook or is mongo only a backend? (Sorry for such questions, but I am not familiar with this yet)

Web client:
Then I need to access the logbooks via webbrowser. Hence, I've looked at your phoebus-olog-web-client [3]. Based on your Dockerfile I've set up a docker container in the same network "olognet" where elastic, monogo and olog reside (though the ports are published on localhost) with a docker-compose file:
Dockerfile:

    # Node 18
    FROM node:22-alpine
    # FROM node:18-alpine
    RUN apk update && apk add curl bash
    WORKDIR /app
    ENV PATH=/app/node_modules/.bin:$PATH
    COPY . ./
    RUN npm ci --silent \
        && npx update-browserslist-db@latest
        #  \
        # && npm run build \
        # && npm install -g serve

    # start app
    CMD ["npm", "start"]
    # CMD ["serve", "-s", "build"]

docker-compose.yml

    networks:
      olognet:
        external: true

    services:
      olog-web:
        container_name: "olog-web"
        build: .
        ports:
          - "3000:3000"
          # - "6006:6006" # storybook for testing
        environment:
          TZ: Europe/Berlin
          # REACT_APP_BASE_URL: https://urldefense.us/v3/__http://olog:8080/Olog__;!!G_uCfscf7eWS!dso4dmkrF-LWpZlpdNz3MRexqz8vRrLcyJnfweqt58VzNYt-zlwPQTyYVFpwEeDeXJQs8xSu-UMk4ZV4BLuBn_nBCK794Uuc$ # specified in .env file
        stdin_open: true # docker run -i, debug
        tty: true        # docker run -t, debug
        networks:
          - olognet
        # command: ["/bin/bash"] # debug


I've also copied .env.example to .env and adopted to REACT_APP_BASE_URL=https://urldefense.us/v3/__http://olog:8080/Olog__;!!G_uCfscf7eWS!dso4dmkrF-LWpZlpdNz3MRexqz8vRrLcyJnfweqt58VzNYt-zlwPQTyYVFpwEeDeXJQs8xSu-UMk4ZV4BLuBn_nBCK794Uuc$ . From within the olog-web-container I can ping the olog container and see the expected answer when running curl:     21e0630b20ba:/app# curl https://urldefense.us/v3/__http://olog:8080/Olog__;!!G_uCfscf7eWS!dso4dmkrF-LWpZlpdNz3MRexqz8vRrLcyJnfweqt58VzNYt-zlwPQTyYVFpwEeDeXJQs8xSu-UMk4ZV4BLuBn_nBCK794Uuc$     {
      "name" : "Olog Service",
      "version" : "5.0.0-SNAPSHOT",
      "elastic" : {
        "status" : "Connected",
        "clusterName" : "elasticsearch",
        "clusterUuid" : "h-dKVMuFTJSlXb0gxeFn2w",
        "version" : "co.elastic.clients.elasticsearch._types.ElasticsearchVersionInfo@78b8c4e7",
        "elasticHost" : "elastic",
        "elasticPort" : "9200"
      },
      "mongoDB" : "{type=STANDALONE, servers=[{address=mongo:27017, type=STANDALONE, roundTripTime=0.5 ms, state=CONNECTED}]",
      "serverConfig" : {
        "maxFileSize" : 50.0,
        "maxRequestSize" : 100.0
      }

Yet, if I access the web view on port 3000 it show the error message:
    Search Error
    Could not reach the logbook service

So my question is do you see my mistake or can you tell me how to debug my issue?

Thank you very much in advance
Best regards
Simon

[1] https://urldefense.us/v3/__https://github.com/Olog/phoebus-olog__;!!G_uCfscf7eWS!dso4dmkrF-LWpZlpdNz3MRexqz8vRrLcyJnfweqt58VzNYt-zlwPQTyYVFpwEeDeXJQs8xSu-UMk4ZV4BLuBn_nBCAMBxssS$ [2] https://urldefense.us/v3/__https://github.com/willrogers/olog-es-docker__;!!G_uCfscf7eWS!dso4dmkrF-LWpZlpdNz3MRexqz8vRrLcyJnfweqt58VzNYt-zlwPQTyYVFpwEeDeXJQs8xSu-UMk4ZV4BLuBn_nBCAEkg_SM$ [3] https://urldefense.us/v3/__https://github.com/Olog/phoebus-olog-web-client__;!!G_uCfscf7eWS!dso4dmkrF-LWpZlpdNz3MRexqz8vRrLcyJnfweqt58VzNYt-zlwPQTyYVFpwEeDeXJQs8xSu-UMk4ZV4BLuBn_nBCDdGhnsq$

--
Dr. Simon Friederich
Institute of Nuclear Physics
Collaboration B | MESA
Johannes Gutenberg-Universität Mainz
Johann-Joachim-Becherweg 45
55128 Mainz, Germany

phone: +49 (0)6131 39-23160
E-Mail: s.friederich at uni-mainz.de

Replies:
Re: Phoebus Olog and Web Client Wang, Lin via Tech-talk
Re: Phoebus Olog and Web Client Wang, Lin via Tech-talk

Navigate by Date:
Prev: Phoebus toolbar_entries Dr. Simon Friederich via Tech-talk
Next: Re: [EXTERNAL] Phoebus toolbar_entries Kasemir, Kay via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025 
Navigate by Thread:
Prev: Re: [EXTERNAL] Phoebus toolbar_entries Kasemir, Kay via Tech-talk
Next: Re: Phoebus Olog and Web Client Wang, Lin via Tech-talk
Index: 1994  1995  1996  1997  1998  1999  2000  2001  2002  2003  2004  2005  2006  2007  2008  2009  2010  2011  2012  2013  2014  2015  2016  2017  2018  2019  2020  2021  2022  2023  <20242025