Skip to content

Commit ade64ba

Browse files
Merge branch 'main' into chrischinch/docs-updates
# Conflicts: # docs/references/developers/running-locally.md # package-lock.json # package.json
2 parents 8f9aba2 + 22e1008 commit ade64ba

File tree

8 files changed

+1111
-129
lines changed

8 files changed

+1111
-129
lines changed

.github/workflows/pr-checks.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,16 @@ on:
44
pull_request:
55
types: [opened, synchronize, reopened]
66

7-
87
jobs:
9-
build:
10-
name: Build
8+
spell-check:
9+
name: Spell Check
1110
runs-on: ubuntu-latest
1211
steps:
1312
- name: Checkout code
1413
uses: actions/checkout@v4
1514

1615
- name: Setup Environment
17-
uses: ./.github/actions/setup-environment
16+
uses: ./.github/actions/setup-environment
17+
18+
- name: Run spell check
19+
run: npm run spell-check

cspell.json

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"files": ["**/*.{md,mdx,ts,tsx,js,jsx,json}"],
5+
"ignorePaths": ["package-lock.json", "yarn.lock", "*.log"],
6+
"ignoreRegExpList": ["/```[\\s\\S]*?```/", "/`[^`]*`/"],
7+
"allowCompoundWords": true,
8+
"dictionaries": ["en", "en-gb", "softwareTerms", "typescript", "node", "npm", "html", "css", "markdown"],
9+
"useGitignore": true,
10+
"caseSensitive": false,
11+
"minWordLength": 3,
12+
"words": [
13+
"bacalhau",
14+
"docusaurus",
15+
"mdx",
16+
"swizzle",
17+
"wrangler",
18+
"clsx",
19+
"prism",
20+
"tsconfig",
21+
"ipfs",
22+
"expanso",
23+
"idx",
24+
"boinc",
25+
"desci",
26+
"GTM",
27+
"cuda",
28+
"milli",
29+
"millicores",
30+
"webui",
31+
"libp2p",
32+
"duckdb",
33+
"myvalue",
34+
"oom"
35+
]
36+
}

docs/cli/config/set.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ node:
6565

6666
### Set command value validation
6767

68-
#### Example of invalid logging mode valu
68+
#### Example of invalid logging mode value
6969

7070
```bash
7171
bacalhau config set node.loggingmode some-invalid-value
Lines changed: 48 additions & 116 deletions
Original file line numberDiff line numberDiff line change
@@ -1,171 +1,103 @@
1-
---
2-
icon: location-exclamation
3-
description: How to run a Bacalhau devstack locally
4-
---
1+
# Running Locally with Devstack
52

6-
# Running Locally In Devstack
3+
Bacalhau's devstack provides a quick way to spin up a local testing environment with multiple nodes. This is perfect for development, testing, or simply exploring Bacalhau's capabilities without setting up a full production environment.
74

8-
You can run a stand-alone Bacalhau network on your computer with the following guide.
5+
## Prerequisites
96

10-
The `devstack` command of `bacalhau` will start a 4 node cluster with 3 compute and 1 requester nodes.
7+
- **Docker Engine**: Must be installed and running
8+
- **Bacalhau**: Latest version installed
119

12-
This is useful to kick the tires and/or developing on the codebase. It's also the tool used by some tests.
10+
## Installation
1311

14-
## Pre-requisites
15-
16-
1. `x86_64` or `ARM64` architecture
17-
1. Ubuntu 20.0+ has most often been used for development and testing
18-
2. [Docker Engine](https://docs.docker.com/get-docker/)
19-
3. Latest Bacalhau release
20-
21-
## Install Bacalhau
22-
23-
You can install the Bacalhau CLI by running this command in a terminal:
12+
If you haven't installed Bacalhau yet:
2413

2514
```bash
2615
curl -sL https://get.bacalhau.org/install.sh | bash
2716
```
2817

29-
See the [installation guide](running-locally.md#install-bacalhau) for more installation options.
18+
## Starting the Devstack
3019

31-
## Start the cluster
20+
Starting a local devstack is as simple as:
3221

3322
```bash
3423
bacalhau devstack
3524
```
3625

37-
This will start a 4 node Bacalhau cluster.
26+
When initialization completes, you'll see a confirmation message:
3827

39-
Once everything has started up - you will see output like the following:
40-
41-
```bash
28+
```
4229
Devstack is ready!
4330
No. of requester only nodes: 1
4431
No. of compute only nodes: 3
4532
No. of hybrid nodes: 0
46-
To use the devstack, run the following commands in your shell:
47-
48-
export BACALHAU_API_HOST=0.0.0.0
49-
export BACALHAU_API_PORT=34217
5033
```
5134

