*Product/components used and version/fix level:
Guide Adabas & Natural Commuinity Edition for Docker Oct2022 V2.5
Pre:
I know about Natural because a friend use it at work. They need programmers so I’m trying to learn it. I had the topics “Natural” and “Adabas” which led me to “SoftwareAG”
And, here is my first challenge. The company my friend work with use Natural, not NaturalOne, although there is movement and most probably they start using NaturalOne in the near future (maybe), but… what are the differences?
In any case, I went to discover what SoftwareAG had available and I was quite impressed. In one hand I had this forum(TechCommunity) but in the other I had the resources center with an awesome learn platform.
So many courses and levels, inmediatly I went to Adabas & Natural and filter by basics courses and enroll in the
NaturalONE Basic (E310A-75E) course.
But here is the problem, I don’t have Adabas or Natural installed. Mmm, let’s check the free trial section of the web. Hey! here it is. I would like to know wich means being a trial. Is time limited? Are some functionalities removed? You can find that in the readme of the dockerhub
For Adabas
The container does not contain any licenses for Adabas. The restrictions of an Adabas community edition are:
- No Adabas PLOG usage
- Restrictions in an Adabas in Enterprise environment with a huge number of CPUs
- Restrictions in the Adabas container size
For Natural
To agree to the Software AG copyright EULA, you need to set the environment variable ACCEPT_EULA during Natural container startup.
For Adabas Manager
- No Adabas PLOG usage. To start a database, you need to set the PLOG to ‘NO’ from the Database Parameter page.
Anyway. Let’s get rolling.
Alright, I fill the form and redirects me to this “What’s next” article. Ok…, it has links to enroll in the course I’ve already sign up for, links to examples on github, cool…, Oh, here it is, a guide for installing it…, but install what? ooohhhh, nvm, here is the link for downloading it. Is the version 9.2.1. Alright. I think I have it. Now to the guide.
Install of NaturalOne 9.2.1
1 Welcome
Ok, it tells me that I’ll install the IDE app based on eclipse, and 3 docker containers.
2 Architecture Overview
Ok, the dev enviroment is NaturalOne Which connects over TCP/IP to Natural in docker, which then connects to Adabas in another container and finally there is Adabas Manager that connects to Adabas directly. So… we as developers only can connect to Natural throgh NaturalOne and to Adabas through Adabas Manager.
3 Getting Started.
For NaturalONE, Natural, Adabas and Adabas Manager, an installation in the classical sense is not
required.
- Install the Docker Community Edition or Podman.
- Start Adabas in a Docker container.
- Start Natural in a Docker container.
- Download and unpack NaturalONE.
- Start Adabas Manager in a Docker container.
4 Installing the Docker Community Edition
Jump to 4.2, windows 10/11
Install docker desktop I already have it.
Now run ipconfig
on powershell and look for the IPv4 address of your main adapter. I’m on wifi,so should I copy that one?
There are also Ethernet adapter vEthernet
which is the adapter for Hyper-V and Ethernet adapter vEthernet (WSL)
which is used for well, WSL. I’ll copy the main one as the guide says. This IP is very important as we need it later to connect to the dev enviroment and the database.
5 Login to Docker Hub / Software AG Registry
Alright, we need to pull 3 images.
docker pull softwareag/natural-ce:9.2.1
docker pull softwareag/adabas-ce:7.1.1
docker pull softwareag/adabasmanager-ce:9.1.0.1
Done.
The guide shows also how to use an empower account to download images from their repository but I’m not a client yet, so omit that.
6 Starting Adabas in a Docker Container
Here we go, first it tolds as that the database is not persisted but there is more info in the readme in dockerhub.
Now the good part. This is the command to run Adabas in docker
docker run -d -p 60001:60001 -p 8190:8190 -e ACCEPT_EULA=Y -e ADADBID=12 -e "ADA_DB_CREATION=demodb" --name adabas-db softwareag/adabas-ce:7.1.1
alright, is running and logs are looking ok. Since I use Docker Desktop I can see the logs, otherwise, docker logs adabas-db
We can also check if the database is working properly with
docker exec -it adabas-db adainfo.sh
, and… everything looks fine as shown in the guide.
7 Starting Natural in a Docker Container
Round 2, let’s see if Natural goes smooth as well.
docker run -d -p 2700:2700 --add-host adabas-db:<OWN-IP> -e ACCEPT_EULA=Y --name natural-ce softwareag/natural-ce:9.2.1
mmm, be careful, now we have to remember to set our own IP in that command. Since it’s a local ip I think is not a security issue to share it here. I’ll choose the one of my main adapter, I’ll see later if that’s correct.
docker run -d -p 2700:2700 --add-host adabas-db:192.168.1.36 -e ACCEPT_EULA=Y --name natural-ce softwareag/natural-ce:9.2.1
Alright. It’s up and running. Let’s continue.
9 Quick Start Guide for NaturalONE
Is time now to unzip the NaturalONE IDE and run it using the Start_ONE_9.2.1.CE
shortcut. I’ll use the default workspace for now. It says it uses Software AG Designer v10.15
10 Establishing the Connection between NaturalONE and the Natural Container
Now I loaded the Hello World example but I need to connect to the natural container. Let’s see, Right click on the natural navigator view (selecting the main folder) and then Natural/Runtime
Here we have to change the host which is defaulted to localhost. Is the same IP we used to connect to the database? I hope so.
It says that we have the natural demo application in the container so we should be able to run it as shown in the guides. And…, error. well, it says NAT0082 Invalid command, or Object HELLO-P does not exist in library.
but it seems like is connecting to the container. I’ll look in that later.
11 Starting Adabas Manager in a Docker Container
Again, let’s see if this container works.
docker run -d -p 4990:4990 -e ACCEPT_EULA=Y --name adabas-manager softwareag/adabasmanager-ce:9.1.0.1
Up and runnings, logs are there and I should be able to access it through. https://localhost:4990/
Important to make use of the https. Now I can login using admin:manage as credentials. And it works.
Now we can add our Adabas instance to manage it. I follow the screenshots and use again admin:manage to enter that db
(I didn’t know the pass was that) and apparently there is a database whit some files which includes employes, vehicles… it seems that connections is working.
So, that’s the guide.
Now let’s try find what was that error.
Troubleshotting
I can connect from eclipse to natural. The thing is, I understand that adabas manager is able to connect to adabas since it run in the same docker vm, but I need to see how natural-ce is exposed to the computer.
First, in powershell. docker ps
I can see there 3 containers are running and their ids. I copy the one from natural-ce.
Next, docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' 212ec3ec3b33
being 212ec3ec3b33
the id taken from the ps command.
Wait, it gives me IP 172.17.0.3
but I try it ine the runtime config and doesn’t work.
Let’s see if something is running on that port
Get-NetTCPConnection | where Localport -eq 5000| Select-Object Localport,@{'Name' = 'ProcessName';'Expression'={(Get-Process -Id $_.OwningProcess).Name}}
it outputs
`Localport ProcessName
2700 wslrelay
2700 com.docker.backend`
Mmm, is something.
I run netstat -aon
and I see there is something listening on 0.0.0.0:2700
It may be ok, apparently is similar to localhost and 127.0.0.1 but still I’m going to change it on eclipse runtime configuration to see if it works. Again error NAT0082 Invalid command, or Object HELLO-P does not exist in library.
Getting there
May be an error on the hello-p.nsp? It says in the guide that the container should have this library already loaded.
I’m going to build the project and upload it to the server to see any change.
Hey, another error, but it’s different, that’s progress.
SEVERE PROBLEM: The JS-Iibraries required by this page could not be loaded. This problem typically occurs when not having regenerated the layout definitions.
At least there is already a topic in this forum about this
Ok, rebuild the sample component…
run it again and…
Hello world… and Adabas as well!
Stepping back
so, I’ll go back to the runtime configuration and change it to localhost as that doesn’t seem to be the problem.
Also, I’m going to redo the steps to launch the containers, but this time I’m going to change the docker commands to see if localhost would have work instead of the ip copied from the ethernet adapter.
So, first adabas
docker run -d -p 60001:60001 -p 8190:8190 -e ACCEPT_EULA=Y -e ADADBID=12 -e "ADA_DB_CREATION=demodb" --name adabas-db softwareag/adabas-ce:7.1.1
then natural with the localhost ip
docker run -d -p 2700:2700 --add-host adabas-db:<YOUR-IP> -e ACCEPT_EULA=Y --name natural-ce softwareag/natural-ce:9.2.1
and finally the manager
docker run -d -p 4990:4990 -e ACCEPT_EULA=Y --name adabas-manager softwareag/adabasmanager-ce:9.1.0.1
Unpack the NaturalONE Eclipse IDE, change the runtime
Since I’ve deleted the containers I have to build and upload it first
and for good measure I’ll rebuild the user interface
And there you have it. A ready to use dev enviroment.
One last thing. I’m going to create a docker-compose.yml to be able to run everything at the same time with docker compose up
*Spoiler from the future - a couple of post down I show you don’t need extra-hosts.
docker-compose.yml
version: ‘3.3’
services:
adabas-ce:
ports:
- ‘60001:60001’
- ‘8190:8190’
environment:
- ACCEPT_EULA=Y
- ADADBID=12
- ADA_DB_CREATION=demodb
container_name: adabas-db
image: ‘softwareag/adabas-ce:7.1.1’
natural-ce:
ports:
- ‘2700:2700’
extra_hosts:
- ‘adabas-db:’
environment:
- ACCEPT_EULA=Y
container_name: natural-ce
image: ‘softwareag/natural-ce:9.2.1’
adabasmanager-ce:
ports:
- ‘4990:4990’
environment:
- ACCEPT_EULA=Y
container_name: adabas-manager
image: ‘softwareag/adabasmanager-ce:9.1.0.1’
And it works!!, kind of. First think I noticed. You can setup the runtime in eclipse to localhost, but, be sure the user ID is not admin.
Second, in the adabas manager you need the real ip of the container, I mean, the one used internally by docker. One way to find it is using Portainer in Docker Desktop.
With that you can run all containers and use the IDE.
Time to follow the course!!
Final Thoughts.
Please don’t follow this guide step by step, it was my journey, a conflicted one, I’ll leave it as may help others, please report if you see any errors or feel like I should add something.