deployment
project-build-environment grammar version 41
model | 105 | application |
---|---|---|
interface | 20 | interface |
auto-webclient | xindi.1 | generator_settings |
generator_annotations | ||
phrases | ||
query | ||
translations | ||
parameters | ||
connector | 36.5 | processor |
variables | ||
datastore | 113 | consumed_interfaces_mapping |
provided_interface_implementation | ||
migration_mapping | ||
regular_expression_engine | ||
relational-database-bridge | 109 | database |
database_transformation | ||
sql-mirror | 109.1 | sql_mapping |
webclient | xindi.1.1 | views |
widget | ||
client bindings | ||
gui_model | ||
phrases | ||
translations | ||
settings | ||
parameters | ||
project-build-environment | 41 | wiring |
deployment |
Deployment
In order to run an Alan application it needs to be deployed by an Alan Application Server.
A deployment.alan
file contains instructions for the deployment, such as the source of the initial data and configuration.
Application Servers
The application-servers
section lists all the Application Servers needed for the deployment.
The Application Server performing the deployment can be referenced with the keyword local
.
'application servers': [ application-servers ] dictionary {
'type': [ : ] stategroup (
'remote' {
'socket': component 'tcp socket'
}
'host' { [ local ] }
)
}
External Systems
The wiring.alan
file declares which external sources your applications require.
In the deployment.alan
, you need to provide the exact location of these sources.
For specifying a source location, you can use
- a TCP/IP address describing where the source excepts connections, or
- a path on an Alan Application Server, consisting of an
application-servers
name, a stack name and aprovided-connections
name, taken from thewiring.alan
of the other stack.
'external systems': [ external-systems ] dictionary {
'mapping type': [ : ] stategroup (
'static' {
'routing': stategroup (
'direct' {
'socket': component 'tcp socket'
}
'application server' {
'server': reference
'stack': [ / ] text
'route': [ / ] text
}
)
}
'dynamic' {
'targets': dictionary {
'server': [ = ] reference
'stack': [ / ] text
'route': [ / ] text
}
}
)
}
Systems
The systems
section provides deployment specific information for each system mentioned in a wiring.alan
file.
Depending on the System Type, a system may require additional configuration, instance data, or a schedule.
Configuration
For systems requiring additional configuration, you can either
- use a template from a list of templates for the System Type, and override specific options, or
- use a
custom
configuration, where all options are set by the deployment.
Instance Data
Some systems require data to function (instance data). To provide data for a system, you can either
- use the keyword
local
for the local file system, or - use the keyword
from
followed by the name of an Application Server, to download the most recent version of the instance data from another stack.
At deploy time, transformations can be applied to your instance data. A transformation can be
- a
migration
, transforming data conforming to an older model to instance data conforming to a new model, or - a
conversion
from a list of predefined conversions for the System Type.
Schedule
Some systems require a schedule to perform tasks at specific moments in time.
'systems': [ systems ] dictionary {
'configuration': [ configuration: ] group {
'base': stategroup (
'template' {
'template': reference
}
'custom' { [ custom ] }
)
'options': dictionary {
'value': [ = ] component 'value switch'
}
}
'instance data': stategroup (
'yes' { [ instance-data: ]
'source': stategroup (
'local' { [ local ] }
'remote' { [ from ]
'server': reference
'stack name': [ / ] text
'system name': [ / ] text
}
)
'transformations': group { // TODO: dynamic-order
'migrate': stategroup (
'yes' { [ @migrate ] }
'no' { }
)
'convert': stategroup (
'yes' { [ @conversion: ]
'conversion': reference
}
'no' { }
)
}
}
'no' { }
)
'schedule': stategroup (
'yes' { [ schedule: ]
'schedule': component 'schedule'
}
'no' { }
)
}
Component rules
'tcp socket' {
'host': text
'port': integer
}
'value' {
'data type': stategroup (
'choice' {
'type': stategroup (
'multiple' {
'choices': [ [, ] ] dictionary { }
}
'single' {
'choice': reference
}
)
}
'number' {
'value': integer
}
'text' {
'value': text
}
)
}
'schedule' {
'trigger': stategroup (
'every day' { [ every day ]
'trigger': stategroup (
'every hour' { [ every hour ]
'every': component 'minute list'
}
'select hours' {
'every': component 'hour list'
}
)
}
'select days' { [ every ]
'sunday': stategroup (
'yes' {
'day': [ Sunday ] component 'day'
}
'no' { }
)
'monday': stategroup (
'yes' {
'day': [ Monday ] component 'day'
}
'no' { }
)
'tuesday': stategroup (
'yes' {
'day': [ Tuesday ] component 'day'
}
'no' { }
)
'wednesday': stategroup (
'yes' {
'day': [ Wednesday ] component 'day'
}
'no' { }
)
'thursday': stategroup (
'yes' {
'day': [ Thursday ] component 'day'
}
'no' { }
)
'friday': stategroup (
'yes' {
'day': [ Friday ] component 'day'
}
'no' { }
)
'saturday': stategroup (
'yes' {
'day': [ Saturday ] component 'day'
}
'no' { }
)
}
'never' { [ never ] }
)
}
'day' {
'every': component 'hour list'
}
'hour list' {
'at hour': [ at ] integer
'at minute': [ : ] integer
'has tail': stategroup (
'yes' {
'tail': component 'hour list'
}
'no' { }
)
}
'minute list' {
'at minute': [ at ] integer
'has tail': stategroup (
'yes' {
'tail': component 'minute list'
}
'no' { }
)
}