Skip to content

Update the code for local VO setup

Nikola Hardi requested to merge nhardi/jalien:feature-jalien-ft-clean into master

How to test:

  • Start with a clean environment such as Ubuntu VM or a Docker container
  • Clone the jalien source code
  • Install the following packages: mysql-server slapd ldap-utils openjdk-11-jdk. If asked for slapd password, use "pass", as it is hardcoded in the test runner.
  • Compile the code with ./compile.sh
  • Ensure that ~/.globus/alien.p12, you can get it from ~/.j/testVO/globus/alien.p12
  • For the moment set ldap_server=localhost in $JALIEN_REPO/config/config.properties
  • Start the tests with ./testj test
  • Apparmor can complain on Ubuntu systems when slapd and mysqld try to access home directories. You can just disable it with aa-disable mysqld and aa-disable slapd. It may be required to restart the apparmor service with systemctl restart apparmor.
Click here to see the test runner output:

root@6345dee5e1b1:/jalien# ./testj test                                                                                                                                                                                                                                          
---- jAliEn Test System ----
Don't worry about any errors up to here!
Starting ...
Life is a race, so we take the time here.
############ Chapter 0, VO SETUP      ########
Your local hostname is: localhost.localdomain
domain/DC/VO will be: localdomain
O/VO will be: localhost
Now let's start the work...
Creating TestVO in: /root/.j/testVO_142025-20191210
----- STEP1 [INIT]: Config -----
----- STEP1 [DONE]: Config -----
----- STEP2 [INIT]: Certificates -----
Enter Export Password:
Verifying - Enter Export Password:
----- STEP2 [DONE]: Certificates -----
----- STEP3 [INIT]: LDAP -----
----- STEP3 [DONE]: LDAP -----
----- STEP4 [INIT]: DB -----
Tue Dec 10 14:20:46 GMT 2019 WARN: Establishing SSL connection without server's identity verification is not recommended. According to MySQL 5.5.45+, 5.6.26+ and 5.7.6+ requirements SSL connection must be established by default if explicit option isn't set. For compliance
with existing applications not using SSL the verifyServerCertificate property is set to 'false'. You need either to explicitly disable SSL by setting useSSL=false, or set useSSL=true and provide truststore for server certificate verification.
----- STEP4 [DONE]: DB -----
----- STEP5 [INIT]: init VO -----
----- STEP5 [DONE]: init VO -----
Test VO ready and running after 23s .
############ Chapter 1, Central Tests ########
-----------------  Testing LDAP plain access -----------------
target username is: jalien
{java.naming.provider.url=ldap://127.0.0.1:8389/ou=People,o=localhost,dc=localdomain, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.pool.timeout=120000, com.sun.jndi.ldap.connect.pool.prefsize=5, com.sun.jndi.ldap.connect.timeout=10000, com.sun.jndi.ldap.connect.pool.maxsize=50, com.sun.jndi.ldap.read.timeout=30000}
from LDAP: jalien
----- jCentral UtilsTest 1/14 [ok]     , which was: get user [jalien]
-----------------  Testing DB plain access   -----------------
----- jCentral UtilsTest 2/14 [ok]     , which was: get /
----- jCentral UtilsTest 3/14 [ok]     , which was: get /localhost/localdomain/user/
----- jCentral UtilsTest 4/14 [ok]     , which was: get /localhost/localdomain/user/j/
----- jCentral UtilsTest 5/14 [ok]     , which was: get /localhost/localdomain/user/j/jalien/
-----------------    Testing user access     -----------------
{java.naming.provider.url=ldap://127.0.0.1:8389/ou=Roles,o=localhost,dc=localdomain, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.pool.timeout=120000, com.sun.jndi.ldap.connect.pool.prefsize=5, com.sun.jndi.ldap.connect.timeout=10000, com.sun.jndi.ldap.connect.pool.maxsize=50, com.sun.jndi.ldap.read.timeout=30000}
----- jCentral UtilsTest 6/14 [ok]     , which was: access-read /
----- jCentral UtilsTest 7/14 [ok]     , which was: access-write /
----- jCentral UtilsTest 8/14 [ok]     , which was: access-read /localhost/localdomain/user/
----- jCentral UtilsTest 9/14 [ok]     , which was: access-write /localhost/localdomain/user/
----- jCentral UtilsTest 10/14 [ok]     , which was: access-read /localhost/localdomain/user/j/
----- jCentral UtilsTest 11/14 [ok]     , which was: access-write /localhost/localdomain/user/j/
----- jCentral UtilsTest 12/14 [ok]     , which was: access-read /localhost/localdomain/user/j/jalien/
----- jCentral UtilsTest 13/14 [ok]     , which was: access-write /localhost/localdomain/user/j/jalien/
----- jCentral UtilsTest 14/14 [ok]     , which was: createDir /localhost/localdomain/user/j/jalien/bin
Central Tests successful.
############ Chapter 2, jCentral_2_jBox Tests     ########
JCentral listening on /127.0.0.1:8998
jCentral started successful.
{java.naming.provider.url=ldap://127.0.0.1:8389/ou=People,o=localhost,dc=localdomain, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.pool.timeout=120000, com.sun.jndi.ldap.connect.pool.prefsize=5, com.sun.jndi.ldap.connect.timeout=10000, com.sun.jndi.ldap.connect.pool.maxsize=50, com.sun.jndi.ldap.read.timeout=30000}
creating the request token request
the request token - before executing
Running as central service
{java.naming.provider.url=ldap://127.0.0.1:8389/ou=Roles,o=localhost,dc=localdomain, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.pool.timeout=120000, com.sun.jndi.ldap.connect.pool.prefsize=5, com.sun.jndi.ldap.connect.timeout=10000, com.sun.jndi.ldap.connect.pool.maxsize=50, com.sun.jndi.ldap.read.timeout=30000}
{java.naming.provider.url=ldap://127.0.0.1:8389/ou=People,o=localhost,dc=localdomain, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.pool.timeout=120000, com.sun.jndi.ldap.connect.pool.prefsize=5, com.sun.jndi.ldap.connect.timeout=10000, com.sun.jndi.ldap.connect.pool.maxsize=50, com.sun.jndi.ldap.read.timeout=30000}
the request token - executed
JBox is listening on port 44205
{java.naming.provider.url=ldap://127.0.0.1:8389/ou=People,o=localhost,dc=localdomain, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.pool.timeout=120000, com.sun.jndi.ldap.connect.pool.prefsize=5, com.sun.jndi.ldap.connect.timeout=10000, com.sun.jndi.ldap.connect.pool.maxsize=50, com.sun.jndi.ldap.read.timeout=30000}
{java.naming.provider.url=ldap://127.0.0.1:8389/ou=SE,ou=Services,ou=JTESTSITE,ou=Sites,o=localhost,dc=localdomain, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.pool.timeout=120000, com.sun.jndi.ldap.connect.pool.prefsize=5, com.sun.jndi.ldap.connect.timeout=10000, com.sun.jndi.ldap.connect.pool.maxsize=50, com.sun.jndi.ldap.read.timeout=30000}
{java.naming.provider.url=ldap://127.0.0.1:8389/ou=SE,ou=Services,ou=JTESTSITE,ou=Sites,o=localhost,dc=localdomain, java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory, com.sun.jndi.ldap.connect.pool.timeout=120000, com.sun.jndi.ldap.connect.pool.prefsize=5, com.sun.jndi.ldap.connect.timeout=10000, com.sun.jndi.ldap.connect.pool.maxsize=50, com.sun.jndi.ldap.read.timeout=30000}
jBox started successful.
-----------------  Testing JSh over JBox -----------------
jshell connecting to jbox: 127.0.0.1 44205 201fcc92-e197-446d-a106-115703aad246
Running as central service
Received JSh call [pwd]
----- JSh over JBox Test 1/2 {NO} !!!!!!    , which was: JSh conntected
Received JSh call [ls, -la]
Running as central service
Output of BOOMBOX ls:
Received JSh call [cd, ..]
Running as central service
Received JSh call [ls, -la]
Running as central service
Output of BOOMBOX ls:
drwxr-xr-x      admin    admin            0 Oct 06 17:07    admin
Received JSh call [cd, ..]
Running as central service
Received JSh call [ls, -la]
Running as central service
Output of BOOMBOX ls:
drwxr-xr-x      admin    admin            0 Oct 06 17:07    a
drwxr-xr-x      admin    admin            0 Oct 06 17:07    j
Received JSh call [cd, ..]
Running as central service
Received JSh call [ls, -la]
Running as central service
Output of BOOMBOX ls:
drwxr-xr-x      admin    admin            0 Oct 06 17:07    user
Received JSh call [cd, ..]
Running as central service
Received JSh call [ls, -la]
Running as central service
Output of BOOMBOX ls:
drwxr-xr-x      admin    admin            0 Oct 06 17:07    localdomain
Received JSh call [cd, ..]
Running as central service
Received JSh call [ls, -la]
Running as central service
Output of BOOMBOX ls:
drwxr-xr-x      admin    admin            0 Oct 06 17:07    localhost
Finished  TestCentralUtils after 21s .
Edited by Nikola Hardi

Merge request reports