Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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).

, this is what you will achieve by follow the next steps:

  • Setup the environment.
  • Deploy Saga.
  • Run Saga.
  • Check it's working!.

Prerequisites


  1. Elasticsearch 6.4.1 or above.
  2. Java 11 or above.

Note

This guide assumes you already have an stable Saga release such as 1.0 or above.

Step 1: Set up enviroment


  1. Check Java 11 is installed on your machine by running on terminal (or system console):

    $> java -version

  2. Uncompress Saga in your prefered location. This is our recommended setup but you can pretty much handle the paths as you wish. This guide will refer to Saga's working directory as {SAGA_HOME}.
  3. Saga uses Elasticsearch (6.4.1 or above) and you can get it here.
    1. Deploy Elasticsearch (ES) under {SAGA_HOME} in something like {SAGA_HOME}/Elasticsearch-6.4.1.
    2. Run ES by executing the binary on {SAGA_HOME}/Elasticsearch-6.4.1/bin.

Step 2: Deploy Saga


Once you have Saga in {SAGA_HOME} validate the following:

  1. There is a {SAGA_HOME}/lib folder containing the following JARs:
    1. saga-classification-trainer-stage-1.0.0-SNAPSHOT
    2. saga-elastic-provider-1.0.0-SNAPSHOT
    3. saga-name-trainer-stage-1.0.0-SNAPSHOT

Prerequisites

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

Step 1: Download and Build the code

Saga is made up of several projects that can be used stand-alone or together. For this tutorial, we'll 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-indexer/browse
  9. https://source.digital.accenture.com/projects/ST/repos/saga-elastic-indexer/browse
  10. https://source.digital.accenture.com/projects/ST/repos/saga-entity-trainer/browse
  11. https://source.digital.accenture.com/projects/ST/repos/saga-action-framework/browse
  12. https://source.digital.accenture.com/projects/ST/repos/saga-server-parser/browse
  13. 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, you can build each of them by using the following command in each project:

...> mvn clean install

The eleventh package can be built via Node:

.../saga-server-ui> npm install

Step 2: Load a Mongo database

If you have any database to use with saga, just run the following command in the database folder to import it to Mongo:

.../database/directory> mongostore --db databaseName --drop .

Make sure Mongo is up and running before running the previous command, otherwise you will get a message of running and unknown command.

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 saga-server-parser/src/main/resources folder, you need to rebuild the project or transfer the files to the directory specified in the saga-server-parser/startup.bat.

For the UI, you need to check the file in config/env/development.js. The display name, "Saga" in following snippet, is the name the UI will show for the project, but what it is important is the uri attribute from 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. If you want to start a new database, just choose a proper name and the UI will create the database.

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'

}

}

]


Step 4: Starting Saga


Before starting Saga, make sure Mongo is up and running. Try to run:

...> mongo

If the command does not run, run the following command from the MongoDB/Server/3.6/bin:

.../MongoDB/Server/3.6/bin> mongod

Then, you will need to run the Saga Server Parser and the Saga Server UI. The first to be run is the Saga Server UI, since it will create the database if it doesn't exist. Go to the Saga Server UI directory and run the startup.bat from a console:

.../saga-server-ui> startup.bat


And then do the same for the Saga Server Parser:

.../saga-server-parser> startup.bat


If you didn't change the port, you should be able to access saga at http://localhost:8080/


Panel

On this page:

Table of Contents

Related pages

Content by Label
showLabelsfalse
spacessaga131
showSpacefalse
sorttitle
typepage
cqllabel = "documentation-space-sample" and type = "page" and space = "saga131"
labelsdocumentation-space-sample

...