Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix bugs in documentation and reenable algolia search #3781

Closed
wants to merge 18 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .cspell-docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
"HashStrings",
"UnicodeRef",
"UUID",
"HHMMSS",
"Jlcp",
"/github.com.*/",
"/\\w+{12,}/",
"/ipfs://\\w*/",
Expand Down
48 changes: 25 additions & 23 deletions docs/docs/all-flags.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_label: "CLI Reference"
sidebar_label: 'CLI Reference'
sidebar_position: 7
---

Expand Down Expand Up @@ -45,7 +45,7 @@ Flags:
Use "bacalhau [command] --help" for more information about a command.
```

## Cancel
## Cancel

Cancels a job that was previously submitted and stops it running if it has not yet completed.

Expand All @@ -60,7 +60,7 @@ Flags:
--quiet Do not print anything to stdout or stderr
```

#### Examples
#### Examples

```
Examples:
Expand Down Expand Up @@ -111,21 +111,21 @@ An example job in YAML format:

```yaml
spec:
engine: Docker
verifier: Noop
publisher: IPFS
docker:
image: ubuntu
entryPoint:
- echo
parameters:
- Hello
- World
outputs:
- name: outputs
path: /outputs
engine: Docker
verifier: Noop
publisher: IPFS
docker:
image: ubuntu
entryPoint:
- echo
parameters:
- Hello
- World
outputs:
- name: outputs
path: /outputs
deal:
concurrency: 1
concurrency: 1
```
Comment on lines 112 to 129
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yaml is space sensitive, and it looks like you have made modifications here (I assume they were unintentional) please ensure this yaml is still valid and revert this change if its not.


### UCAN Invocation format
Expand Down Expand Up @@ -283,7 +283,7 @@ Flags:
--local Run the job locally. Docker is required
--memory string Job Memory requirement (e.g. 500Mb, 2Gb, 8Gb).
--min-bids int Minimum number of bids that must be received before concurrency-many bids will be accepted (at random)
--network network-type Networking capability required by the job (default "nats")
--network network-type Networking capability required by the job (default None)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert this, the default network is nats.

--node-details Print out details of all nodes (overridden by --id-only).
--output-dir string Directory to write the output to.
-o, --output-volumes strings name:path of the output data volumes. 'outputs:/outputs' is always added.
Expand Down Expand Up @@ -354,7 +354,7 @@ bacalhau list
bacalhau list --output json
```

## Logs
## Logs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a lot of trailing spaces have been added here and else where, we should avoid this.


Retrieves the log output (stdout, and stderr) from a job.
If the job is still running it is possible to follow the logs after the previously generated logs are retrieved.
Expand All @@ -370,7 +370,7 @@ Flags:
-h, --help help for logs
```

#### Examples
#### Examples

```
Examples:
Expand All @@ -381,6 +381,7 @@ Examples:
bacalhau logs ebd9bf2f
```


## Run Python

```
Expand Down Expand Up @@ -431,6 +432,7 @@ Flags:
--wait-timeout-secs int When using --wait, how many seconds to wait for the job to complete before giving up. (default 600)
```


## Serve

```
Expand All @@ -444,15 +446,15 @@ Examples:
bacalhau serve
# or
bacalhau serve --node-type requester

# Start a private bacalhau hybrid node that acts as both compute and requester
bacalhau serve --node-type compute --node-type requester
# or
bacalhau serve --node-type compute,requester

# Start a private bacalhau node with a persistent local IPFS node
BACALHAU_SERVE_IPFS_PATH=/data/ipfs bacalhau serve

# Start a public bacalhau requester node
bacalhau serve --peer env --private-internal-ipfs=false

Expand Down
4 changes: 2 additions & 2 deletions docs/docs/community/compute-landscape.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ sidebar_position: 2
This page is an introduction to a landscape analysis of general-purpose compute frameworks.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert changes to this file.

Its purpose is to map the roughness of existing technologies and serve as an introduction to key concepts for those who are new to the Bacalhau community.

