You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 8 Next »

UNDER CONSTRUCTION


Welcome to the Getting Started Tutorial

  • Install Saga, Saga Server Parser and Saga UI.
  • Get an idea of how to start a Saga project using the Saga UI (no programming knowledge needed).


Prerequisites


  1. MongoDB 3.4+
  2. Node JS 6+
  3. Maven

Step 1: Download and Built the code


Saga is made up of several projects that can be used stand-alone or together. For this tutorial, we will be using the following projects to set up an instance of Saga and be able to start a new project:

  1. https://source.digital.accenture.com/projects/ST/repos/saga-library/browse
  2. https://source.digital.accenture.com/projects/ST/repos/saga-elasticsearch-action/browse
  3. https://source.digital.accenture.com/projects/ST/repos/saga-mongodb-provider/browse
  4. https://source.digital.accenture.com/projects/ST/repos/saga-openexchange-action/browse
  5. https://source.digital.accenture.com/projects/ST/repos/saga-sentence-breaker-stage/browse
  6. https://source.digital.accenture.com/projects/ST/repos/saga-spelling-alternatives-stage/browse
  7. https://source.digital.accenture.com/projects/ST/repos/saga-spellchecking-indexer/browse
  8. https://source.digital.accenture.com/projects/ST/repos/saga-entity-trainer/browse
  9. https://source.digital.accenture.com/projects/ST/repos/saga-action-framework/browse
  10. https://source.digital.accenture.com/projects/ST/repos/saga-server-parser/browse
  11. https://source.digital.accenture.com/projects/ST/repos/saga-server-ui/browse

Start by cloning each repository and building the projects in the previous order. From 1 to 10, can be built via Maven using the command:

mvn clean install


The eleventh package can be built via Node:

npm install

Step 2: Load a Mongo database


Saga Server Parser configuration files are specified in the Configure Pipelines & Resource Providers section. If you change any of those files in the src/main/resources/ folder, you need to rebuild the project or transfer the files to the directory specified in the startup.bat.

The eleventh package can be built via Node:

mongostore --db databaseName --drop .

Step 3: Configuring the environment


Saga Server Parser configuration files are specified in the Configure Pipelines & Resource Providers section. If you change any of those files in the src/main/resources/ folder, you need to rebuild the project or transfer the files to the directory specified in the startup.bat.

For the UI, you need to check the file in config/env/development.js. The display name, "Saga" in this case, is the name the UI will show for the project, but, what it is important is the uri attribute of the db, this is the database that Saga will be using. In the snippet, the database in use will be "SagaDB", change it according to your preference. If you loaded a Mongo database in step 2, you must change "SagaDB" to the name of the database you loaded.

solutions: [
{
display: 'Saga',
db: {
uri: process.env.MONGOHQ_URL || process.env.MONGOLAB_URI || 'mongodb://' + (process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost') + '/SagaDB',
options: {
keepAlive: 10000,
reconnectTries: 10
},

//Database info for patter matching server switch
host: process.env.DB_1_PORT_27017_TCP_ADDR || 'localhost',
port: 27017,
name: 'SagaDB',

// Enable mongoose debug mode
debug: process.env.MONGODB_DEBUG || false
},
matcher: {
uri: 'http://localhost:8080/_saga'
}
}
]

On this page:

Related pages




  • No labels