To build relocatable tar.gz
that can be run on Ubuntu 18.04/20.04, CentOS 7/8, follow these directions.
- Make sure that Docker is installed and properly configured see installation instructions
- Clone scidap-satellite repository and switch to the branch/tag/commit you want to build from. Note, all local changes in the
build-scripts
directory will be included in the bundle.git clone https://github.com/datirium/scidap-satellite cd scidap-satellite
- Set
BITBUCKET_USER
andBITBUCKET_PASS
environment variables to pull NJS-Client from scidapSatelliteInteractions. Note, we do not build from the local scidapSatelliteInteractions repository. - Enter directory with the build scripts and run
build_linux_in_docker.sh
cd build-scripts ./build_linux_in_docker.sh
By default Ubuntu 18.04 will be used as a building environment. Alternatively, you can provide other docker images, such as
ubuntu:18.04
,ubuntu:20.04
,centos:7
, orcentos:8
in the first argument of the script.
After script finishes running, you will find a compressed scidap-satellite-commitsha-ubuntu.tar.gz
in the ./bundle
folder. All the temporary data will be kept in ./build
and can be removed.
To run relocatable tar.gz
on Ubuntu 18.04/20.04, CentOS 7/8, follow these directions.
- Make sure that Docker is installed and properly configured see installation instructions
- Uncompress
scidap-satellite-commitsha-ubuntu.tar.gz
into an empty folder and startpm2
with./configs/ecosystem.config.js
file. See how to provide custom settings location at the end of this section.mkdir satellite mv scidap-satellite-commitsha-ubuntu.tar.gz satellite # initial location of scidap-satellite.tar.gz might be different cd satellite tar xzf scidap-satellite-commitsha-ubuntu.tar.gz ./pm2 start ./configs/ecosystem.config.js
To test relocatable tar.gz
on Ubuntu 18.04/20.04, CentOS 7/8, follow these directions.
- Enter directory with the build scripts and run
test_linux_bundle.sh
with the absolute path to thescidap-satellite-commitsha-ubuntu.tar.gz
and Docker image to run tests in (ubuntu:18.04
,ubuntu:20.04
,centos:7
, orcentos:8
)cd build-scripts ./test_linux_bundle.sh /absolute/path/scidap-satellite-commitsha-ubuntu.tar.gz ubuntu:20.04
After script finishes running, you will find all logs in the ./temp
folder. The exit code can be checked with echo $?
Default configuration is saved in the ./configs/scidap_default_settings.json
file. Custom configuration can be loaded from the file set in SCIDAP_SETTINGS
environment variable, ../scidap_settings.json
or ~/.config/scidap-satellite/scidap_settings.json
.
- When running on CentOS Aria2c complains about certificates, update settings to include path to the certificate file
"aria2cSettings": { "--ca-certificate": "/etc/ssl/certs/ca-bundle.crt" }
- This shouldn't happen anymore, but If
libssl.so.1.0.0
and/orlibcrypto.so.1.0.0
are not found, report a bug, and then download them from the provided links below and save into the folder from thedefaultLocations.airflow
field of the the settings file. UpdategetAirflowEnvVar(settings)
function from./utilities/configure.js
file to includeLD_LIBRARY_PATH: settings.defaultLocations.airflow
. https://scidap.nyc3.digitaloceanspaces.com/centos/libcrypto.so.1.0.0 https://scidap.nyc3.digitaloceanspaces.com/centos/libssl.so.1.0.0 - Aria2c fails to download files with ExitCode 8. The possible reason for this issue to appear is not being able to resume not finished download when proxy doesn’t support download resume. For more details about this issue and how to check whether your proxy supports download resume, see Problem with Aria2c running behind the proxy.
- To manually replace CWL-Airflow in the already installed SciDAP Satellite bundle for Ubuntu/CentOS, download the required version of packed for Linux CWL-Airflow from the correspondent release, for example, from v1.2.11, extract it, and replace the content of cwl-airflow directory of your satellite bundle with the content of just extracted python3 directory.
To build Electron App on macOS follow these directions.
- Install required dependencies.
brew install git brew install node@12 npm install -g @nestjs/cli
- Clone
scidap-satellite
repository. Install node modules.git clone https://github.com/datirium/scidap-satellite.git cd scidap-satellite npm install
- Create a text file
.env
in the./build-scripts
folder. Add there eitherNJS_CLIENT_LOCAL_PATH
to buildscidapSatelliteInteractions
from the local repository, or a pair ofBITBUCKET_USER
andBITBUCKET_PASS
variables to clone it from Bitbucket.NJS_CLIENT_LOCAL_PATH
should point to thescidap-satellite
subdir as we don't need to buildapisync
. Optionally, the default programs versions used in the script can be redefined in.env
file. - Run
build_macos.sh
script inside the./build-scripts
folder. Pack results into App. Useelectron:mac:prod
orelectron:mac:dev
depending on whether you want to connect tohttps://api.scidap.com/
orhttps://api-dev.scidap.com/
.cd ./build-scripts ./build_macos.sh cd .. npm run electron:mac:prod # or electron:mac:dev for dev version
After script finishes running, you will find a scidap-satellite.app
in ./release/mac
folder. All the temporary data is kept in ../build
folder and can be removed unless you want to save some time when rerunning build_macos.sh
script next time. When component versions are updated, remove ../build
folder. Services
folder is used to save all necessary files before assembling application. This folder is cleaned on each build_macos.sh
run.
To run Electron App on macOS with installed and configured Docker right-click on scidap-satellite.app
and select Open
.
In case you by mistake run build_ubuntu.sh
script, you will need to remove node_modules
, build
, build_ubuntu
, Services
, ubuntu_post_build
folders in the root of you repository and rerun npm install
, build_macos.sh
and npm run electron:mac
commands as it's listed above.
The default configuration file from ./configs/scidap_default_settings.json
will be used by Electron for generating config.json
.
defaultLocations.airflow
anddefaultLocations.pgdata
define the locations for airflow configuration and PostreSQL database files correspondingly. If they are set as relative paths, they by default will be resolved based on thesatelliteSettings.systemRoot
. However, for macOS bundle ifsatelliteSettings.systemRoot
was changed from the Satellite data directory parameter in the Common settings tab, thedefaultLocations.airflow
anddefaultLocations.pgdata
won't be re-evaluated.satelliteSettings
section is mainly used by NJS-Client. On macOSrcServerToken
shouldn't be set, as it will be read from Keychain.systemRoot
defines the location where all analyses data will be saved. If it's set as a relative path, it will be resolved based on the user's home directory. Theremotes
section includeslocalfiles
field withshow
set tofalse
by default. This tells NJS-Client to disable access from UI to the local directories set as thecollection
items. Ifshow
set totrue
all relativepath
will be resolved based on thesatelliteSettings.systemRoot
value.- all parameters from
airflowSettings
section will be applied toairflow scheduler
andcwl-airflow api
. It may include any valid parameter fromairflow.cfg
in a form of"section__parameter": "value"
. - all parameters from
aria2cSettings
section will be applied toaria2c
. It may include any valid for Aria2c argument in a form of"--flag": "value"
. Note, as it was described here Problem with Aria2c running behind the proxy, when running behind proxy that doesn’t support download resume, at least the "--proxy-method": "tunnel" settings should be added. databaseSettings
section defines parameters for the running PostgreSQL database, that is always bound to127.0.0.1
so it's safe keep default values unless additional security measures needed.devel
section defines parameters used during developing. Currently, it includes onlysimulation
andmac_update_from_devel
parameters. The former allows to shortcut CWL-Airflow API without triggering any DAGs. The latter makes macOS build to check for the developers updates (different location on our DigitalOcean).
{
"defaultLocations": {
"airflow": "airflow",
"pgdata": "pgdata"
},
"satelliteSettings": {
"rcServerToken": "",
"rcServer": "dev.scidap.com:8080",
"port": 3069,
"airflowAPIPort": 8080,
"systemRoot": "./scidap",
"aria2cPort": 6800,
"pm2Port": 9615,
"enableSSL": true,
"localFiles": true,
"proxy": "",
"noProxy": "",
"remotes": {
"directurl": {
"protocol": [
"ftp",
"http",
"https"
],
"caption": "ftp"
},
"geo": {
"protocol": "geo",
"caption": "geo"
},
"localfiles": {
"show": false,
"collection": [
{
"path": "upload",
"name": "localfiles"
}
]
}
}
},
"airflowSettings": {
"core__executor": "LocalExecutor",
"core__parallelism": 1,
"core__dag_concurrency": 1,
"core__max_active_runs_per_dag": 1,
"core__hostname_callable": "socket.gethostname"
},
"aria2cSettings": {
"--console-log-level": "debug",
"--remove-control-file": true,
"--allow-overwrite": true,
"--auto-file-renaming": false
},
"databaseSettings":{
"db_port": 5432,
"db_user": "airflow",
"db_password": "airflow",
"db_name": "airflow"
},
"devel":{
"simulation": false,
"mac_update_from_devel": false
}
}