Golem users execute tasks on remote computers.
In this exercise, you will learn how to create a script that will run a task on a remote node and utilize a specific Golem image.
Create a script that will run a fortune
command on the remote node and display the output. For this task, you can use a Golem-provided image containing the fortune
command. That image's hash
is 1e65223a888bd7a4521e06ba7f3f3ba648e8a09ffd18f3658efba336
.
Please observe how long it takes to complete the technical part of the tasks. We will ask you for such information in the feedback form.
-
Modify the
main.mjs
script to execute the fortune commands. -
Run the script and verify the output.
-
Add changes in the
run-a-task
directory. -
Fill out the feedback form and publish changes in your repository fork.
-
See Golem JS QuickStart and JS QuickStart Explained.
-
The
fortune
command is available in the/usr/games
directory within the image. -
The usage example of the
fortune
command:fortune -l
will produce a sentence from literature, i.e.:When I was younger, I could remember anything, whether it had happened or not; but my faculties are decaying now and soon I shall be so I cannot remember any but the things that never happened. It is sad to go to pieces like this but we all have to do it. -- Mark Twain
fortune -i
will produce a short fortune, i.e.:Don't hate yourself in the morning -- sleep till noon.
-
You can always ask on the Discord
#js-discussion
channel in the SDK section.