ModelOp Center Pre-Install Utility

Pre-Install Utility Help

 

  Overview

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

Using Helm

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:

... spec: containers: - env: # This is an example of overrideing the mongo uri - name: modelop.mongodb-uri value: mongodb://modelop:modelop1234@mocaasin-prime.cluster-ccnbmpfpbzjf.us-east-2.docdb.amazonaws.com:27017/test?ssl=true&retryWrites=false # This is an example of overrideing the jira url - name: modelop.jira-url value: http://jira.qa.octopus.modelop.center # 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 value: classpath:/default.properties,classpath:/override.properties

Service Visibility

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:

moc: ... services: ... pre-install: serviceType: LoadBalancer

Using Docker

You can run PIU from docker using the commands below:

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):

or point override a specific property:

  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:

Full API Details

Resource

Parameters

Example

Resource

Parameters

Example

/api/properties

(optional) properties list of property names to get. If none is specified the list from application.yaml is used.

http://localhost:2888/api/properties

/api/health

(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

http://localhost:2888/api/health

/api/health/url

(required) name or label used
(required) url used for connection
(optional) user to use for the connection
(optional) password to use for the connection

http://localhost:2888/api/health/url?url=_URL

 

  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:

  1. 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.

  2. Update properties themselves directly. PIU will refresh properties internally when you update your browser page.

  3. 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

 

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)

 

  Advanced Options

Other options available

  1. How do i disable / enable read write validation?

    1. # change this setting as desired

    2. moc:

    3. preinstall:

validate-write-access: true

How do I filter some checks completely from the view

# change this setting as desired

moc:

preinstall:

included-health-checks: jenkins,jira,mongodb,rstudio,zipkin

You can also update the properties PIU scans for:

# change this setting as desired

moc:

preinstall:

included-properties: modelop.gateway-url,modelop.ws-gateway-url,modelop.moc-center-url