Installing Studio on a Stand-Alone Server
A stand-alone server is a server that does not run SQreamDB based on binary files.
Before You Begin
It is essential you have NodeJS 16 installed.
Installing Studio
Copy the SQreamDB Studio package from SQreamDB Artifactory into the target server.
For access to the SQreamDB Studio package, contact SQreamDB Support.
Extract the package:
tar -xvf sqream-acceleration-studio-<version number>.x86_64.tar.gzNavigate to the new package folder.
cd sqream-admin
Build the configuration file to set up SQreamDB Studio. You can use IP address 127.0.0.1 on a single server.
npm run setup -- -y --host=<SQreamD IP> --port=3108The above command creates the sqream-admin-config.json configuration file in the sqream-admin folder and shows the following output:
Config generated successfully. Run `npm start` to start the app.To make the communication between Studio and SQreamDB secure, in your configuration file do the following:
Change your
portvalue to 3109.Change your
sslflag value to true.The following is an example of the correctly modified configuration file:
{ "debugSqream": false, "webHost": "localhost", "webPort": 8080, "webSslPort": 8443, "logsDirectory": "", "clusterType": "standalone", "dataCollectorUrl": "", "connections": [ { "host": "127.0.0.1", "port":3109, "isCluster": true, "name": "default", "service": "sqream", "ssl":true, "networkTimeout": 60000, "connectionTimeout": 3000 } ] }
Note that for the
hostvalue, it is essential that you use the IP address of your SQreamDB machine.
If you have installed Studio on a server where SQreamDB is already installed, move the sqream-admin-config.json file to /etc/sqream/:
mv sqream-admin-config.json /etc/sqream
Starting Studio
Start Studio by running the following command:
cd /home/sqream/sqream-admin
NODE_ENV=production pm2 start ./server/build/main.js --name=sqream-studio -- start --config-location=/etc/sqream/sqream-admin-config.json
The following output is displayed:
[PM2] Starting /home/sqream/sqream-admin/server/build/main.js in fork_mode (1 instance)
[PM2] Done.
┌─────┬──────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
│ id │ name │ namespace │ version │ mode │ pid │ uptime │ ↺ │ status │ cpu │ mem │ user │ watching │
├─────┼──────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
│ 0 │ sqream-studio │ default │ 0.1.0 │ fork │ 11540 │ 0s │ 0 │ online │ 0% │ 15.6mb │ sqream │ disabled │
└─────┴──────────────────┴─────────────┴─────────┴─────────┴──────────┴────────┴──────┴───────────┴──────────┴──────────┴──────────┴──────────┘
If the sqream-admin-config.json file is not located in /etc/sqream/, run the following command:
cd /home/sqream/sqream-admin NODE_ENV=production pm2 start ./server/build/main.js --name=sqream-studio -- start
To verify the process is running, use the
pm2 listcommand:pm2 list
Verify that Studio is running:
netstat -nltpVerify that SQream_studio is listening on port 8080, as shown below:
(Not all processes could be identified, non-owned process info will not be shown, you would have to be root to see it all.) Active Internet connections (only servers) Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN - tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN - tcp6 0 0 :::8080 :::* LISTEN 11540/sqream-studio tcp6 0 0 :::22 :::* LISTEN - tcp6 0 0 ::1:25 :::* LISTEN -
Verify that you can:
Access Studio from your browser (
http://<IP_Address>:8080)Log in to SQreamDB
Save the configuration to run on boot:
pm2 startupThe following is an example of the output:
sudo env PATH=$PATH:/usr/bin /usr/lib/node_modules/pm2/bin/pm2 startup systemd -u sqream --hp /home/sqreamCopy and paste the output above and run it.
Save the configuration:
pm2 save
Accessing Studio
The Studio page is available on port 8080: http://<server ip>:8080.
If port 8080 is blocked by the server firewall, you can unblock it by running the following command:
firewall-cmd --zone=public --add-port=8080/tcp --permanent firewall-cmd --reload
Maintaining Studio with the Process Manager (PM2)
SQreamDB uses the Process Manager (PM2) to maintain Studio.
You can use PM2 to do one of the following:
To check the PM2 service status:
pm2 listTo restart the PM2 service:
pm2 reload sqream-studioTo see the PM2 service logs:
pm2 logs sqream-studio
Upgrading Studio
To upgrade Studio you need to stop the version that you currently have.
To stop the current version of Studio:
List the process name:
pm2 listThe process name is displayed.:
<process name>Run the following command with the process name:
pm2 stop <process name>If only one process is running, run the following command:
pm2 stop allChange the name of the current sqream-admin folder to the old version:
mv sqream-admin sqream-admin-<old_version>Extract the new Studio version:
tar -xf sqream-acceleration-studio-<version>tar.gzStart PM2:
pm2 start allTo access Studio over a secure (HTTPS) connection, follow NGINX instructions.