https://github.com/advancedphotonsource/bely
Best Electronic Logbook Yet
https://github.com/advancedphotonsource/bely
Last synced: 28 days ago
JSON representation
Best Electronic Logbook Yet
- Host: GitHub
- URL: https://github.com/advancedphotonsource/bely
- Owner: AdvancedPhotonSource
- License: other
- Created: 2025-08-18T15:29:56.000Z (10 months ago)
- Default Branch: master
- Last Pushed: 2026-03-25T14:06:08.000Z (3 months ago)
- Last Synced: 2026-03-26T16:19:49.391Z (3 months ago)
- Language: Java
- Size: 242 MB
- Stars: 1
- Watchers: 0
- Forks: 1
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Support: support/bin/build_cherrypy.sh
Awesome Lists containing this project
README
# 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:
apt-get install wget gcc git make cmake build-essential libcurses-ocaml-dev curl expect mysql-server libmysqlclient-dev openssl libssl-dev libldap2-dev libsasl2-dev sed gawk unzip
# Deployment
For detailed deployment instructions please refer to our [administrators guide](https://confluence.aps.anl.gov/display/APSUCMS/Administrator+Guide).
**Deployment Procedure:**
# 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).
git clone https://github.com/AdvancedPhotonSource/ComponentDB.git
# Navigate inside the distribution.
cd ComponentDb
# Build support needed for the application
make support
# load enviornment variables with new support built.
source setup.sh
# Create deployment configuration
make configuration
# 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
# 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 clone into it
mkdir $desired_dev_directory
cd $desired_dev_directory
git clone https://github.com/AdvancedPhotonSource/ComponentDB.git
cd ComponentDb
# Getting support software
make support
# Get Netbeans
make support-netbeans
# Load up the environment
source setup.sh
# 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
# Start development
make dev-config
# Open Netbeans
netbeans &
## Preparing Netbeans
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 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
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
# cd into the $desired_dev_directory/$distribution_directory
cp src/java/LogrPortal/lib/mariadb-java-client-3.1.0.jar ../support-`hostname`/netbeans/payara/glassfish/domains/domain1/lib/
```
10. Run the project
## Automated Tests
To get started with running the API test suite the BELY app needs to be running on local machine.
### Prereqs
```sh
# API requirements
pip install -r tools/developer_tools/python-client/test/requirements.txt
```
### Manual Test
```sh
source setup.sh
# Deploy test-db data
make test-db
# Test API
# Navigate to python-client directory
cd tools/developer_tools/python-client/
# Optionally genreate latest version of API.
./generatePyClient.sh http://localhost:8080/bely
# Run tests
pytest test/api_test.py
```
### Single Command Test
This will backup the db, deploy test db, run test, and restore backup.
```sh
source setup.sh
make test
```
# License
[Copyright (c) UChicago Argonne, LLC. All rights reserved.](https://github.com/AdvancedPhotonSource/ComponentDB/blob/master/LICENSE)