Creating Pico Configurations
Create new pico configurations by manually creating a new configuration file in the container (<pico name>.conf)
or use the mzsh topo set
command.
Run the following commands to create a new pico configuration.
$ mzsh topo set topo://container:<container>/pico:<pico> <conf>
The <config>
argument may contain a key-value pair that specifies a template or a pico configuration in HOCON format.
Example - Creating a new pico configuration based on a template
$ mzsh topo set topo://container:main1/pico:ec2 template:mz.standard-ec
When the target container is in the local MZ_HOME, you can add the local
flag and omit the container name.
Example. Creating a new pico configuration in the local container
$ mzsh topo set --local pico:ec2 template:mz.standard-ec
When you specify a pico configuration with multiple attributes, it is recommended that you use multi-line strings.
Example - Creating pico configuration in HOCON format
$ mzsh topo set --local pico:ec2 '{ template:mz.standard-ec config { properties { ec.httpd.port : 9092 } classpath { jars=["lib/picostart.jar"] } } }'
If you do not specify a template, you need to ensure that the pico type is specified in the configuration:
mzsh topo set --local pico:ec2 '{ type:ec config { properties { ec.httpd.port : 9092 } classpath { jars=["lib/picostart.jar"] } } }'
Note!
It is possible to create identical pico configurations with the same name in multiple containers. However, only one of these can run at a time.
When you want to set the value of a property so that it is shared by all pico instances in a container, you can set it on the container level instead. Similarly, if the value should be shared by all pico instances in all containers, your can set properties on the cell level.
Example - Setting a property in a container
$ mzsh topo set topo://container:<container>/val:common.pico.tmpdir '${mz.home}/"tmp"'
Example - Setting a property in a cell
$ mzsh topo set topo://cell:default/val:common.pico.rcp.platform.host examplehost
Note!
- Properties in the pico configuration overrides properties on the container level.
- Properties that are set on the container level overrides properties on the cell level.
For further information about how to set properties on container- and cell level, see Updating Pico Configurations.