Watch the video below for a short walkthrough and continue to the sections below to learn more about landscape analysis within the compute ecosystem.
Watch the video below for a short walkthrough and continue to the sections below to learn more about landscape analysis within the compute ecosystem.
More content is available on the [full slide deck](https://docs.google.com/presentation/d/1wOh-ASGshgc1Ivkoyaz9zGpVGTxX9LDMZQB4-eXOBP4/edit?usp=sharing) and in the [code repository](https://github.com/winderai/bacalhau-landscape-analysis-benchmarks), where you'll find:

* A description of each technology and how they're positioned in the compute space
Expand All @@ -26,7 +26,7 @@ Ultimately, Bacalhau aims to offer efficient distributed computation -- to achie
The traditional compute landscape counts dozens of frameworks capable of processing generic workloads.
Some are specifically designed to take advantage of data locality, by bringing the computation close to where data lives. The landscape analysis provided here reviewed a selection of these tools in order to summarize their pros and cons.

> The [full slide deck](https://docs.google.com/presentation/d/1wOh-ASGshgc1Ivkoyaz9zGpVGTxX9LDMZQB4-eXOBP4/edit?usp=sharing) contains a detailed overview of the compute frameworks and include sample code snippets.
> The [full slide deck](https://docs.google.com/presentation/d/1wOh-ASGshgc1Ivkoyaz9zGpVGTxX9LDMZQB4-eXOBP4/edit?usp=sharing) contains a detailed overview of the compute frameworks and include sample code snippets.


![image](../../static/img/landscape/landscape.png 'Compute Framework Analysis')
Expand Down
16 changes: 8 additions & 8 deletions docs/docs/community/style-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@ The primary objective of the Bacalhau documentation style guide is to help autho

Our goal is to use conversational tone that is natural, and friendly towards the reader and also ensure that the document's content is simple and easy to follow.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert changes to this file


### Friendly and Open
### Friendly and Open

As we write for a large global audience, we aim for a universally accessible voice.

- Maintain a friendly, informal tone, but focus on being clear and concise in a knowledgeable manner.
- Avoid the use of slangs and colloquial language.
- Avoid offensive language in all forms, and toward all identities and cultures.
- Write in the second person (e.g. **You can…**), present tense to guide the reader to their intended outcome.
- Write in the second person (e.g. **You can…**), present tense to guide the reader to their intended outcome.
- When writing consider that many users are not native English speakers.
- Use languages that encourages readers and walk them through the steps to achieve the outcome they’re looking for.

Expand All @@ -38,15 +38,15 @@ Our documentation should reflect our purpose, giving the appropriate amount of t
- In non CLI-based references, capitalize **Bacalhau**, **Docker**, **Compute** and other program/project names.
- Test each code snippet and example, walking through each step to ensure accuracy as it's written.

With these guidelines, we can provide a comprehensive set of documentation that is clear, actionable, and helpful.
With these guidelines, we can provide a comprehensive set of documentation that is clear, actionable, and helpful.

## Structure

The Bacalhau documentation set should include articles and tutorials that have a consistent structure, which includes an introduction and the procedural steps necessary for a reader to get to their expected outcome.
The Bacalhau documentation set should include articles and tutorials that have a consistent structure, which includes an introduction and the procedural steps necessary for a reader to get to their expected outcome.

### Structure Guidelines

The specific structure depends on the type of documentation you are writing. On general note, the documentation should include: an introduction, a conclusion, and any prerequisites necessary for a reader to get started.
The specific structure depends on the type of documentation you are writing. On general note, the documentation should include: an introduction, a conclusion, and any prerequisites necessary for a reader to get started.

Most of the tutorials and examples we publish are procedural, which walk the reader through accomplishing a task step-by-step. The structure for a procedural documentation should be:

Expand All @@ -62,7 +62,7 @@ Need Support? (H2)
Contributing (H2)
```

If the documentation is conceptual:
If the documentation is conceptual:

```
Title (H1)
Expand All @@ -80,12 +80,12 @@ In this way, readers can learn and hop to pertinent information as they need eff

## Formatting

Our documentation is written in [Markdown markup language](https://www.markdownguide.org/basic-syntax/).The following rules explain how we organize and structure our writing.
Our documentation is written in [Markdown markup language](https://www.markdownguide.org/basic-syntax/).The following rules explain how we organize and structure our writing.
.

### Titles

All titles should follow [title case capitalization structure](https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case).
All titles should follow [title case capitalization structure](https://apastyle.apa.org/style-grammar-guidelines/capitalization/title-case).

```
❌ Get started with bacalhau
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/dev/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
label: "Advanced Guides"
position: 110
position: 5
4 changes: 2 additions & 2 deletions docs/docs/dev/api/_category_.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
label: "API Guide"
position: 2
label: "API"
position: 1
3 changes: 2 additions & 1 deletion docs/docs/dev/api/agent.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
sidebar_label: Agent
sidebar_label: Agents
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

keep this singular

---

# Agent API Documentation
Expand Down Expand Up @@ -113,3 +113,4 @@ This API provides detailed information about the node, including its peer ID and
}
}
```

6 changes: 3 additions & 3 deletions docs/docs/dev/api/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ Welcome to the official API documentation for Bacalhau. This guide provides a de

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert changes to this file

## Overview

Bacalhau operates on an "API-first" approach, providing an interface for users to interact with the system programmatically.
Bacalhau operates on an "API-first" approach, providing an interface for users to interact with the system programmatically.

- **Endpoint Prefix**: All APIs are versioned and prefixed with `/api/v1`.
- **Default Port**: By default, Bacalhau listens on port `1234`.
- **API Nodes**:
- **API Nodes**:
- **Orchestrator**: Handles user requests, schedules, and monitors jobs. Majority of Bacalhau's APIs are dedicated to Orchestrator interactions. These are accessible at `/api/v1/orchestrator`.
- **Compute Nodes**: Acts as worker nodes and executes the jobs. Both Orchestrator and Compute nodes expose some common APIs under `/api/v1/agent` for querying agent info and health status.

## Features

### Label Filtering

Bacalhau supports label filtering on certain endpoints, such as `/api/v1/orchestrator/jobs` and `/api/v1/orchestrator/nodes`. This mechanism works similarly to constraints, letting you narrow down your search based on certain criteria.
Bacalhau supports label filtering on certain endpoints, such as `/api/v1/orchestrator/jobs` and `/api/v1/orchestrator/nodes`. This mechanism works similarly to constraints, letting you narrow down your search based on certain criteria.

**Example**:
```bash
Expand Down
8 changes: 4 additions & 4 deletions docs/docs/dev/api/jobs.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Retrieve a list of jobs.

**Parameters**:
- `namespace`: Specify a namespace to filter the jobs. Use `*` to display jobs from all namespaces.
- `labels`: Use label-based criteria to filter jobs. See [Label Filtering](../api) for usage details.
- `labels`: Use label-based criteria to filter jobs. See [Label Filtering](../api#label-filtering) for usage details.
- `limit`: Set the maximum number of jobs to return. Default is set to 10.
- `next_token`: Utilize this parameter for pagination continuation.
- `order_by`: Determine the ordering of jobs. Choose between `id` or `create_time` (default is `create_time`).
Expand Down Expand Up @@ -184,7 +184,7 @@ curl -X PUT \
}
}' \
127.0.0.1:1234/api/v1/orchestrator/jobs

{
"JobID": "j-9809ae4b-d4fa-47c6-823b-86c924e60604",
"EvaluationID": "5dac9fe0-2358-4ec7-bec9-6747dfa2b33e",
Expand Down Expand Up @@ -479,7 +479,7 @@ Fetch results published by all executions for the defined job. Applicable only f

**Example**:

Result of a job that used the [S3 Publisher](../../setting-up/other-specifications/publishers/s3):
Result of a job that used the [S3 Publisher](../other-specifications/publishers/s3):
```bash
curl 127.0.0.1:1234/api/v1/orchestrator/jobs/j-479d160f-f9ab-4e32-aec9-a45554126450/results
{
Expand All @@ -497,4 +497,4 @@ curl 127.0.0.1:1234/api/v1/orchestrator/jobs/j-479d160f-f9ab-4e32-aec9-a45554126
}
]
}
```
```
4 changes: 2 additions & 2 deletions docs/docs/dev/api/nodes.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ curl 127.0.0.1:1234/api/v1/orchestrator/nodes/QmUDAXvv31WPZ8U9CzuRTMn9iFGiopGE7r
Retrieve a list of nodes.

**Parameters**:
- `labels`: Use label-based criteria to filter nodes. See [Label Filtering](../api) for usage details.
- `labels`: Use label-based criteria to filter nodes. See [Label Filtering](../api#label-filtering) for usage details.
- `limit`: Set the maximum number of jobs to return. Default is set to 10.
- `next_token`: Utilize this parameter for pagination continuation.
- `order_by`: Determine the ordering of jobs. Choose between `id`, `type`, `available_cpu`, `available_memory`, `available_disk` or `available_gpu`. (default is `id`).
Expand Down Expand Up @@ -238,4 +238,4 @@ curl --get "127.0.0.1:1234/api/v1/orchestrator/nodes?limit=2&order_by=available
}
]
}
```
```