Skip to content

Commit dcc2d21

Browse files
authored
Merge pull request #24 from AdvancedPhotonSource/2026.3
2026.3
2 parents a0b7e43 + c1b8c9d commit dcc2d21

76 files changed

Lines changed: 1503 additions & 788 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,3 +59,5 @@ tools/developer_tools/python-client/cdbCli/service/cli/Spreadsheets/
5959
.env
6060
tools/developer_tools/bely-mqtt-message-broker/conda-bld
6161
tools/developer_tools/bely-mqtt-message-broker/dev-config
62+
tools/developer_tools/bely-mqtt-message-broker/conda-recipe/bely-mqtt-env.txt
63+
tools/developer_tools/bely-mqtt-message-broker/conda-recipe/src

README.md

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
# BELY
1+
# BELY
22

33
**Prerequisites:**
44

55
In order to deploy or develop BELY, you must have some support software installed. Follow the instructions below to achieve this.
6-
6+
77
# For red-hat based linux distribution run the following:
88
yum install -y gcc libgcc expect zlib-devel openssl-devel openldap-devel readline-devel git make cmake sed gawk autoconf automake wget mysql mysql-libs mysql-server mysql-devel curl unzip
99
# For debian based linux distributions run the following:
@@ -16,79 +16,80 @@ For detailed deployment instructions please refer to our [administrators guide](
1616

1717
# Make a new directory to hold cdb and its support directories. (replace or set DESIRED_CDB_INSTALL_DIRECTORY var with a unix directory.)
1818
mkdir $DESIRED_CDB_INSTALL_DIRECTORY
19-
cd $DESIRED_CDB_INSTALL_DIRECTORY
20-
# get the distribution of Component DB (Alternativelly download a release zip and unzip it).
19+
cd $DESIRED_CDB_INSTALL_DIRECTORY
20+
# get the distribution of Component DB (Alternativelly download a release zip and unzip it).
2121
git clone https://github.com/AdvancedPhotonSource/ComponentDB.git
22-
# Navigate inside the distribution.
22+
# Navigate inside the distribution.
2323
cd ComponentDb
2424
# Build support needed for the application
2525
make support
26-
# load enviornment variables with new support built.
27-
source setup.sh
26+
# load enviornment variables with new support built.
27+
source setup.sh
2828
# Create deployment configuration
2929
make configuration
30-
# Create a clean db for the distribution
30+
# Create a clean db for the distribution
3131
make clean-db
3232
# Prepare web portal configuraiton
3333
make configure-web-portal
34+
# Configure MQTT (optional - needed for notification features)
35+
./sbin/bely_create_mqtt_configuration.sh
36+
./sbin/bely_configure_mqtt_service.sh
3437
# Deploy web portal
3538
make deploy-web-portal
36-
# Deploy REST web service
37-
make deploy-web-service
38-
39-
# All done... output of the command below should print url to the deployed portal.
40-
echo "https://`hostname`:8181/cdb"
39+
40+
# All done... output of the command below should print url to the deployed portal.
41+
echo "https://`hostname`:8181/bely"
4142

4243

4344
# Development
4445
For detailed development instructions please refer to our [developers guide](https://confluence.aps.anl.gov/display/APSUCMS/Developer+Guide).
4546

4647
**Getting Started with development:**
4748

48-
# first make a fork of this project.
49-
# create a desired development directory and cdb into it
49+
# first make a fork of this project.
50+
# create a desired development directory and clone into it
5051
mkdir $desired_dev_directory
5152
cd $desired_dev_directory
5253
git clone https://github.com/AdvancedPhotonSource/ComponentDB.git
53-
54-
# Getting support software
5554
cd ComponentDb
56-
make support
55+
56+
# Getting support software
57+
make support
5758
# Get Netbeans
5859
make support-netbeans
5960

60-
# Load up the environment
61+
# Load up the environment
6162
source setup.sh
6263

63-
# Prepare Dev DB
64-
# mysql could be installed as part of ComponentDB support by running 'make support-mysql'
64+
# Prepare Dev DB
65+
# mysql could be installed as part of support by running 'make support-mysql'
6566
# - Afterwards run `./etc/init.d/cdb-mysql start`
6667
# if you have mysql installed and started run...
67-
make clean-db # sample-db will be coming later
68-
68+
make clean-db
69+
6970
# Start development
70-
make dev-config
71+
make dev-config
7172

7273
# Open Netbeans
73-
netbeans &
74+
netbeans &
7475

7576
## Preparing Netbeans
76-
Once netbeans is open a few steps need to be taken to prepare netbeans for CDB development.
77-
1. Open CDB Project: File > Open Project
77+
Once netbeans is open a few steps need to be taken to prepare netbeans for BELY development.
78+
1. Open BELY Project: File > Open Project
7879
2. Navigate to $desired_dev_directory/ComponentDB/src/java
79-
3. Select CdbWebPortal and hit Open Project
80-
4. Right click on CdbWebPortal top level under projects
80+
3. Select LogrPortal and hit Open Project
81+
4. Right click on LogrPortal top level under projects
8182
5. Click "Resolve Missing Server Problem"
8283
6. Add Server -> Payara Server
8384
- Installation Location: $desired_dev_directory/support-`hostname`/netbeans/payara
8485
- Version: 5.2022.5
85-
- Use the wizard's download
86+
- Use the wizard's download
8687
7. Next -> Use Default Domain Location -> Finish add server instance wizard
8788
8. Select the Newly added "Payara Server"
88-
9. Copy over the required mysql client to new payara server.
89-
```sh
89+
9. Copy over the required mysql client to new payara server.
90+
```sh
9091
# cd into the $desired_dev_directory/$distribution_directory
91-
cp src/java/CdbWebPortal/lib/mariadb-java-client-3.1.0.jar ../support-`hostname`/netbeans/payara/glassfish/domains/domain1/lib/
92+
cp src/java/LogrPortal/lib/mariadb-java-client-3.1.0.jar ../support-`hostname`/netbeans/payara/glassfish/domains/domain1/lib/
9293
```
9394
10. Run the project
9495

@@ -126,10 +127,5 @@ source setup.sh
126127
make test
127128
```
128129

129-
## Python Web Service Development
130-
# Code is located in $desired_dev_directory/ComponentDB/src/python
131-
# For web service development (Use your favorite python editor) to test run web service using:
132-
./sbin/cdbWebService.sh
133-
134130
# License
135131
[Copyright (c) UChicago Argonne, LLC. All rights reserved.](https://github.com/AdvancedPhotonSource/ComponentDB/blob/master/LICENSE)

db/sql/static/populate_notification_provider.sql

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
LOCK TABLES `notification_provider` WRITE;
22
/*!40000 ALTER TABLE `notification_provider` DISABLE KEYS */;
33
INSERT INTO `notification_provider` VALUES
4-
(1,'apprise', 'Apprise unified notification library supporting email, Discord, Slack, Teams, etc.', '# Apprise Notification URLs
5-
6-
[Apprise](https://github.com/caronc/apprise) supports many notification services. Below are some common URL formats.
4+
(1,'apprise', 'Sends notifications to email, Discord, Slack, Teams, and more.', '# Notification URL Examples
75
86
## Email (SMTP)
97
@@ -29,6 +27,10 @@ slack://TokenA/TokenB/TokenC/#channel
2927
json://hostname/path
3028
```
3129
32-
For the full list of supported services, see the [Apprise Serivces Page](https://appriseit.com/services).');
30+
For the full list of supported services, see the [Apprise Services Page](https://appriseit.com/services).
31+
32+
---
33+
34+
**Note:** Notifications are powered by [Apprise](https://github.com/caronc/apprise), an open-source notification library hosted locally.');
3335
/*!40000 ALTER TABLE `notification_provider` ENABLE KEYS */;
3436
UNLOCK TABLES;

db/sql/updates/dev/2026.3.dev1.sql

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
ALTER TABLE `notification_provider` ADD COLUMN `instructions` TEXT DEFAULT NULL;
77

8-
UPDATE `notification_provider` SET `instructions` = '# Apprise Notification URLs
9-
10-
[Apprise](https://github.com/caronc/apprise) supports many notification services. Below are some common URL formats.
8+
UPDATE `notification_provider` SET
9+
`description` = 'Sends notifications to email, Discord, Slack, Teams, and more.',
10+
`instructions` = '# Notification URL Examples
1111
1212
## Email (SMTP)
1313
@@ -33,5 +33,9 @@ slack://TokenA/TokenB/TokenC/#channel
3333
json://hostname/path
3434
```
3535
36-
For the full list of supported services, see the [Apprise Serivces Page](https://appriseit.com/services).'
36+
For the full list of supported services, see the [Apprise Services Page](https://appriseit.com/services).
37+
38+
---
39+
40+
**Note:** Notifications are powered by [Apprise](https://github.com/caronc/apprise), an open-source notification library hosted locally.'
3741
WHERE `name` = 'apprise';

db/sql/updates/updateTo2026.3.sql

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,7 @@ CREATE TABLE `notification_configuration_handler_setting` (
119119
--
120120

121121
INSERT INTO `notification_provider` VALUES
122-
(1,'apprise', 'Apprise unified notification library supporting email, Discord, Slack, Teams, etc.', '# Apprise Notification URLs
123-
124-
[Apprise](https://github.com/caronc/apprise) supports many notification services. Below are some common URL formats.
122+
(1,'apprise', 'Sends notifications to email, Discord, Slack, Teams, and more.', '# Notification URL Examples
125123
126124
## Email (SMTP)
127125
@@ -147,7 +145,11 @@ slack://TokenA/TokenB/TokenC/#channel
147145
json://hostname/path
148146
```
149147
150-
For the full list of supported services, see the [Apprise Serivces Page](https://appriseit.com/services).');
148+
For the full list of supported services, see the [Apprise Services Page](https://appriseit.com/services).
149+
150+
---
151+
152+
**Note:** Notifications are powered by [Apprise](https://github.com/caronc/apprise), an open-source notification library hosted locally.');
151153
--
152154
-- Populate notification_handler_config_key
153155
--

docs/release-notes/2026.3.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525

2626
- Add notification configuration API.
2727
- Add automatic date parameter conversion for REST API endpoints.
28+
- Add ability to upload attachments to log entries from API.
29+
- Add MD5 checksum endpoint for attachments.
30+
- Add endpoint to fetch log document by name.
2831

2932
## MQTT Integration
3033

@@ -66,3 +69,7 @@
6669
## Other
6770

6871
- Upgrade Log4j.
72+
73+
## Bugs
74+
75+
- Fix search results returning null logbook type in attribute match map.

docs/update/v2026.3.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Update BELY to v2026.3
2+
This release contains significant infrastructure changes including an updated Payara installation, MQTT integration for notifications, new notification database tables, and updated search stored procedures.
3+
4+
## UI Improvements
5+
- Cleaned up the add log entry dialog by removing unnecessary labels, resulting in a wider text area while keeping the dialog size the same
6+
7+
# Update Instructions
8+
9+
## 1. Pre-Migration: Stop Services and Backup
10+
```bash
11+
source setup.sh
12+
./etc/init.d/cdb-glassfish stop
13+
make backup
14+
```
15+
16+
## 2. Update Source Code
17+
Pull or download the 2026.3 release, then reload the environment:
18+
```bash
19+
source setup.sh
20+
```
21+
22+
## 3. Reinstall Payara
23+
The Payara installation script has been updated to create a production domain with improved security defaults, keystore configuration, and JVM options.
24+
```bash
25+
# Backup old Payara to dated snapshot
26+
mv $LOGR_SUPPORT_DIR/payara $LOGR_SUPPORT_DIR/payara-$(date +%Y%m%d)
27+
28+
# Copy updated install script into existing support directory
29+
cp support/bin/install_glassfish.sh $LOGR_SUPPORT_DIR/bin/
30+
31+
# Run Payara install (creates production domain, prompts for passwords,
32+
# configures keystores, enables HTTPS/secure admin, sets JVM options)
33+
$LOGR_SUPPORT_DIR/bin/install_glassfish.sh
34+
```
35+
36+
## 4. Configure SSL Certificates (if using custom certs)
37+
If you use custom SSL certificates, re-import them into the new Payara installation:
38+
```bash
39+
./sbin/cdb_update_glassfish_ssl.sh <key_file> <crt_file>
40+
```
41+
42+
## 5. Database Migration
43+
```bash
44+
mysql logr --host=127.0.0.1 --user=logr -p < db/sql/updates/updateTo2026.3.sql
45+
```
46+
This migration adds notification tables, handler configuration tables, and updated search stored procedures.
47+
48+
## 6. Configure MQTT (New in 2026.3)
49+
MQTT integration enables real-time notification features. An MQTT broker service (e.g. Mosquitto) must be running and accessible before configuring MQTT.
50+
51+
```bash
52+
# Create MQTT configuration interactively (saves to $LOGR_INSTALL_DIR/etc/mqtt.conf)
53+
./sbin/bely_create_mqtt_configuration.sh
54+
55+
# Apply MQTT configuration to Payara (deploys RAR, creates pool/resource, tests connection)
56+
./sbin/bely_configure_mqtt_service.sh
57+
```
58+
59+
## 7. Configure and Deploy
60+
```bash
61+
make configure-web-portal
62+
make deploy-cdb-plugin
63+
make deploy-web-portal
64+
```
65+
66+
## 8. Configure MQTT Message Broker (Optional)
67+
The MQTT message broker handler processes notification events (email, Slack, Discord). See `tools/developer_tools/bely-mqtt-message-broker/README.md` for setup details.
68+
69+
## 9. Verification
70+
- Confirm the application is accessible at `https://<hostname>:8181/bely`
71+
- Check Payara logs for MQTT connectivity

etc/version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2025.10
1+
2026.3

0 commit comments

Comments
 (0)