If you are interested in testing your ideas in DRAW, the Olympe Community offers free on-premise access to Olympe DRAW, without any installation step required.
If you are not already a member of our Community, go ahead and register to unlock the potential of DRAW.
If you would like to code to create your own bricks, then the below procedure will guide through the neccessary steps to install CODE locally. And if you code a cool brick, share it with us in the Community 😊
Prerequisites for installing CODE
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)
Installing the Olympe Yeoman generator
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
Generate an Olympe 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.
Start the Olympe backend
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>.
Initialise the database
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.