The Pre-Install Utility (PIU) can be used to verify property configurations are available and correct prior to the main MOC install. Because it is difficult to verify settings inside the cluster the PIU runs inside the cluster and allows the user to see the settings and health of the systems indirectly.
Getting the Pre-Install Utility
The PIU is integrated into the MOC Helm install. You can simply enable the pre-install service and the tool will be deployed so you can check important services as part of the install process.
PIU by default uses a SCCS (Spring Could Config Server) and is automatically configured if you enable the sccs service (the most common configuration). You can also reference a config server or file outside MOC if needed.
Make sure you enable both the pre-install and sccs service in values.yaml or (starter yaml file)
Make sure to remove (or leave commented out) core in the values.yaml file, as pre-install may not be enabled at the same time as core in the service list.
In the case where you do need to override properties or specify file(s) use the following parameters inside your helm pre-install.yaml template:
# This is an example of overrideing the mongo uri
- name: modelop.mongodb-uri
# This is an example of overrideing the jira url
- name: modelop.jira-url
# This is an example of specifing the config location file
# see https://docs.spring.io/spring-boot/docs/1.4.1.RELEASE/reference/html/boot-features-external-config.html
- name: spring.config.location
By default the service is not visible (set to ClusterIP) so you either need to use port forwarding on the machine where you run your web browser or rest calls:
kubectl port-forward [Pod Name] 2888
… or mark the service as LoadBalancer as shown below:
You can run PIU from docker using the commands below:
docker run --rm -p 2888:2888 modelop/pre-install:dev-bp
You can also override properties and parameters like as done in Helm, be sure to use the command line format (uppercase and separated by underscore character). To specify a SCCS server, for example, you would use the following command (Note you will need a server running on port 8097):
docker run --rm -p 2888:2888 -e SPRING_CLOUD_CONFIG_URI="http://localhost:8097" modelop/pre-install:dev-bp
or point override a specific property:
docker run --rm -p 2888:2888 -e MODELOP.MONGODB_URI="mongodb://admin:pass@mongodb:27017/test?authSource=admin" modelop/pre-install:dev-bp
Pre-Install Utility Interface
Once running, you have two options to interact with PIU. Web interface and command line.
To view the interface simply goto the URL http://localhost:2888. From here you can check that property settings from the system are being found using the Properties links and then validate the setting using the Health links
The interface has the ability to check for property values specified by the user under the properties page. In addition, under the Health page you can specify a URL to test for a valid connection relative to the PIU.
The commands available from the UI are also available from the command line, for example:
To get information about properties:
To get health information use:
curl http://localhost:2888/api/health (for all services)
Full API Details
(optional) properties list of property names to get. If none is specified the list from application.yaml is used.
(required) name of the system to check health (required) category grouping used to check health If neither of these parameters is specified the list from application.yaml is used
(required) name or label used (required) url used for connection (optional) user to use for the connection (optional) password to use for the connection
Options for updating properties
You can not directly update properties from the Pre-Install Utility, it is only for verifying that settings are valid. However you do have options to fix configuration issues:
Ensure PIU is pointed to the correct SCCS (Spring Cloud Config) server in the helm configuration values.yaml file. A SCCS server is required for install so this is the best practice, however you use PIU without SCCS as noted under the Docker section above.
Update properties themselves directly. PIU will refresh properties internally when you update your browser page.
In addition (and while using options 1 or 2), you can override properties using Helm or Docker Desktop (as shown above). This is helpful if you want to override some parameters without changes to property files. You can also specify override the location for file locations themselves.
Using a parameters example (also see sections under Helm and Docker):
# For example overriding a specific property 'modelop.zipkin-url' with url value
docker run --rm -p 2888:2888 -e MODELOP_ZIPKIN-URL="http://localhost:9411/" modelop/pre-install:dev
Note: If you already have a SCCS server or are using the one provided by ModelOp then you only use the SCCS client (option 1 above)
Other options available
How do i disable / enable read write validation?
# change this setting as desired
How do I filter some checks completely from the view