Skip to content
Snippets Groups Projects
Commit 6c256258 authored by felmer's avatar felmer
Browse files

Merge branch 'master' of sissource.ethz.ch:sispub/openbis

parents 3bdcd79c c7a5849d
No related branches found
No related tags found
No related merge requests found
Showing
with 630 additions and 7 deletions
includeFlat 'commonbase', 'common', 'openbis_api', 'openbis-common', 'authentication', 'dbmigration', 'openbis',
'datastore_server', 'screening', 'rtd_phosphonetx', 'deep_sequencing_unit', 'rtd_yeastx',
'openbis_standard_technologies', 'installation', 'image_readers', 'ui-test', 'js-test', 'datamover',
'plasmid', 'rtd_cina', 'openbis_oai_pmh', 'big_data_link_server'
'plasmid', 'rtd_cina', 'openbis_oai_pmh', 'big_data_link_server', 'openbis_ng_ui'
includeFlat 'commonbase', 'common',
'openbis_api', 'openbis-common', 'authentication', 'dbmigration', 'openbis',
'datastore_server', 'screening', 'rtd_yeastx', 'rtd_phosphonetx', 'deep_sequencing_unit', 'plasmid',
'openbis_standard_technologies', 'big_data_link_server'
'openbis_standard_technologies', 'big_data_link_server', 'openbis_ng_ui'
......@@ -63,10 +63,9 @@ public class Migration
private static final String OPENBIS_LOCAL_DEV = "http://localhost:8888";
private static final String OPENBIS_LOCAL_PROD = "https://localhost:8443";
private static final String OPENBIS_SCU = "https://openbis-scu.ethz.ch";
private static final String OPENBIS_URL = OPENBIS_LOCAL_DEV + "/openbis/openbis" + IApplicationServerApi.SERVICE_URL;
private static final int TIMEOUT = 300000;
private static final String OPENBIS_SCU_TEST = "https://bs-lamp09.ethz.ch:8443/";
private static final int TIMEOUT = Integer.MAX_VALUE;
private static final List<String> EXCLUDE_SPACES = Collections.EMPTY_LIST;
......@@ -80,7 +79,7 @@ public class Migration
doTheWork(COMMIT_CHANGES_TO_OPENBIS, URL, user, pass, true, true, true);
} else {
System.out.println("Example: java -jar microscopy_migration_tool.jar https://openbis-domain.ethz.ch user password");
//doTheWork(true, OPENBIS_URL, "pontia", "a", true, true, true);
doTheWork(false, OPENBIS_SCU_TEST + "/openbis/openbis" + IApplicationServerApi.SERVICE_URL, "migration", "migrationtool", true, true, true);
}
}
......@@ -89,6 +88,15 @@ public class Migration
SslCertificateHelper.trustAnyCertificate(URL);
IApplicationServerApi v3 = HttpInvokerUtils.createServiceStub(IApplicationServerApi.class, URL, TIMEOUT);
String sessionToken = v3.login(userId, pass);
Map<String, String> serverInfo = v3.getServerInformation(sessionToken);
if(serverInfo.containsKey("project-samples-enabled") && serverInfo.get("project-samples-enabled").equals("true")) {
System.out.println("Project samples enabled.");
} else {
System.out.println("Enable project samples before running the migration.");
return;
}
if(installELNTypes) {
installELNTypes(sessionToken, v3, COMMIT_CHANGES_TO_OPENBIS);
}
......
.vagrant
.project
.settings
ubuntu-bionic-18.04-cloudimg-console.log
nodejs
node_modules
.gradle
.DS_Store
build
package-lock.json
# openBIS - prototypes for new UI
## Setting up the environment
1. Install latest version of VirtualBox (https://www.virtualbox.org)
2. Install latest version of Vagrant (https://www.vagrantup.com/downloads.html)
3. vagrant plugin install vagrant-vbguest vagrant-notify-forwarder vagrant-disksize
4. cd env/dev
5. vagrant up
6. Browse to https://localhost:8122/openbis and accept the self-signed certificate
* openBIS is now running at https://localhost:8122/openbis (login: admin/password)
* React proto is now running at http://localhost:8124
## Additional info for Linux users
On Ubuntu (and maybe on other Linux distributions, too), you might get errors like this when running "vagrant up":
terminate called after throwing an instance of 'std::runtime_error'
what(): Could not add watch
This situation will prevent the development environment from working properly. The reason for the error is https://github.com/mhallin/vagrant-notify-forwarder/issues/5. It can be fixed by increasing the maximum number of watches on the host system. On Ubuntu, this is done like this:
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
buildscript {
repositories {
mavenCentral()
maven {
url "https://plugins.gradle.org/m2/"
}
}
}
configure(allprojects) {
apply plugin:'base'
task wrapper(type: Wrapper) {
gradleVersion = '4.10'
}
repositories {
mavenCentral()
}
}
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure("2") do |config|
config.vm.box = "ubuntu/bionic64"
config.vm.box_version = "20180531.0.0"
config.vm.provider "virtualbox" do |v|
v.memory = 4096
v.cpus = 1
v.name = "openbis-ng-ui"
end
# Needs to be unique among VMs
config.notify_forwarder.port = 22021
config.vm.synced_folder "../..", "/home/vagrant/openbis-ui-proto"
config.vm.synced_folder '.', '/vagrant', disabled: true
config.vm.synced_folder "files", "/files", :mount_options => ["ro"]
config.vm.network "forwarded_port", guest: 8122, host: 8122, host_ip: "0.0.0.0"
config.vm.network "forwarded_port", guest: 8123, host: 8123, host_ip: "0.0.0.0"
config.vm.network "forwarded_port", guest: 8124, host: 8124, host_ip: "0.0.0.0"
config.vm.provision :shell, path: "bootstrap.sh"
config.vm.provision :shell, path: "files/start-services.sh", run: "always", privileged: false
end
#!/usr/bin/env bash
sudo locale-gen en_US.UTF-8
echo "
LC_ALL=en_US.UTF-8
LANG=en_US.UTF-8
" >> /etc/environment
apt update
apt install -y unzip elinks openjdk-8-jdk inotify-tools git postgresql
cp /files/pg_hba.conf /etc/postgresql/10/main/pg_hba.conf
service postgresql restart
sleep 10 # let the db engine start
mkdir -p /node/node_modules
chown -R vagrant:vagrant /node
sudo -E -u postgres -H -i /files/setup-postgres.sh
sudo -E -u vagrant -H -i /files/setup-vagrant.sh
#
# The path where openBIS will be installed.
#
# Example :
# INSTALL_PATH=/home/openbis/
#
# will result in the following directory structure
#
# + /home/openbis
# + bin/
# + servers/
# + core-plugins/
# + openBIS-server/
# + datastore_server/
#
INSTALL_PATH=/home/vagrant/openbis
#
# The path where openBIS will keep the imported data (e.g. images, analysis files)
# and its incoming folders.
#
DSS_ROOT_DIR=/home/vagrant/dss_root
# Possible configuration options
# 'local' - if the openBIS servers will only be accessed from this machine
# 'server' - if the installation is meant to be accessible for remote users
INSTALLATION_TYPE=local
# Path to the file which should replace the current Java key store file
#KEY_STORE_FILE = <path to key store>
# Password of the key store
KEY_STORE_PASSWORD = changeit
# Password of the key
KEY_PASSWORD = changeit
# Standard technology PROTEOMICS is disabled by default
#PROTEOMICS = true
# Standard technology SCREENING is disabled by default
#SCREENING = true
# Standard technology ILLUMINA-NGS (ETH BSSE Setup) is disabled by default
#ILLUMINA-NGS = true
# Standard technology ELN-LIMS is disabled by default
#ELN-LIMS = true
# Standard technology MICROSCOPY is disabled by default
#MICROSCOPY = true
# Standard technology FLOW CYTOMETRY is disabled by default
#FLOW = true
# Full ELN/LIMS master data is enabled by default. This setting is meaningful only if ELN-LIMS is enabled
ELN-LIMS-MASTER-DATA = false
#
# Comma-separated list of databases to backup. If the list is empty or undefined all databases
# will be backauped.
#DATABASES_TO_BACKUP =
\ No newline at end of file
# PostgreSQL Client Authentication Configuration File
# ===================================================
#
# Refer to the "Client Authentication" section in the PostgreSQL
# documentation for a complete description of this file. A short
# synopsis follows.
#
# This file controls: which hosts are allowed to connect, how clients
# are authenticated, which PostgreSQL user names they can use, which
# databases they can access. Records take one of these forms:
#
# local DATABASE USER METHOD [OPTIONS]
# host DATABASE USER ADDRESS METHOD [OPTIONS]
# hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
# hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
#
# (The uppercase items must be replaced by actual values.)
#
# The first field is the connection type: "local" is a Unix-domain
# socket, "host" is either a plain or SSL-encrypted TCP/IP socket,
# "hostssl" is an SSL-encrypted TCP/IP socket, and "hostnossl" is a
# plain TCP/IP socket.
#
# DATABASE can be "all", "sameuser", "samerole", "replication", a
# database name, or a comma-separated list thereof. The "all"
# keyword does not match "replication". Access to replication
# must be enabled in a separate record (see example below).
#
# USER can be "all", a user name, a group name prefixed with "+", or a
# comma-separated list thereof. In both the DATABASE and USER fields
# you can also write a file name prefixed with "@" to include names
# from a separate file.
#
# ADDRESS specifies the set of hosts the record matches. It can be a
# host name, or it is made up of an IP address and a CIDR mask that is
# an integer (between 0 and 32 (IPv4) or 128 (IPv6) inclusive) that
# specifies the number of significant bits in the mask. A host name
# that starts with a dot (.) matches a suffix of the actual host name.
# Alternatively, you can write an IP address and netmask in separate
# columns to specify the set of hosts. Instead of a CIDR-address, you
# can write "samehost" to match any of the server's own IP addresses,
# or "samenet" to match any address in any subnet that the server is
# directly connected to.
#
# METHOD can be "trust", "reject", "md5", "password", "scram-sha-256",
# "gss", "sspi", "ident", "peer", "pam", "ldap", "radius" or "cert".
# Note that "password" sends passwords in clear text; "md5" or
# "scram-sha-256" are preferred since they send encrypted passwords.
#
# OPTIONS are a set of options for the authentication in the format
# NAME=VALUE. The available options depend on the different
# authentication methods -- refer to the "Client Authentication"
# section in the documentation for a list of which options are
# available for which authentication methods.
#
# Database and user names containing spaces, commas, quotes and other
# special characters must be quoted. Quoting one of the keywords
# "all", "sameuser", "samerole" or "replication" makes the name lose
# its special character, and just match a database or username with
# that name.
#
# This file is read on server startup and when the server receives a
# SIGHUP signal. If you edit the file on a running system, you have to
# SIGHUP the server for the changes to take effect, run "pg_ctl reload",
# or execute "SELECT pg_reload_conf()".
#
# Put your actual configuration here
# ----------------------------------
#
# If you want to allow non-local connections, you need to add more
# "host" records. In that case you will also need to make PostgreSQL
# listen on a non-local interface via the listen_addresses
# configuration parameter, or via the -i or -h command line switches.
# DO NOT DISABLE!
# If you change this first entry you will need to make sure that the
# database superuser can access the database using some other method.
# Noninteractive access to all databases is required during automatic
# maintenance (custom daily cronjobs, replication, and similar tasks).
#
# Database administrative login by Unix domain socket
#local all postgres peer
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all trust
# IPv4 local connections:
host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
#local replication all peer
#host replication all 127.0.0.1/32 md5
#host replication all ::1/128 md5
\ No newline at end of file
screen -ls | grep Detached | cut -d. -f1 | awk '{print $1}' | xargs kill
/files/start-services.sh
createuser vagrant
build="http://stage-jenkins.ethz.ch:8090/job/installation-18.06/lastSuccessfulBuild"
path=$(curl -s "$build/api/xml?xpath=//relativePath"|sed -e "s/<relativePath>//"|sed -e "s/<\/relativePath>//")
wget -q $build/artifact/$path
archive=$(basename $path)
tar xvfz $archive
directory=$(echo "$archive" | cut -f 1 -d '.')
cp /files/console.properties $directory
export ADMIN_PASSWORD='password'
$directory/run-console.sh
sed -i "/jetty.ssl.port=/ s/=.*/=8122/" /home/vagrant/openbis/servers/openBIS-server/jetty/start.d/ssl.ini
sed -i "/host-address =/ s/=.*/= https:\/\/localhost/" /home/vagrant/openbis/servers/datastore_server/etc/service.properties
sed -i "/port =/ s/=.*/= 8123/" /home/vagrant/openbis/servers/datastore_server/etc/service.properties
sed -i "/server-url =/ s/=.*/= \${host-address}:8122/" /home/vagrant/openbis/servers/datastore_server/etc/service.properties
cd /home/vagrant/openbis-ui-proto/react
ln -s /node/node_modules
sudo /usr/sbin/VBoxService --timesync-set-start
/home/vagrant/openbis/bin/allup.sh
#cd openbis-ui-proto/react
#../gradlew npmInstall
#cd
#export PATH=$PATH:/home/vagrant/openbis-ui-proto/react/nodejs/node-v10.1.0-linux-x64/bin
#screen -S dev -t webpack -Adm bash -c "cd openbis-ui-proto/react; npm run dev; bash"
#echo "Waiting Webpack to launch on 8124..."
#while ! nc -z localhost 8124; do
# sleep 3
#done
File added
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
#!/usr/bin/env sh
##############################################################################
##
## Gradle start up script for UN*X
##
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do
ls=`ls -ld "$PRG"`
link=`expr "$ls" : '.*-> \(.*\)$'`
if expr "$link" : '/.*' > /dev/null; then
PRG="$link"
else
PRG=`dirname "$PRG"`"/$link"
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle"
APP_BASE_NAME=`basename "$0"`
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS=""
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum"
warn () {
echo "$*"
}
die () {
echo
echo "$*"
echo
exit 1
}
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "`uname`" in
CYGWIN* )
cygwin=true
;;
Darwin* )
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java"
else
JAVACMD="$JAVA_HOME/bin/java"
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD="java"
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
# Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
MAX_FD_LIMIT=`ulimit -H -n`
if [ $? -eq 0 ] ; then
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
MAX_FD="$MAX_FD_LIMIT"
fi
ulimit -n $MAX_FD
if [ $? -ne 0 ] ; then
warn "Could not set maximum file descriptor limit: $MAX_FD"
fi
else
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
fi
fi
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac
fi
# Escape application args
save () {
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
echo " "
}
APP_ARGS=$(save "$@")
# Collect all arguments for the java command, following the shell quoting and substitution rules
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")"
fi
exec "$JAVACMD" "$@"
@if "%DEBUG%" == "" @echo off
@rem ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=.
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS=
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init
echo.
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init
echo.
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
echo.
echo Please set the JAVA_HOME variable in your environment to match the
echo location of your Java installation.
goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS%
:end
@rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
exit /b 1
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega
{
"presets":["env", "react"],
"plugins": ["transform-class-properties"]
}
module.exports = {
root: true,
parser: "babel-eslint",
parserOptions: {
ecmaVersion: 2017,
sourceType: 'module',
ecmaFeatures: {
jsx: true
}
},
env: {
browser: true,
},
extends: [
'eslint:recommended',
'plugin:react/recommended'
],
plugins: [
'react'
],
settings: {
react: {
createClass: "createReactClass",
pragma: "React",
version: "16.4.2"
},
propWrapperFunctions: [ "forbidExtraProps" ]
},
rules: {
"react/jsx-uses-react": "error",
"react/jsx-uses-vars": "error",
"indent": ["error", 2],
"linebreak-style": ["error", "unix"],
"quotes": ["error", "single"],
"semi": ["error", "never"],
"eqeqeq": ["error", "always"],
"react/prop-types": "off",
// override default options for rules from base configurations
"no-cond-assign": ["error", "always"],
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment