Aperio Development Pack for DC1 is a set of components and tools to help you develop Aperio mobile apps for DC1.
It includes:
This development pack is built as a Docker image and is accessible from this project image registry.
Prerequisites
Have the mobile apps you want to work with cloned in a local folder, e.g. “C:\MobileAppsDev\dc1_12”
Docker desktop app installed
To pull the Docker image you need to be logged-in to the Git repository. Login with this command:
docker login gitlab.int.iptor.com:5050
To check if you are logged in, use ‘git config -l’ command and look for user.name and user.email properties.
To start AperioDevPack, run docker command with environment variables that define your Mobile Apps development environment and API connection. You can run your command directly or using a script.
Note: If you prefer to have the command in a startup script, you can use the examples from this project. See Configure the startup script paragraph further down.
Follow these steps to run the dev pack:
Prepare the following command to run the development pack as Docker container:
docker run -it -p 8080:8080 -e API_ADDRESS=http://dkdcvs134.ibs.net:9091/api -e aperio.apps=mwhs-dc1_12 -e aperio.default.user.name=aperio -e aperio.default.user.password=mypassword --mount type=bind,src="C:\MobileAppsDev\dc1_12",dst=/usr/local/aperioapps gitlab.int.iptor.com:5050/pd-standard/aperio/aperiodevpacks/aperiodevpack-dc1
In the command, set the following 5 variables:
API_ADDRESS
It points to API Bridge that is configured to serve API for a DC1 version. Known bridges:
aperio.apps
The list of mobile app names that will be enabled for development. They should exist in the local folder provided in –mount/src attribute. Example:
aperio.apps=mwhs-dc1_12,crm-dc1_12
Note: do not put spaces between the app names.
aperio.default.user.name
User profile name for API Tool to load the metadata when generating app forms.
aperio.default.user.name=aperio
aperio.default.user.password
User password for the profile above.
aperio.default.user.password=mypassword
src
The path to your local folder with mobile apps (src).The API tool will use this folder to find mobile apps for development. The list of apps to look for is taken from aperio.apps variable. Example:
--mount type=bind,src="C:\MobileAppsDev\dc1_12",...
Run the command in the command prompt (terminal).
docker login gitlab.int.iptor.com:5050
When the development pack container is running, use the following links to start:
API Tool: http://localhost:8080/aperio/tool
Mobile app: http://localhost:8080/aperio/app?name=[app-name]&develop=true
Example to run MobileWarehouse in develop mode:
http://localhost:8080/aperio/app?name=mwhs-dc1_12&develop=true
Test API Bridge, using the readiness end-point: http://<api_server:port>/health/readiness
To verify that the JFroms generation works fine, check the container console. After changing a jform, the console should display the messages about processing the jform. Example, assuming that we have just changed jform “nurfBalancesEnquiry.json”:
Note: The errors/warning that occurs during generation are printed out to /log folder of the jforms folder.
In the console, press Ctrl-C to stop the container. You can stop the container also in the Docker deskop app. In the desktop app you can also inspect all the settings, logs and remove unused containers.
There are 2 example scripts in the project:
Configure the following properties (the same that the command uses):
API_BRIDGE
It points to API Bridge that is configured to serve API for a DC1 version. Known bridges: - DC1_12 : http://dkdcvs134.ibs.net:9091/api - DC1_11 : http://dkdcvs134.ibs.net:9191/api
Yuo can use one of the predefined variables, e.g.:
API_BRIDGE=$DC1_12
APPS_PATH
The path to your local folder with mobile apps
The API tool will use this folder to find mobile apps to develop. The list of apps to look for is provided in APPS property. Example:
APPS_PATH="C:\MobileAppsDev\dc1_12"
APPS - The list of mobile app names that will be enabled for development. They should exist in the local folder provided in APPS_PATH. Example:
APPS_PATH=mwhs-dc1_12,crm-dc1_12
Note: do not put spaces between the app names.
Default user profile - credential used by API Tool to login to the system to load the metadata used when generating mobile app forms.
Note: you can use muliple startup scripts to run the dev pack with different settings.
When comtting changes to the repository the pipeline automaticaly is created to build a new image. Check CI/CD of the project.