Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Wednesday - Breakout - Effective Use of Genero Application Server - Neil Martin  (Read 2173 times)
Reuben B.
Four Js
Posts: 834


« on: November 18, 2020, 09:31:08 am »

Quote
The Genero Application Server contains more features than you think. This session will show you how to configure effectively using resources, and abstract applications. How you can use Genero Application Server as a tool to deploy your applications and custom GBC builds. How you can monitor your applications, and how to debug and interpret GAS log files.

This thread will be used to collate questions and answers from the live chat of Neil's presentation and any questions you may have after watching a recording.

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Alessandro (Efisio) R.
Posts: 42


« Reply #1 on: November 19, 2020, 11:27:10 am »

Hi,

I report a request that has been made in the chat:

Could you share a sample systemd .service file for running fastcgidispatch when using apache 2.4? I can't find it in the documentation

Thanks
Neil M.
Four Js
Posts: 21


« Reply #2 on: November 19, 2020, 12:28:18 pm »

Hi,
My systemd service config I'm using on my laptop ( Kubuntu 20.04 LTS ) is:
Code
  1.  
  2. # NOTE: This must be copied to /lib/systemd/system/ and enabled, not symlinked to here,
  3. #                       because here is not mounted at systemd load time so it doesn't find it!
  4. # sudo cp gas320.service /lib/systemd/system/
  5. # sudo systemctl daemon-reload
  6. # sudo systemctl enable gas320
  7. # sudo systemctl start gas320
  8.  
  9. [Unit]
  10. Description=GAS 3.20 Service
  11. After=network.target
  12. RequiresMountsFor=/opt
  13.  
  14. [Service]
  15. Type=idle
  16. User=neilm
  17. EnvironmentFile=/opt/fourjs/gas320/etc/gas.env
  18. ExecStart=/opt/fourjs/gas320/bin/fastcgidispatch -s -E res.ic.port.offset=20 -E res.appdata.path=/opt/fourjs/gas320_appdata -E res.path.idp=/opt/fourjs/gidp320/ -E res.access.control=ALL -E res.uaproxy.param=--development  -E res.ic.admin.port=6998
  19. StandardOutput=syslog
  20. StandardError=syslog
  21. SyslogIdentifier=gas320
  22. Restart=on-failure
  23. RestartSec=30s
  24.  
  25. [Install]
  26. WantedBy=multi-user.target
  27. Alias=gas320.service
  28.  


Obviously you'll need to change the 'User' and check the paths are correct. I always install the productions into a folder of /opt/fourjs/<prod>-<full version>        ie:  /opt/fourjs/gas-3.20.13    then I create a link of /opt/fourjs/gas320 that points to it.

The environment file I'm using is just setting my database environment.
Code
  1. INFORMIXSERVER=ol_informix1170
  2. INF_LIB=/opt/inf_csdk450fc1/lib:/opt/inf_csdk450fc1/lib/cli:/opt/inf_csdk450fc1/lib/esql:/opt/informix1170/lib:/usr/local/ibm/gsk8_64/lib64
  3. INF_BIN=/opt/informix1170/bin:/opt/inf_csdk450fc1/bin
  4. INFORMIXDIR=/opt/informix1170
  5. INFORMIXSQLHOSTS=/opt/informix1170/etc/sqlhosts.ol_informix1170
  6. INFGSK_LIB=/usr/local/ibm/gsk8_64/lib64
  7. LD_LIBRARY_PATH=/opt/inf_csdk450fc1/lib:/opt/inf_csdk450fc1/lib/cli:/opt/inf_csdk450fc1/lib/esql:/opt/informix1170/lib:/usr/local/ibm/gsk8_64/lib64
  8. DBDATE=DMY4/
  9.  
Alessandro (Efisio) R.
Posts: 42


« Reply #3 on: November 19, 2020, 12:47:14 pm »

Very useful Neil, thank you!
Neil M.
Four Js
Posts: 21


« Reply #4 on: November 19, 2020, 01:03:59 pm »


Notice that I am overriding some resources so I don't need to edit the as.xcf file.
-E res.ic.port.offset=20      # This is because I'm also running the 3.10 GAS so I need them to use different ports.
-E res.appdata.path=/opt/fourjs/gas320_appdata     # I moved my AppData so it's not in the GAS install folder, so upgrading the GAS becomes easier and I don't need to redeploy all my demos and custom GBC's.
-E res.path.idp=/opt/fourjs/gidp320/   # The location for my Genero Identity Provider files/folders.
-E res.access.control=ALL                # My laptop is normally behind a firewall so I can the monitor.
-E res.uaproxy.param=--development    # enabled developer options in the GBC.
-E res.ic.admin.port=6998  # This is because I'm also running the 3.10 GAS so I need them to use different ports.
Richard H.
Posts: 9


« Reply #5 on: November 20, 2020, 02:44:24 pm »

Hi,

On one of the presentations this week I heard it mentioned that the Genero Identity Provider can be configured to use my own database server instead of the service built in database to store the GIP login credentials.  I would like to explore this option.  Where do I start?
Neil M.
Four Js
Posts: 21


« Reply #6 on: November 23, 2020, 10:33:18 am »

The GIP is currently not setup to specifically allow or to make it easy to move it's database from sqlite into another database engine. Obviously sqllite has the advantage of being simple, portable and standalone.

I think the only reason you might need to move it into another database engine is if you expect a high volume of access requests.

The database is managed by a module called DBase.4gl ( $FGLDIR/web_utilities/services/gip/src/idp ) you should ( in theory ) be able to change this module to point to your database then recompile and run the StarterApp to create all the tables.
see:
PUBLIC CONSTANT C_DATABASE = "idp"
PUBLIC CONSTANT C_IDP_DIR  = ".idp"
PRIVATE CONSTANT C_DB_CONNECT_STRING = "+driver='sqlite'"

PRIVATE FUNCTION InitializeSQLite()
PUBLIC FUNCTION DBConnect(homedir STRING)

Obviously if you thinking of adding the tables to an existing database you would need to make sure none of the table names already exist.
fjs_api
fjs_application
fjs_applicationoptionalscope
fjs_applicationscope
fjs_authorizationcodeflow
fjs_credentialsflow
fjs_group
fjs_logoutflow
fjs_nonce
fjs_redirecturi
fjs_refreshtoken
fjs_scope
fjs_scopeflow
fjs_scopegroup
fjs_session
fjs_user
fjs_usergroup
fjs_userscope
fjs_version

You probably need to review the create table statements in $(FGLDIR)/web_utilities/services/gip/src/starterapp/idp_sqt_x.4gl   to make sure they are compatible with your database.

Regards,
Neil
Sisavanh S.
Four Js
Posts: 67


« Reply #7 on: November 23, 2020, 10:55:47 am »

Hi,

Indeed, currently no tool to migrate GIP from sqlite database.

In V4, the GIP has been enhanced to support any database engines working with Genero.
The GIP StarterApp will allow you to upgrade to one of supported database.
See GIP-73: Support other database engines as SQLite

Best regards,
Sisa.
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines