Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
fbe6d28
Release another pre-release of BELY API.
iTerminate Mar 3, 2026
9147839
Release dev api.
iTerminate Mar 3, 2026
ec6c334
Resolve tests.
iTerminate Mar 3, 2026
2e1f1ed
Upgrade to latests swagger library.
iTerminate Mar 10, 2026
351ad12
Add more descriptive annotations required by the latest api generator…
iTerminate Mar 10, 2026
6814d55
Update the generated python lib to use latest generator.
iTerminate Mar 10, 2026
af1e25f
Release updated API using the new generator.
iTerminate Mar 10, 2026
bc5a187
Add search tests.
iTerminate Mar 11, 2026
77fbb6d
Update the API to snake case calls.
iTerminate Mar 11, 2026
5e7b9fe
Merge branch 'master' into 2026.3
iTerminate Mar 11, 2026
67ff69c
Add new helper script to set a user password.
iTerminate Mar 11, 2026
a4968d5
Improve search match results that are displayed to the user.
iTerminate Mar 11, 2026
4d26749
Release new APi with all the recent changes.
iTerminate Mar 11, 2026
7ed4d0b
Reorder the user settings page to put notifications at the top.
iTerminate Mar 11, 2026
9ec07dc
Clean up settings. Rorder and hide the setting list for standard users.
iTerminate Mar 11, 2026
f01d7f0
Update support script for newer version of payara
iTerminate Mar 12, 2026
9153041
Ensure to create the produciton domain
iTerminate Mar 12, 2026
8920262
Add some documenation for migration to 2026.3
iTerminate Mar 16, 2026
c8865bd
Add ability to upload attachments to BELY log entries from API.
iTerminate Mar 16, 2026
3a2371a
Add tests for the new functionality.
iTerminate Mar 16, 2026
1cbfdb3
Release new API
iTerminate Mar 16, 2026
4d0a467
Merge pull request #25 from AdvancedPhotonSource/upload-api
iTerminate Mar 16, 2026
de44d5f
Update release notes
iTerminate Mar 16, 2026
9b3cbfd
Make it more clear that the notifications are send using a locally ho…
iTerminate Mar 17, 2026
08ed63e
Notification configuration dialog imporvements.
iTerminate Mar 17, 2026
565a2fc
Fix spelling error fet fetching logbook api
iTerminate Mar 17, 2026
6a8605f
Simplify the provider documantation
iTerminate Mar 17, 2026
80b5915
Clean up the provider column. Not needed.
iTerminate Mar 17, 2026
1cf5065
Release new dev reeleas
iTerminate Mar 18, 2026
7360da1
Update the conda recipe for simplicity
iTerminate Mar 18, 2026
b0e7d95
Update the meta file to suport the updated API
iTerminate Mar 18, 2026
82b0b7c
Add a new checksum attachment endpoint. Can be helpful for verifying …
iTerminate Mar 19, 2026
42dfb90
Update release notes
iTerminate Mar 19, 2026
b0214eb
Add initial builds of of the mqtt-broker-service and the bely-api
iTerminate Mar 19, 2026
8a43972
Resolve API test issues
iTerminate Mar 23, 2026
19ed9d2
Add API for fetching log document by name.
iTerminate Mar 23, 2026
e48adbc
Update release notes
iTerminate Mar 23, 2026
82240ac
Clean up the add log entry dialog.
iTerminate Mar 23, 2026
e9c35f8
Add note about the cleanup to release notes.
iTerminate Mar 23, 2026
42413a3
Resolve the API name changes.
iTerminate Mar 24, 2026
2a0076f
Resolve build issues
iTerminate Mar 24, 2026
35744df
Prepare release 2026.3
iTerminate Mar 25, 2026
54201bf
Resolve mqtt dependency in python build. Code requires 2.0 or newer
iTerminate Mar 25, 2026
c1b8c9d
Prepare release 2026.3
iTerminate Mar 25, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,5 @@ tools/developer_tools/python-client/cdbCli/service/cli/Spreadsheets/
.env
tools/developer_tools/bely-mqtt-message-broker/conda-bld
tools/developer_tools/bely-mqtt-message-broker/dev-config
tools/developer_tools/bely-mqtt-message-broker/conda-recipe/bely-mqtt-env.txt
tools/developer_tools/bely-mqtt-message-broker/conda-recipe/src
72 changes: 34 additions & 38 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
# BELY
# BELY

**Prerequisites:**

In order to deploy or develop BELY, you must have some support software installed. Follow the instructions below to achieve this.