52-
The message above contains the environment variables you need for a new terminal window. You can paste these into a new terminal so that `bacalhau` will use your local devstack. Execute the [bacalhau node list](/cli/node/list.md) command to see the devstack cluster structure:
35+
## Using Your Devstack
36+
37+
By default, devstack configures the orchestrator to run on the standard port (1234), so you can immediately use it without additional settings. Open a new terminal window and test your connection:
5338

5439
```bash
5540
bacalhau node list
56-
ID TYPE APPROVAL STATUS LABELS CPU MEMORY DISK GPU
57-
node-0 Requester APPROVED CONNECTED Architecture=amd64 Operating-System=linux
58-
env=devstack id=node-0 name=node-0
59-
node-1 Compute APPROVED CONNECTED Architecture=amd64 Operating-System=linux 1.4 / 2.7 GB / 13.1 GB / 0 /
60-
env=devstack id=node-1 name=node-1 1.4 2.7 GB 13.1 GB 0
61-
node-2 Compute APPROVED CONNECTED Architecture=amd64 Operating-System=linux 1.4 / 2.7 GB / 13.1 GB / 0 /
62-
env=devstack id=node-2 name=node-2 1.4 2.7 GB 13.1 GB 0
63-
node-3 Compute APPROVED CONNECTED Architecture=amd64 Operating-System=linux 1.4 / 2.7 GB / 13.1 GB / 0 /
64-
env=devstack id=node-3 name=node-3 1.4 2.7 GB 13.1 GB 0
6541
```
6642

67-
## New Terminal Window
68-
69-
Open an additional terminal window to be used for submitting jobs. Copy and paste environment variables from previous message into this window, e.g.:
43+
You should see the nodes in your devstack:
7044

71-
```bash
72-
export BACALHAU_API_HOST=0.0.0.0
73-
export BACALHAU_API_PORT=34217
45+
```
46+
ID TYPE APPROVAL STATUS LABELS
47+
node-0 Requester APPROVED CONNECTED Architecture=amd64 Operating-System=linux
48+
env=devstack id=node-0 name=node-0
49+
node-1 Compute APPROVED CONNECTED Architecture=amd64 Operating-System=linux
50+
env=devstack id=node-1 name=node-1
51+
node-2 Compute APPROVED CONNECTED Architecture=amd64 Operating-System=linux
52+
env=devstack id=node-2 name=node-2
53+
node-3 Compute APPROVED CONNECTED Architecture=amd64 Operating-System=linux
54+
env=devstack id=node-3 name=node-3
7455
```
7556

76-
You are now ready to submit a job to your local devstack.
77-
78-
## Submit a simple job
57+
## Running a Simple Job
7958

80-
This will submit a simple job to a single node:
59+
Submit a simple job to test your devstack:
8160

8261
```bash
83-
bacalhau docker run \
84-
--publisher local \
85-
alpine echo "hello devstack test"
62+
bacalhau docker run alpine echo "hello devstack"
8663
```
8764

88-
This should output something like the following:
89-
90-
```bash
91-
Job successfully submitted. Job ID: j-5b0ee6dd-6080-4277-99ce-fdf179907b25
92-
Checking job status... (Enter Ctrl+C to exit at any time, your job will continue running):
65+
Note that no publisher is needed for basic testing - Bacalhau will handle the job execution without storing results to any external location.
9366

94-
TIME EXEC. ID TOPIC EVENT
95-
11:06:24.789 Submission Job submitted
96-
11:06:24.798 e-4fba1f7c Scheduling Requested execution on node-1
97-
11:06:24.828 e-4fba1f7c Execution Running
98-
11:06:25.173 e-4fba1f7c Execution Completed successfully
67+
## Advanced Configuration
9968

100-
To get more details about the run, execute:
101-
bacalhau job describe j-5b0ee6dd-6080-4277-99ce-fdf179907b25
69+
Devstack accepts the same configuration options as the `bacalhau serve` command. Here are some useful configuration examples:
10270

