Applying the Changes Made to the Model
Model Versioning
Management instances store multiple versions of the model. Only one version of the model can be active in the grid at any given time.
TimesTen Scaleout classifies model versions as follows:
-
Current version: The current version of the model describes the operational configuration of the grid. This version, and all previous versions, is read-only.
-
Latest version: The latest version of the model can be modified and has yet to be applied to the grid. This version is read/write.
When you create a grid, the version 1
model is initially populated with the configuration of the first host, installation, and management instance, and the version 1
model is recognized as the latest version of the model. Any subsequent changes that you make to the model are added to the latest version of the model (version 1
). When you implement these changes with the ttGridAmin modelApply
command, a new latest version of the model (version 2
) is created for future changes and the previous latest version of the model (version 1
) becomes the current version of the model.
Every time you run the ttGridAdmin modelApply
command, TimesTen Scaleout:
-
Makes the latest version of the model (
version
n
) read-only. -
Creates a writable copy (
version
n+1
) of the latest version of the model. -
Attempts to apply the changes previously made to the
version
n
model to the operational grid. -
Identifies the
version
n
model as the current version of the model. -
Identifies the
version
n+1
model as the latest version of the model.
The ttGridAdmin
utility enables the user to perform several operations regarding the model, like:
-
Applying the changes made to the latest version of the model
-
Comparing two versions of the model
-
Exporting a version of the model into a flat file in JSON format
-
Importing a flat file in JSON format as the latest version of the model
-
Listing all the available versions of the model
Previous versions of the model are automatically stored. With the
ttGridAdmin gridModify
command,
you can specify the retention period for old
versions of the model either in terms of days, in
terms of the number of stored versions, or both.
TimesTen Scaleout by default retains the last 10
versions for a period of 30 days.
For more information on model operations or the ttGridAdmin
gridModify
utility, see Model Operations or Modify Grid
Settings (gridModify), respectively, in Oracle TimesTen In-Memory Database
Reference.
Apply the Latest Version of the Model
The ttGridAdmin modelApply
command attempts to apply the changes made to the latest version of the model into the operational grid. If, for example, you add a new data instance to the latest version of the model, running this command performs all of the necessary operations to create and initialize the instance in the specified host. Some of the operations that the ttGridAdmin modelApply
command performs include these:
-
Identify and delete any object removed from the latest version of the model.
-
Create new installations.
-
Create new instances, data and management.
-
Overwrite the configuration files of all instances. The new versions of these files include any new entries found in the latest version of the model.
-
Verify the SSH connectivity between hosts.
Note:
If you recently added new instances to the model or have yet to set the required passwordless SSH access to the hosts managing instances, either manually set the required passwordless SSH access for the instance administrator or use the
ttGridAdmin gridSshConfig
command before applying the latest version of the model. See Setting Passwordless SSH. -
Start new instances.
Apply all the changes made to the latest version of the model of the grid1
grid.
% ttGridAdmin modelApply
Creating new model version............................................OK
Exporting current model (version 1)...................................OK
Identifying any changed management instances..........................OK
Identifying any deleted objects.......................................OK
Verifying installations...............................................OK
Verifying instances...................................................OK
Creating new instances................................................OK
Updating grid state...................................................OK
Configuring instance authentication...................................OK
Pushing new configuration files to each instance......................OK
Making model version 1 current, version 2 writable....................OK
Checking ssh connectivity of new instances............................OK
Starting new management instance......................................OK
Configuring standby management instance...............................OK
Starting new data instances...........................................OK
ttGridAdmin modelApply complete
Given all the tasks you performed in the previous topics, the ttGridAdmin
modelApply
command performs the following
operations:
- Creates a copy of the installation files on every configured host:
- Creates the instance home directory and files for the standby management instance and data instances on their associated hosts:
- Makes the latest version of the model read-only and a creates a new writable model.
- Verifies SSH connectivity to every configured host.
- Starts the daemons of the standby management instance and data instances.
- Configures the active and standby management instances.
For more information on the ttGridAdmin modelApply
command, see
Apply
the Latest Version of the Model (modelApply) in Oracle TimesTen In-Memory Database
Reference.