Bacalhau

Bacalhau

Share this post

Bacalhau
Bacalhau
Create Your First Bacalhau Job
User's avatar
Discover more from Bacalhau
Compute Over Data
Already have an account? Sign in

Create Your First Bacalhau Job

Deploy your first job on the Bacalhau network (5 min)

Michael Hoepler's avatar
Michael Hoepler
Oct 13, 2023
6

Share this post

Bacalhau
Bacalhau
Create Your First Bacalhau Job
4
Share

Background

Deploying and coordinating Docker containers in a production environment can be quite the challenge. This is where our open-source project Bacalhau comes in handy and the reason why we at Expanso developed this project in the first place. The Bacalhau Project enables you to deploy containers on a network of endpoints, the so-called nodes, while being secure, fast, and cost-efficient. This architecture is referred to as Compute over Data (CoD) and enables users to run compute jobs where the data is generated and stored, the so-called edge. You can read more in this post about the Bacalhau project.

Step 1: Installation of CLI

To install Bacalhau on your local machine you execute the following command on your terminal. This installs or updates the Bacalhau CLI just on your local device.

curl -sL https://get.bacalhau.org/install.sh | bash

This command installs the latest Bacalhau version, which we can check with the version command.

bacalhau version

If you're wondering which server is being used, the Bacalhau Project has a public Demo network that's shared with the community (anyone can access this network). We will use this network for the ease of use, as this server allows you to launch your jobs from your computer without maintaining a compute cluster on your own. You can also deploy your own private network following this tutorial.

Step 2: Submit Your First Job

After having installed the CLI, we can now directly interact with the network. This makes our lives easier, because we can now use the bacalhau command pallet to submit a job in Bacalhau. Let's take a quick look at its syntax.

bacalhau docker run [FLAGS] IMAGE[:TAG] [COMMAND]

This command is pretty similar to the one used for docker and allows for three different inputs: potential flags, the required image we want to use and the command we want to execute. Here you can learn more about the usable commands. This can look as the following.

bacalhau docker run ubuntu echo Hello World

This now runs the echo “Hello World” command against the pre-installed ubuntu image on the public network. The results should be a command line output, which confirms the successful job execution.

Congratulations, you just ran your first job on Bacalhau!

Step 3: Checking The Status

After successfully submitting our first job, we also want to check the status. In order to uniquely identify your job, the job_id above is shown in its full form. For convenience, you can use the shortened version (in this case: 3b39baee) and execute the list command. Your job ID will differ from this example, as the IDs are unique for a network. You can find your job ID in the command line output.

bacalhau list --id-filter 3b39baee

This will list the job IDs starting with 3b39baee and their job information. We can also describe the executed commands, to get better insights.

bacalhau describe 3b39baee

Step 4: View The Output

After checking the status of our job, we can now download the job results. This may seem over the head for a “Hello world” command, but comes in handy when executing large scale jobs. You can download your job results directly by using bacalhau get. In the command below we download our job output to be stored in our local directory. For this the default user directory is used, which should be stated in your command line output.

bacalhau get 3b39baee

To get the results from the job executed on the Bacalhau network, we can just read the output file in our job folder.

cat job-3b39baee/stdout

This prints out the string output produced by our job to your local command line. The job output folder contains multiple files, containing all the important information from your job execution. You can have a look inside and explore the other files.


What’s Next? 

After completing our first job on Bacalhau, one can now onboard existing Docker or WASM workloads to work with Bacalhau or can also setup your own private Bacalhau network.

Stay tuned as we continue to enhance and expand Bacalhau's capabilities. We are relentlessly committed to delivering groundbreaking updates and improvements. Don't miss out on being part of this exciting journey.

The Bacalhau project is available today as Open Source Software. The public GitHub repo can be found here. If you like the project, please give us a star ⭐ 🙂

We're looking for help in several areas. If you're interested in helping out, there are several ways to contribute and you can always reach out to us via Slack or Email.


⭐️ GitHub

Slack

Website

Thanks for reading our blog post. Subscribe here to stay up to date.

David Aronchick's avatar
Tony Evans's avatar
Michael Hoepler's avatar
Lawrence Rowland's avatar
Laura Hohmann's avatar
6 Likes∙
4 Restacks
6

Share this post

Bacalhau
Bacalhau
Create Your First Bacalhau Job
4
Share

Discussion about this post

User's avatar
Tutorial: Building a Distributed Data Warehousing Without a Data Lake
A step-by-step guide (9 min)
Nov 2, 2023 • 
Ross Jones
 and 
Michael Hoepler
6

Share this post

Bacalhau
Bacalhau
Tutorial: Building a Distributed Data Warehousing Without a Data Lake
U.S. Navy Chooses Bacalhau to Manage Predictive Maintenance Workloads
Bacalhau deployment example (4 min)
Nov 29, 2023 • 
Michael Hoepler
 and 
David Aronchick
6

Share this post

Bacalhau
Bacalhau
U.S. Navy Chooses Bacalhau to Manage Predictive Maintenance Workloads
Bacalhau 1.0: Unlocking The Potential of Private Data
New simple job and data moderation features in Bacalhau 1.0 unlock new data sharing, federated learning and compute islands using private data.
Jun 20, 2023 • 
Simon Worthington
6

Share this post

Bacalhau
Bacalhau
Bacalhau 1.0: Unlocking The Potential of Private Data

Ready for more?

© 2025 Expanso
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share

Create your profile

User's avatar

Only paid subscribers can comment on this post

Already a paid subscriber? Sign in

Check your email

For your security, we need to re-authenticate you.

Click the link we sent to , or click here to sign in.