The API Caller is an example GUI which helps generating the proper API syntax. Ultimately it may also execute the API call, but not at this stage yet. The metadata for API Caller is under the api-caller folder. The first file is the menu-map.json where the interactive menu options are defined.
Create a build using the command gradle Because this is a prototype, the test code is not currently maintained. Therefore, it is necessary to call build with skipped tests.
./gradlew build -x test
To prepare for distribution
./gradlew distZip
For experiments on the local computer, the program can be run as follows For experiments on the local computer, the program can be run as follows:
- run
git clone << address of this git repo >>
- go to folder
cd << project folder >>
egcd CEEnterCaller
- build see above
unzip build/distributions/ceeredhat-0.0.1.zip
- go to folder wuth binary eg
cd ceeredhat-0.0.1/bin
- and run
./ceeredhat
To create a docker image, run the following in the project folder
docker build -f docker/Dockerfile.jvm -t chytrik/ceeredhat .
To run a local image using the docker engine eg
docker run -i --rm -p 8080:8080 chytrik/ceeredhat
I use OpenShift Do for quick deployment. It is really easy. I log in to OpenShift (oc login ...) and create an application and deploy user code on an OpenShift, e.g.
odo create java ceeredhat --binary build/libs/ceeredhat-0.0.3-all.jar --s2i
odo url create ceeredhat --port 8080
odo push
Once the application is created, I make changes using only using
odo push
I'm using environment variables. For Ktor I'm setting KTOR_ENV for production
odo config set --env KTOR_ENV=prod
If necessary, everything can be deleted with
odo delete --all
I'm using local docker Postgres database, and also database Postgres in OpenShift
In order to access the database from a database administration tool running on your own local machine, it will be necessary to expose the database service outside of the OpenShift cluster.
oc port-forward <pod-name> <local-port>:<remote:port>
ex.
oc port-forward postgresql-1-9npdc 15432:5432
create table ceecaller.settings
(
parameter varchar(50),
value varchar(50)
);
alter table ceecaller.settings
owner to postgres;
INSERT INTO ceecaller.settings (parameter, value) VALUES ('toweradm', 'admin');
INSERT INTO ceecaller.settings (parameter, value) VALUES ('towerpass', 'passWORD');