2.4.2 Updating Pico Configurations

Update existing configurations by manually editing the pico configuration file (<pico name>.conf) or use the mzsh topo set command. If you want to make changes for a set of pico configurations, you can do so by using templates. 

Attributes, i e properties, that that are set on container level (in container.conf) or cell level (cell.conf) are inherited by pico configurations. 

Pico Level Attributes

Run the following commands to add or update an attribute of a pico configuration in a container.

$ mzsh topo set topo://container:<container>/pico:<pico>/val:<attribute> <attribute value>

Example - Updating a general pico attribute

$ mzsh topo set topo://container:main1/pico:ec2/val:ec_type ecsa

Example - Updating a system property

$ mzsh topo set topo://container:main1/pico:platform/val:config.properties.mz.subfolder.enabled true

Run the following command to add or update an object that contains one or more attributes.

$ mzsh topo set topo://container:<container>/pico:<pico>/obj:<object name> '<config>'

The <config> argument may contain a key-value pair that specifies a template or a pico configuration in HOCON format.

Example - Updating a pico object

$ mzsh topo set topo://container:main1/pico:ec2 '{
    template:mz.standard-ec
    config {
        properties {
            httpd.port :9092
        } 
        classpath {
            jars=["lib/picostart.jar"]
		}
    }
}'

Container Level Attributes

Run the following command to add or update an attribute on container level.

$ mzsh topo set topo://container:<container>/val:<attribute> <attribute value>

Run the following command to add or update an object that contains one or more attributes.

$ mzsh topo set topo://container:<container>/obj:<object name> '<config>'

You cannot add JVM arguments or classpaths on the container level. If you need to add JVM arguments that are applied to all pico processes, it is recommended that you do so by using templates.

Cell Level Attributes

Run the following commands to add or update an attribute on cell level.

$ mzsh topo set topo://val:common.<attribute> <attribute value>

Run the following commands to add or update an object that contains one or more attributes.

$ mzsh topo set topo://obj:common.<object name> '<config>'

You cannot add JVM arguments or classpaths on the cell level. If you need to add JVM arguments or classpaths that are applied to all pico processes, it is recommended that you do so by using templates.

Desktop Attributes

Run the following commands to add or update a custom default attribute for Desktop instances.

$ mzsh topo set topo://client:desktop/val:config.<attribute> <attribute value>

Run the following commands to add or update an object that contains one or more attributes.

$ mzsh topo set topo://obj:client:desktop.config.<object name> '<config>'

Example - Updating default JVM arguments

$ mzsh topo set topo://client:desktop/obj:config '{
	jvmargs {
		xms=["-Xms128M"]
        xmx=["-Xmx256M"]
        client=["-client"]                        
    }
}'