Skip to main content
Version: 2.1

Install CODE and DRAW

info

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 necessary 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:

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

Troubleshooting EACCESS errors

If you face EACCESS errors when trying to run the previous command, you probably need to fix how npm is installed on your environment. You'll find more informations on the following NPM documentation page: Resolving EACCES permissions errors when installing packages globally

Generate an Olympe project

To set up a new project, create an empty directory, navigate to it and call the Yeoman generator:

yo @olympeio/project

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:

generatorPrompting

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.

The generator fetch automatically the compatible versions of DRAW, Olympe runtime, and Olympe Orchestrator.

note

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. This docker composes also creates docker volumes for your data. You can list docker volumes with docker volume ls. The volumes used by your project are named like so:

<PROJECT_FOLDER>_backend-neo4j-data
<PROJECT_FOLDER>_backend-neo4j-logs
<PROJECT_FOLDER>_backend-orchestrator-files

with <PROJECT_FOLDER> being the name of the directory in which you create your olympe project.

note

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

note

If you already ran the installation process for an Olympe project, you can delete any docker volumes that are not used by any container by running docker volume prune. This ensures you do not use volumes of an old olympe project.

Initialise the database

Once Neo4j and the Olympe Orchestrator are running, you can initialise the database with your new project and a default admin/admin user/password combination. You will need these credentials to log in to DRAW, please remember these. See the next tip to choose your credentials. To initialise the database, run:

npm run reset
tip

To use a custom password for your DRAW admin account, execute instead the command with an additional argument:

npm run reset -- --project.userPassword="admin"

replacing admin between the quotes with the password of your choice. Your username still is admin.

danger

This will erase all the content of your Neo4j database. If you 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:

npmRunReset

Taking a snapshot will dump the content of your project on the data cloud to your local drive.

Launch DRAW

Finally, launch DRAW by running

npm run serve

You can finally visit http://localhost:8888/ to start working in DRAW. Authenticate with the default user/password admin/admin or the one you defined in the previous section.

That's all! You can now take a look at our guides and tutorials, and start building a first app and add a first coded function.