Skip navigation links

Package org.thales.punch.platform.api

To deal with configuration and administative tasks, the punchplatform relies on a carefully well designed configuration service.

See: Description

Package org.thales.punch.platform.api Description

To deal with configuration and administative tasks, the punchplatform relies on a carefully well designed configuration service. Its architecture is simple, robust and safe.

There are two type of tasks performed on a punchplatform : some are performed directly by the user using cli commands, others are executed periodically as platform housekeeping tasks.

The general idea is to have a zookeeper cluster in charge of centralizing all the resources and property files required to perform an administrative action. All platform tasks rely on zookeeper to retrieve configuration information. Note that zookeeper only contains the latest version of configuration items. It does not keep track of the history. This is good enough for platform taks that are in charge of implementing dynamic services : dynamic means here that whenever a new channel or tenant is defined, platform service will eventually be notified and take appropriate actions. No need to reconfigure and restart the platform tasks whenver you (as a user) update your configuration.

For example one of the platform service is in charge of exposing the overall platform health to third-party supervision services. Should you add a new channel, that new channel health information will be shortly dynamically and automatically part of the overall platform health status.

The question is now : as a user, how do you update the configuration. Users deal with plain configuration files, stored in a local unix folder. That folder location is defined in the user environment PUNCHLATFORM_CONF_DIR variable. The layout of that folder is :

This folder is git enabled. This lets user safely update their configuration items. Once happy, they commit and push their changes. This makes the changes propagated to zookeeper, hence visible in turn to administrative tasks.

To sum up the platform configuration plane relies on unix folder and Git as far as users as concerned, and zookeeper as far as administrative tasks are concerned.

Two last point are worth understanding. First user submit commands using a cli tool, such as starting a channel, it is not (in general) wise to go through the commit first. Often user need to test configuration changes first. This is important in order not to mess up with the platform monitoring should you perform repair or test actions on your production platform. To make user life simple, platform cli tools automatically detect and use configuration from local folder versus central zookeeper.

Second, some resource files are too big to go through zookeeper. Big resources (jars, binaries, database geoip content files) are preinstalled on the remote servers and accessed locally by startup topologies. The LocalEnvironment class helps you to deal with specifically accessing local only resources.

Skip navigation links

Copyright © 2014–2023. All rights reserved.