Familiarize yourself with the sample components in the library, as they include a number of examples of how to define properties and action scripts.
Use the sample components in the library only in a test environment.
Follow these best practices when developing components in Application Services.
Some installers might need access to the tty console. Redirect the input from /dev/console.
For example, the predefined RabbitMQ service uses the ./rabbitmq_rhel.py --setup-rabbitmq < /dev/console command in its install script.
When a component uses multiple life cycle stages, the property value can be changed in the INSTALL life cycle stage. The new value is sent to the next life cycle stage. Action scripts can compute the value of a property during deployment to supply the value to other dependent scripts.Note:
You cannot change the content property value for a component that uses multiple life cycle stages.
For example, in the Clustered Dukes Bank sample application, JBossAppServer service computes the JVM_ROUTE property during the install life cycle stage. This property is used by the JBossAppServer service to configure the life cycle. Apache load balancer service then binds its JVM_ROUTE property to the all (appserver:JbossAppServer:JVM_ROUTE) property to get the final computed value of node0 and node1.
If a component requires a property value from another component to complete an application deployment successfully, you must state explicit dependencies in the application blueprint.
For a script to run without any interruptions, the return value must be set to zero (0).
This setting allows the agent to capture all of the properties and send them to the Application Services server.