You will need:
- Docker Compose
- Node.js 14.13.1 or greater
- Yeoman 4.1.0 or greater (can be installed with
npm install -g yo)
Olympe provides package @olympeio/generator-project, a Yeoman generator to help users quickly scaffold a CODE project. The generator installs all dependencies and create all configuration and runtime files needed to execute Olympe apps and build Olympe libraries. To install it run
npm install --global @olympeio/generator-project
To setup a new project, create an empty directory, navigate to it and call the Yeoman generator:
The generator will ask you multiple questions. In the following example, we create a new project from scratch named
My Test Project in which we want to create a runnable application without React:
You have the following options when creating a project:
- Create a new project or import an existing project from a server.
- Create runnable applications or a library. Applications may be run directly in the browser whereas a library is intended to provide a set of functions or components that can be used in another project.
- Integrate React framework.
You can always run again the generator later to change options.
Yeoman automatically generates a descriptor indicating how to retrieve and start an Olympe backend that is necessary to work locally. To start this backend, make sure docker is running, then call
docker compose up --detach
This launches two docker containers: the Neo4j database and the Olympe Orchestrator. You can check that everything is up-and-running by visiting http://localhost:8080/status/. All boxes should be green.
If you experience an error -- possibly because you have executed the Olympe backend sometime else in the past --, run
docker container prune to remove stopped containers. If the problem persists, you will have to remove the container that conflicts using
docker stop <hash> and then
docker rm <hash>.
Once Neo4j and the Olympe Orchestrator are running, you can initialise the database with your new project:
npm run reset
This will erase all the content of your Neo4j database. If have already set up a DRAW project, you should snapshot your project before proceeding. If your database is otherwise empty, you can safely ignore the snapshot step:
Taking a snapshot will dump the content of your project on the data cloud to your local drive.
Finally, launch DRAW by running
npm run serve
You can finally visit http://localhost:8888/ to start working in DRAW.