Getting Started¶
This document is meant to help you to run Bob on some popular platforms
Checkout the bob-deploy repo for reference deployments on various platforms
Running a Bob cluster¶
To get a minimal setup running locally (with a simple Github public repo and file system based storage), we will run bob, resource-git and artifact-store.
On Kubernetes¶
- Use a remote cluster or setup a local one using kind or Minikube etc
- Clone the repo
- Apply the manifests:
kubectl apply -f k8s/
- This depolys the cluster exposed via the
bob-apiserver
ClusterIP Serivce:- If using a remote cluster, you may want to expose it
- If on a local cluster, port forward it:
kubectl port-forward service/bob-apiserver 7777:7777
On Podman or Docker¶
- Download Podman or Rootless Docker
- Fetch this docker-compose.yml file with
curl -LfO 'https://raw.githubusercontent.com/bob-cd/bob-deploy/main/docker-compose.yml'
- In the same directory, start the cluster using podman-compose or docker-compose: or
- When it all comes up, bob should be available on port
7777
Using the API¶
Bob exposes itself fully via a REST API as described here HTTP clients like curl, HTTPie, Insomnia etc could be used to directly interact with the API.
We would be using Wendy, the reference CLI.
Building a simple project on Bob¶
This assumes the above steps have been followed and a Bob cluster is available on http://localhost:7777
and Wendy is set up.
- Test if Bob is ready:
should respond with a resounding
Pong
if all good. - Create a pipeline manifest and set the
GOOS
andGOARCH
values according to your OS: - Create the pipeline:
- Create a resource_provider manifest in a file
resource_provider.yaml
- Register the resource provider:
- Create an artifact_store manifest in a file
artifact_store.yaml
- Register the artifact store:
- Start the pipeline: should respond with a run id like this: This is like a tracing id, all subsequent interactions can be done with this.
- Follow the events of the run via SSE: should start tailing live events, hit ctrl-c to close it. This is ideal for UIs/CLIs reacting to changes in the cluster.
- Check the pipeline status with the run id: should respond:
- See the logs of the run at any time:
- If all goes well, eventually it should respond with a
passed
status with the same status call as above. - Download the produced artifact:
- Extract the TAR file:
- Test the executable file. Running following command should give "Hello Casey"
See what else is possible using wendy --help
.