The steps in this tutorial will allow you to:
- code and run your own bricks locally
- run Service Apps as back-ends
Prerequisites for installing Olympe
You will need to have the following installed:
- Node.js 18 or greater
- Note: while npm is also needed, it comes directly whenever Node.js is installed
- Your favorite IDE e.g. Visual Studio Code
- Linux & macOS
Open a Terminal window and run the following command in a folder of your choice. It will create an "olympe" folder there and install Olympe inside it
/bin/bash -c "$(curl -fsSl https://support-dev.olympe.ch/olympe_install.sh)"
Then navigate to the newly created "olympe" folder
Finally launch DRAW
npm run serve
To stop the server, press Ctrl-C.
Closing the terminal window, will also stop the process.
Restart it with the "npm run serve" command.
Open a PowerShell window Make sure that you have the rights to execute scripts by executing the following command
Set-ExecutionPolicy -ExecutionPolicy Bypass -Scope CurrentUser
Execute the script
Invoke-Expression ((New-Object System.Net.WebClient).DownloadString('https://support-dev.olympe.ch/olympe_install.ps1'))
Navigate to the newly created "olympe" folder
npm run serve
If asked, allow access to Node.js
To stop the server
- Hit CTRL+C 2 times
- Confirm you want to end the process by pressing the Y key
- If it does not work, open a new PowerShell window and run the following command
taskkill /F /IM node.exe
Start composing with DRAW
- In your browser, open this url http://localhost:8888/
- Authenticate with your Community credentials
- See that your Community projects are present
Also, take a look at the
README.md file for more details on the local commands.
Launch a Service App as a back-end service
If you have a Service App and want to run it as an actual node.js back-end process, these are the steps to follow:
Get the tag (the Olympe unique identifier) of the Service App from the context menu of the Service App:
Then use it as the value of the parameter
sc.appin the file
res/oConfigNode.jsof your project:
"sc.app": "<your application tag>"
Finally, run your service application using the following command:
npm run serve:node
How it works
A full Olympe runtime has multiple components. The installation above only sets up the minimal set of components locally. When building and running coded bricks or a Service App locally, the Olympe runtime is are started locally, and it then connects to an event bus and to the Olympe Orchestrator running in the Olympe Cloud. The runtime then retrieves the app composition from the Community environment and then starts running the application.
You can therefore collaborate freely with other Community DRAW users. Updates done in DRAW will be distributed in realtime to all users just like if you were logged into the DRAW Community cloud instance, and vice versa. Your coded bricks though, will remain local.
This is a summary of what runs where:
|When running locally||When connected to https://community.fluidapp.io|
|Web server||Runs locally (webpack server)||Runs in the cloud|
|DRAW||Runs locally||Runs in the cloud|
|CODE||Runs locally||New code cannot be deployed on the community. Get in touch to get a dedicated instance.|
|Olympe Orchestrator||Runs in the cloud||Runs in the cloud|
|RabbitMQ||Runs in the cloud||Runs in the cloud|
|Database||Runs in the cloud||Runs in the cloud|
Updating your setup after a new Olympe release
When a new release occurs, your
package.json file also needs to be updated.
The goal is to have you local setup properly in synch with the online Community.
For instance, when release 2.2.2 was out, the following changes had to be made to update the olympe dependencies in the setup's package.json file:
Fetch these package.json dependencies info automatically
- Simply generate a new project from scratch inside a different folder using this same tutorial mentioned above
- Copy-paste the
package.jsonto get the lastest versions of the dependencies.
- Then, don't forget to
run npm installin your project.