Step 2: Running Your Own Job
Now that you have the Bacalhau CLI installed, what can you do with it? Just about anything! Let's walk you through running some very simple jobs.
Submit a Hello World job
To submit a job in Bacalhau, we will use the bacalhau docker run
command. The command runs a job using the Docker executor on the node. Let's take a quick look at its syntax:
To run the job, you will need to connect to a public demo network or set up your own private network. In the following example, we will use the public demo network by using the --configuration
flag.
We will use the command to submit a Hello World job that runs an echo program within an Alpine container.
Let's take a look at the results of the command execution in the terminal:
After the above command is run, the job is submitted to the selected network, which processes the job and Bacalhau prints out the related job id:
The job_id
above is shown in its full form. For convenience, you can use the shortened version, in this case: j-de72aeff
.
The output will look something like the following:
With that, you have just successfully run a job on Bacalhau! 🐟 Congratulations!
Last updated