|
Key
This line was removed.
This word was removed. This word was added.
This line was added.
|
Changes (2)
View Page History{section}
h2. The Roboconf application "Sample PVC"
Our PVC will:
To be highly available, all Petals components are duplicated at least twice. The PostgreSQL database should be also highly available, but to simplify the comprehension we will use only one instance of the database.
So at the definition of an empty PVC, we add the following Roboconf models:
{section}
{column}
*Component definitions*
{code}
import petals-pvc/main.graph;
PetalsBCSoap {
extends: PetalsBC;
exports: httpPort = 8084;
}
PostgreSQL-VM {
installer: target;
children: PostgreSQLServer;
}
PostgreSQLServer {
installer: script;
children: ActivitiPgSQLDatabase;
}
ActivitiPgSQLDatabase {
installer: script;
exports: ip, databaseName = database-name, databaseUser = database-user, databasePwd = database-pwd;
}
PetalsSLPostgreSQL {
extends: PetalsSL;
# As SL are not supported by Roboconf because:
# - a SL export no configuration parameter
# - Roboconf is not able to manage local dependency
# We create a dummy exported variable and work with only one instance of Petals SE Activiti over all Petals containers
exports: present = true;
}
PetalsSEActiviti {
extends: PetalsSE;
# See comment on PetalsSLPostgreSQL
imports: PetalsSLPostgreSQL.present, ActivitiPgSQLDatabase.*;
}
SU-Activiti-VacationRequest {
extends: PetalsSU;
}
SU-SOAP-VacationServiceConsumer {
extends: PetalsSU;
}
SU-SOAP-NotificationServiceProvider {
extends: PetalsSU;
}
SU-SOAP-ArchivingServiceProvider {
extends: PetalsSU;
}
SU-SOAP-ActivitiIntegrationConsumer {
extends: PetalsSU;
}
{code}
{column}
{column}
*Default instantiation*
{code}
##########################
# Registry part
##########################
instance of PetalsRegistry-VM {
name: registry-bootstrap-vm;
instance of PetalsRegistryMaster {
name: registry-bootstrap-node;
memberId: registry-bootstrap-node;
}
}
instance of PetalsRegistry-VM {
name: registry-vm-1;
instance of PetalsRegistrySlave {
name: registry-node-1;
memberId: registry-node-1;
}
}
##########################
# Container part
##########################
instance of PetalsContainer-VM {
name: container-bootstrap-vm;
instance of PetalsContainerBootstrap {
name: container-bootstrap-node;
containerId: container-bootstrap-node;
domainName: roboconf-demo;
subdomainName: roboconf-demo-1;
instance of PetalsSLPostgreSQL {
name: petals-sl-postgresql-9.4-1201-jdbc4;
}
instance of PetalsBCSoap {
name: petals-bc-soap;
instance of SU-SOAP-VacationServiceConsumer {
name: su-SOAP-vacationService-consume;
}
instance of SU-SOAP-NotificationServiceProvider {
name: su-SOAP-notifyVacationService-provide;
}
instance of SU-SOAP-ArchivingServiceProvider {
name: su-SOAP-archiveService-provide;
}
instance of SU-SOAP-ActivitiIntegrationConsumer {
name: su-SOAP-activitiIntegrationService-consume;
}
}
instance of PetalsSEActiviti {
name: petals-se-activiti;
instance of SU-Activiti-VacationRequest {
name: su-activiti-vacationService-provide;
}
}
}
}
instance of PetalsContainer-VM {
name: container-vm-1;
instance of PetalsContainer {
name: container-node-1;
containerId: container-node-1;
instance of PetalsSLPostgreSQL {
name: petals-sl-postgresql-9.4-1201-jdbc4;
}
instance of PetalsBCSoap {
name: petals-bc-soap;
instance of SU-SOAP-VacationServiceConsumer {
name: su-SOAP-vacationService-consume;
}
instance of SU-SOAP-NotificationServiceProvider {
name: su-SOAP-notifyVacationService-provide;
}
instance of SU-SOAP-ArchivingServiceProvider {
name: su-SOAP-archiveService-provide;
}
instance of SU-SOAP-ActivitiIntegrationConsumer {
name: su-SOAP-activitiIntegrationService-consume;
}
}
instance of PetalsSEActiviti {
name: petals-se-activiti;
instance of SU-Activiti-VacationRequest {
name: su-activiti-vacationService-provide;
}
}
}
}
##########################
# Other resources
##########################
instance of PostgreSQL-VM {
name: postgresql-vm;
instance of PostgreSQLServer {
name: postgresql-server;
instance of ActivitiPgSQLDatabase {
name: activiti-database;
databaseName: activiti;
# The database user name must be defined in lower case and '-' is forbidden
databaseUser: petalsseactiviti;
databasePwd: PetalsSeActiviti;
}
}
}
{code}
{column}
{section}