Closed Lumevana closed 4 months ago
Hi @Lumevana,
Here's how to install the client so you can run these queries: MySQL Client Windows MySQL Client Linux
I have now created a wiki page about creating a new user in the database: Added-User-MySQL-Database-Server
Does this solve your problem?
Regards, Kamil Jarmusik
Actually my question is that I didnt find the place where I can enter database user and password in Scada-LTS container.
In my yml file the database section is following: **database: container_name: mysql image: mysql/mysql-server:8.0.32 restart: unless-stopped ports:
Now I assume that I must put newuser and newpassword to context.xml but there is no database section. Only three lines about watched resources. Where I write these new user and password in Scada-LTS?
Hi @Lumevana, First, you need to login to the MySQL server as root, i.e. according to the default configuration, then create a new user according to the instructions. To do this you need a MySQL database client, I recommend DBeaver. After installation and connecting client to the database server from the docker container, you can execute the queries from the instructions.
Steps:
docker-compose up database
)These are links to our wiki, so it's worth taking a look there. :)
Configuration in tomcat
Start container with scadalts, and login to console container:
docker container ps
docker exec -it scadalts_container_id /bin/bash
And next execute command:
mkdir /usr/local/tomcat/logs/conf
cp -ar /usr/local/tomcat/conf/* /usr/local/tomcat/logs/conf/
Stop container, added volume tomcat_conf for scadalts docker services;
Start container and copy files from docker/tomcat_log/conf
to docker/tomcat_conf
;
Restart container;
Now you can modify the configuration file on the host side; ./tomcat_conf/context.xml; https://raw.githubusercontent.com/SCADA-LTS/Scada-LTS/develop/docker/config/context.xml
After changed configuration restart tomcat (=restart container);
Regards, Kamil Jarmusik
Currently the context.xml file looks like this (comments from beginning are excluded):
**
<!-- Default set of monitored resources. If one of these changes, the -->
<!-- web application will be reloaded. -->
<WatchedResource>WEB-INF/web.xml</WatchedResource>
<WatchedResource>WEB-INF/tomcat-web.xml</WatchedResource>
<WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>
<!-- Uncomment this to disable session persistence across Tomcat restarts -->
<!--
<Manager pathname="" />
-->
**
Do I have to manually add section <Resource name="jdbc/scadalts" etc ?
Hi @Lumevana, Yes. Here is an default file for docker: https://raw.githubusercontent.com/SCADA-LTS/Scada-LTS/develop/docker/config/context.xml
We have an installer for Linux, where you configure everything during installation, you to do min manually. https://github.com/SCADA-LTS/linux-installer
Also remember that docker requires specific configuration to be used in a production environment.
Regards, Kamil Jarmusik
OK! I was afraid that I made something totally wrong because context.xml file was empty.
Now I added database section and Scada-LTS is up and running and I was able to log in.
One last question. There is classical BR version UI and modern UI. Modern UI shows that its offline. I'm running it through Cloudflare tunnel. What ports modern UI is using or what is principally different from classical UI?
I'm testing it later next to server without Cloudflare to be sure that everything is OK locally.
@Lumevana, the greatest functionality is on the old UI, here we focus on developing functions and additionally try to transfer them to the new UI. The new UI is in the experimental phase. I understand that I can close the issue?
Yes, this can be closed. Database is changed and connected.
@Lumevana If you are not familiar with using Docker, we do not recommend using it in production. Better to use the installer.
I'm trying to run Scada-LTS with docker compose on Ubuntu server. In yml file I changed database user and passwords because I didnt want to use defaults. But how I can change database user and password in Scada-LTS?
In documentation is described context.xml file change in /config directory but I can see /conf directory and file content is only three lines about watched resources and no database configuration info.
Currently Tomcat will give 404 and saying that "The origin server did not find a current representation for the target resource or is not willing to disclose that one exists."
If I looked into container then the content is there in Scada-LTS directory. Is it problem that database user and password is out of sync between app and database that there is no web app error message?