# For red-hat based linux distribution run the following:
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
# For debian based linux distributions run the following:
Expand All @@ -16,79 +16,80 @@ For detailed deployment instructions please refer to our [administrators guide](

# Make a new directory to hold cdb and its support directories. (replace or set DESIRED_CDB_INSTALL_DIRECTORY var with a unix directory.)
mkdir $DESIRED_CDB_INSTALL_DIRECTORY
cd $DESIRED_CDB_INSTALL_DIRECTORY
# get the distribution of Component DB (Alternativelly download a release zip and unzip it).
cd $DESIRED_CDB_INSTALL_DIRECTORY
# get the distribution of Component DB (Alternativelly download a release zip and unzip it).
git clone https://github.com/AdvancedPhotonSource/ComponentDB.git
# Navigate inside the distribution.
# Navigate inside the distribution.
cd ComponentDb
# Build support needed for the application
make support
# load enviornment variables with new support built.
source setup.sh
# load enviornment variables with new support built.
source setup.sh
# Create deployment configuration
make configuration
# Create a clean db for the distribution
# Create a clean db for the distribution
make clean-db
# Prepare web portal configuraiton
make configure-web-portal
# Configure MQTT (optional - needed for notification features)
./sbin/bely_create_mqtt_configuration.sh
./sbin/bely_configure_mqtt_service.sh
# Deploy web portal
make deploy-web-portal
# Deploy REST web service
make deploy-web-service

# All done... output of the command below should print url to the deployed portal.
echo "https://`hostname`:8181/cdb"

# All done... output of the command below should print url to the deployed portal.
echo "https://`hostname`:8181/bely"


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

**Getting Started with development:**

# first make a fork of this project.
# create a desired development directory and cdb into it
# first make a fork of this project.
# create a desired development directory and clone into it
mkdir $desired_dev_directory
cd $desired_dev_directory
git clone https://github.com/AdvancedPhotonSource/ComponentDB.git

# Getting support software
cd ComponentDb
make support

# Getting support software
make support
# Get Netbeans
make support-netbeans

# Load up the environment
# Load up the environment
source setup.sh

# Prepare Dev DB
# mysql could be installed as part of ComponentDB support by running 'make support-mysql'
# Prepare Dev DB
# mysql could be installed as part of support by running 'make support-mysql'
# - Afterwards run `./etc/init.d/cdb-mysql start`
# if you have mysql installed and started run...
make clean-db # sample-db will be coming later
make clean-db

# Start development
make dev-config
make dev-config

# Open Netbeans
netbeans &
netbeans &

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

Expand Down Expand Up @@ -126,10 +127,5 @@ source setup.sh
make test
```

## Python Web Service Development
# Code is located in $desired_dev_directory/ComponentDB/src/python
# For web service development (Use your favorite python editor) to test run web service using:
./sbin/cdbWebService.sh

# License
[Copyright (c) UChicago Argonne, LLC. All rights reserved.](https://github.com/AdvancedPhotonSource/ComponentDB/blob/master/LICENSE)
10 changes: 6 additions & 4 deletions db/sql/static/populate_notification_provider.sql
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
LOCK TABLES `notification_provider` WRITE;
/*!40000 ALTER TABLE `notification_provider` DISABLE KEYS */;
INSERT INTO `notification_provider` VALUES
(1,'apprise', 'Apprise unified notification library supporting email, Discord, Slack, Teams, etc.', '# Apprise Notification URLs

[Apprise](https://github.com/caronc/apprise) supports many notification services. Below are some common URL formats.
(1,'apprise', 'Sends notifications to email, Discord, Slack, Teams, and more.', '# Notification URL Examples

## Email (SMTP)

Expand All @@ -29,6 +27,10 @@ slack://TokenA/TokenB/TokenC/#channel
json://hostname/path
```

For the full list of supported services, see the [Apprise Serivces Page](https://appriseit.com/services).');
For the full list of supported services, see the [Apprise Services Page](https://appriseit.com/services).

---

**Note:** Notifications are powered by [Apprise](https://github.com/caronc/apprise), an open-source notification library hosted locally.');
/*!40000 ALTER TABLE `notification_provider` ENABLE KEYS */;
UNLOCK TABLES;
12 changes: 8 additions & 4 deletions db/sql/updates/dev/2026.3.dev1.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@

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

UPDATE `notification_provider` SET `instructions` = '# Apprise Notification URLs

[Apprise](https://github.com/caronc/apprise) supports many notification services. Below are some common URL formats.
UPDATE `notification_provider` SET
`description` = 'Sends notifications to email, Discord, Slack, Teams, and more.',
`instructions` = '# Notification URL Examples

## Email (SMTP)

Expand All @@ -33,5 +33,9 @@ slack://TokenA/TokenB/TokenC/#channel
json://hostname/path
```

For the full list of supported services, see the [Apprise Serivces Page](https://appriseit.com/services).'
For the full list of supported services, see the [Apprise Services Page](https://appriseit.com/services).

---

**Note:** Notifications are powered by [Apprise](https://github.com/caronc/apprise), an open-source notification library hosted locally.'
WHERE `name` = 'apprise';
10 changes: 6 additions & 4 deletions db/sql/updates/updateTo2026.3.sql
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,7 @@ CREATE TABLE `notification_configuration_handler_setting` (
--

INSERT INTO `notification_provider` VALUES
(1,'apprise', 'Apprise unified notification library supporting email, Discord, Slack, Teams, etc.', '# Apprise Notification URLs

[Apprise](https://github.com/caronc/apprise) supports many notification services. Below are some common URL formats.
(1,'apprise', 'Sends notifications to email, Discord, Slack, Teams, and more.', '# Notification URL Examples

## Email (SMTP)

Expand All @@ -147,7 +145,11 @@ slack://TokenA/TokenB/TokenC/#channel
json://hostname/path
```

For the full list of supported services, see the [Apprise Serivces Page](https://appriseit.com/services).');
For the full list of supported services, see the [Apprise Services Page](https://appriseit.com/services).

---

**Note:** Notifications are powered by [Apprise](https://github.com/caronc/apprise), an open-source notification library hosted locally.');
--
-- Populate notification_handler_config_key
--
Expand Down
7 changes: 7 additions & 0 deletions docs/release-notes/2026.3.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@

- Add notification configuration API.
- Add automatic date parameter conversion for REST API endpoints.
- Add ability to upload attachments to log entries from API.
- Add MD5 checksum endpoint for attachments.
- Add endpoint to fetch log document by name.

## MQTT Integration

Expand Down Expand Up @@ -66,3 +69,7 @@
## Other

- Upgrade Log4j.

## Bugs

- Fix search results returning null logbook type in attribute match map.
71 changes: 71 additions & 0 deletions docs/update/v2026.3.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
# Update BELY to v2026.3
This release contains significant infrastructure changes including an updated Payara installation, MQTT integration for notifications, new notification database tables, and updated search stored procedures.

## UI Improvements
- Cleaned up the add log entry dialog by removing unnecessary labels, resulting in a wider text area while keeping the dialog size the same

# Update Instructions

## 1. Pre-Migration: Stop Services and Backup
```bash
source setup.sh
./etc/init.d/cdb-glassfish stop
make backup
```

## 2. Update Source Code
Pull or download the 2026.3 release, then reload the environment:
```bash
source setup.sh
```

## 3. Reinstall Payara
The Payara installation script has been updated to create a production domain with improved security defaults, keystore configuration, and JVM options.
```bash
# Backup old Payara to dated snapshot
mv $LOGR_SUPPORT_DIR/payara $LOGR_SUPPORT_DIR/payara-$(date +%Y%m%d)

# Copy updated install script into existing support directory
cp support/bin/install_glassfish.sh $LOGR_SUPPORT_DIR/bin/

# Run Payara install (creates production domain, prompts for passwords,
# configures keystores, enables HTTPS/secure admin, sets JVM options)
$LOGR_SUPPORT_DIR/bin/install_glassfish.sh
```

## 4. Configure SSL Certificates (if using custom certs)
If you use custom SSL certificates, re-import them into the new Payara installation:
```bash
./sbin/cdb_update_glassfish_ssl.sh <key_file> <crt_file>
```

## 5. Database Migration
```bash
mysql logr --host=127.0.0.1 --user=logr -p < db/sql/updates/updateTo2026.3.sql
```
This migration adds notification tables, handler configuration tables, and updated search stored procedures.

## 6. Configure MQTT (New in 2026.3)
MQTT integration enables real-time notification features. An MQTT broker service (e.g. Mosquitto) must be running and accessible before configuring MQTT.

```bash
# Create MQTT configuration interactively (saves to $LOGR_INSTALL_DIR/etc/mqtt.conf)
./sbin/bely_create_mqtt_configuration.sh

# Apply MQTT configuration to Payara (deploys RAR, creates pool/resource, tests connection)
./sbin/bely_configure_mqtt_service.sh
```

## 7. Configure and Deploy
```bash
make configure-web-portal
make deploy-cdb-plugin
make deploy-web-portal
```

## 8. Configure MQTT Message Broker (Optional)
The MQTT message broker handler processes notification events (email, Slack, Discord). See `tools/developer_tools/bely-mqtt-message-broker/README.md` for setup details.

## 9. Verification
- Confirm the application is accessible at `https://<hostname>:8181/bely`
- Check Payara logs for MQTT connectivity
2 changes: 1 addition & 1 deletion etc/version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2025.10
2026.3
Loading
Loading