103-
To get more details about the run executions, execute:
104-
bacalhau job executions j-5b0ee6dd-6080-4277-99ce-fdf179907b25
105-
To download the results, execute:
106-
bacalhau job get j-5b0ee6dd-6080-4277-99ce-fdf179907b25
107-
108-
```
71+
### Customizing Resource Limits
10972

110-
Use [bacalhau job describe](/cli/job/describe.md) command to view results:
73+
Limit the CPU and memory allocation for compute nodes:
11174

11275
```bash
113-
bacalhau job describe j-5b0ee6dd-6080-4277-99ce-fdf179907b25
76+
bacalhau devstack -c Compute.AllocatedCapacity.CPU="50%" -c Compute.AllocatedCapacity.Memory="2Gi"
11477
```
11578

116-
This should output info about job execution and results:
79+
### Configuring Job Defaults
11780

118-
```bash
119-
ID = j-5b0ee6dd-6080-4277-99ce-fdf179907b25
120-
Name = j-5b0ee6dd-6080-4277-99ce-fdf179907b25
121-
Namespace = default
122-
Type = batch
123-
State = Completed
124-
Count = 1
125-
Created Time = 2024-10-30 10:06:24
126-
Modified Time = 2024-10-30 10:06:25
127-
Version = 0
128-
129-
Summary
130-
Completed = 1
131-
132-
Job History
133-
TIME TOPIC EVENT
134-
2024-10-30 11:06:24 Submission Job submitted
135-
2024-10-30 11:06:24 State Update Running
136-
2024-10-30 11:06:25 State Update Completed
137-
138-
Executions
139-
ID NODE ID STATE DESIRED REV. CREATED MODIFIED COMMENT
140-
e-4fba1f7c node-1 Completed Stopped 6 6m11s ago 6m11s ago
141-
142-
Execution e-4fba1f7c History
143-
TIME TOPIC EVENT
144-
2024-10-30 11:06:24 Scheduling Requested execution on node-1
145-
2024-10-30 11:06:24 Execution Running
146-
2024-10-30 11:06:25 Execution Completed successfully
147-
148-
Standard Output
149-
hello devstack test
150-
```
151-
152-
Use bacalhau job get command to download job results:
81+
Set default resource requirements for all batch jobs:
15382

15483
```bash
155-
bacalhau job get j-5b0ee6dd-6080-4277-99ce-fdf179907b25
84+
bacalhau devstack -c JobDefaults.Batch.Task.Resources.CPU="250m" -c JobDefaults.Batch.Task.Resources.Memory="512Mb"
15685
```
15786

158-
Results will be downloaded to the current directory. Job results should have the following structure:
87+
## Accessing the Web UI
88+
89+
The Web UI is enabled by default in devstack for easier monitoring and management. Access it by opening your browser and navigating to:
15990

16091
```
161-
j-5b0ee6dd/
162-
├── exitCode
163-
├── stderr
164-
└── stdout
92+
http://localhost:8438
16593
```
16694

167-
If you execute `cat stdout` it should read `hello devstack test`. If you write any files in your job, they will appear in `volumes/output`.
95+
The Web UI allows you to:
96+
97+
- View all running and completed jobs
98+
- Inspect node status and resources
99+
- Monitor job execution details and logs
168100

169-
## Support
101+
## Stopping Devstack
170102

171-
If you have questions or need support or guidance, please reach out to the [Bacalhau team via Slack](https://bacalhauproject.slack.com/ssb/redirect) (**#general** channel).
103+
When you're done, simply press `Ctrl+C` in the terminal where devstack is running to shut everything down.

docusaurus.config.ts

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ const config: Config = {
7070
theme: {
7171
customCss: './src/css/custom.css',
7272
},
73+
googleTagManager: {
74+
containerId: 'GTM-M4ZC5QX7',
75+
},
7376
} satisfies Preset.Options,
7477
],
7578
],
@@ -120,13 +123,6 @@ const config: Config = {
120123
position: 'left',
121124
label: 'Community',
122125
},
123-
{
124-
href: 'https://github.com/bacalhau-project/bacalhau',
125-
className: 'header-github-link',
126-
label: 'GitHub',
127-
position: 'right',
128-
'aria-label': 'GitHub repository',
129-
},
130126
{
131127
href: 'https://blog.bacalhau.org/',
132128
label: 'Blog',
@@ -137,6 +133,12 @@ const config: Config = {
137133
label: 'Enterprise',
138134
position: 'right',
139135
},
136+
{
137+
href: 'https://github.com/bacalhau-project/bacalhau',
138+
position: 'right',
139+
className: 'header-github-link',
140+
'aria-label': 'GitHub repository',
141+
},
140142
],
141143
},
142144
footer: {

0 commit comments

Comments
 (0)