/ Installation  

Easy steps to make the AppWorks Gateway available

Hi there AppWorks fans,

Welcome to a new installment of AppWorks tips.

This time a post on the AppWorks Gateway. This is a separate web application that makes it possible to use the mobile app building blocks that are available on an entity. The usage of the mobile building blocks will be covered in the next post. For now, we only focus on the preparation for making the Gateway available for our AppWorks platform.

First the list of ingredients that we need (We have it all available already on our current VM via the OTDS installation post running on port 8181):

  • Tomcat (with PostgreSQL client)
  • PostgreSQL database
  • OTDS

Let get right into it…

Several steps need to be executed before we can use the Gateway service. Spin up your VM machine and make sure you have a session open from your MobaXTerm tooling.

Now for our first step….

Create a new database for PostgreSQL

Login to the VM with our ‘otadmin’ account and run these simple commands:

  • sudo -u postgres psql
  • CREATE DATABASE gateway_db;
  • \l+ for validation!
  • \q to exit the console

gateway_001_1

Update the OTDS Tomcat instance

The second step is to update some settings on the current tomcat instance. Yes…the one where we also deployed OTDS on!

Note and lesson learned!

After some playtime with the Gateway it’s better to make a separate tomcat instance for the Gateway application. In my environment I got some OTDS connection errors on my deployed apps! So, I just followed the tomcat installation (for OTDS) post on this site (search for it) and made a second tomcat available in /opt/tomcat2 on port 8282 and referred to it from for all the gateway settings in this post.

And after reading the ‘Gateway Installation and Administration Guide’ I also get the point!

gateway_001_1_1

Just to make sure: You might see some screenshots where I point to http://192.168.56.107:8181 as the Gateway endpoint, but I have 2 tomcat instances running!


Let’s continue the journey…

  • First stop the Gateway tomcat instance systemctl stop tomcat
  • Edit the server.xml vi /opt/tomcat/latest/conf/server.xml with these 2 updates:
1
2
<Connector ... useSendfile="false"/>
<Host ... undeployOldVersions="true">
  • Then we have a second file to edit vi /opt/tomcat/latest/conf/context.xml with this update:
1
<Context antiResourceLocking="true" crossContext="true">
  • Next, we make the PostgreSQL JDBC driver (a .jar file) also (a copy from TomEE) available on the tomcat instance cp /opt/tomee/latest/lib/postgresql-42.2.5.jar /opt/tomcat/latest/lib/postgresql-42.2.5.jar

  • And then we upload the installation files to /opt/tomcat/latest. These files are available in the downloaded AppWorks Suite we also used for the installation of CARS/AppWorks itself.

    gateway_001_2

    • ‘lib’ to ‘’/opt/tomcat/latest/lib’
      • With 2 jars; otag-sdk-bus-16.5.6.jar and otag-tomcat-listener-16.2.jar
    • ‘gateway’ to ‘/opt/tomcat’ (this is the webapp…and yes into the root of the tomcat instance!)
    • ‘conf’ to ‘/opt/tomcat/latest/conf’ (skip the context.xml and server.xml as they are already updated in the first steps above!)
      • It uploads the ‘awg-keystore’ file
      • The ‘Catalina’ folder has a ‘root.xml’ file that points to the ‘gateway’ webapp (the one we copied in the tomcat root…remember?)!
  • Now we can start tomcat again with systemctl start tomcat

See if OTDS is still available http://192.168.56.107:8181/otds-admin

And see if our gateway is available on http://192.168.56.107:8181/gateway


The first time you get redirected to http://192.168.56.107:8181/#!/setup

Select what your intention is with the gateway…I know…it’s Dutch, but you recognize the ‘evaluation’ part…agree?

gateway_001

And hit the blue ‘Doorgaan’ button…Again Dutch…You’ll learn some Dutch words today!

The next screen requires you to update 2 parts

Database
  • Databaseleverancier: PostgreSQL (this is where the copied jar will be used!)

  • Gebruikersnaam: postgres (our PostgreSQL admin account)

  • Wachtwoord: admin (used for my image, but you can define your own!)

  • Server: 192.168.56.107 (our regular image where PostgreSQL is running)

  • Poort: 5432 (The default PostgreSQL port)

  • Naam database: gateway_db (our just created database!)

gateway_002

Click the blue ‘Databaseverbinding configureren’ button to get back a black mark!

gateway_003

OTDS
  • Gateway-beheerdergebruikersnaam: otag (the default; stands for OpenTextAppworksGateway)
  • Gateway-beheerderswachtwoord: admin (self defined)
  • OTDS-server-URL: http://192.168.56.107:8181
  • OTDS-gebruikernaam: otadmin@otds.admin (we use the account already for the otds-admin console!)
  • OTDS-wachtwoord: admin
  • Bronnaam: OTAG (the default)
  • Gateway-gebruikerpartitienaam: otag (the default)

gateway_004

And click the ‘OTDS configureren’ button.

When all fine you should be redirected to the gateway login screen

gateway_005

You can login with the just configured ‘otag’ account and password ‘admin’

After this login you’ll start on the first landing page for the gateway.

gateway_006

And this screen is in English…what?…yes…I switched to an English IE for your convenience! 😜

We’ll leave this screen for what it is for now, but ‘We’ll be back’ later…


Let AppWorks ‘know’ we have a Gateway available for our platform

For this we need to open our CMC tooling!…It’s the one where we need to set our display variable with export DISPLAY=<IP:0.0> and start it with sudo /opt/opentext/AppWorksPlatform/defaultInst/bin/cmc.sh

Add these 5 new properties with the corresponding values:

1
2
3
4
5
com.opentext.appworks.gatewayUrl = http://192.168.56.107:8181
com.opentext.appworks.username = otag
com.opentext.appworks.password = YWRtaW4=
com.opentext.appworks.OTDSAddress = http://192.168.56.107:8181
com.opentext.appworks.OTDSResource = d39b6ab8-7d8a-48d6-a7d5-b150865e8c0d

gateway_007

The password is a base64 encryption of ‘admin’. Go here to encode/decode your string value!

The last OTDSResource property can be found in the otds-admin consolegateway_008

The last step is to restart our AppWorks platform:

systemctl restart wcpddefaultInst.service

sudo cat /opt/opentext/AppWorksPlatform/defaultInst/Logs/Monitor.xml


And the real last/final step is the make OTDS ‘know’ that our Gateway is running in a non-secure HTTP connection…For our environment it’s fine!

So, go to the otds-admin console (http://192.168.56.107:8181/otds-admin/#systemconfig) where we open the ‘System Config’

gateway_009

And we’ll add a new attribute with this information:

1
directory.auth.EnforceSSL = false

A tomcat restart can be done but is not required for now. It will already be restarted somewhere when we get to our next post probably!…otherwise systemctl restart tomcat


And that brings us to a ‘DONE’ for this post where we learned more about making a Gateway instance available for our AppWorks platform. Not that hard to do and it makes valuable functionality available that we will describe in our next post…Have a nice day and I see you in the next one…Greetz!

Don’t forget to subscribe to get updates on the activities happening on this site. Have you noticed the quiz where you find out if you are also “The AppWorks guy”?