Code Monkey home page Code Monkey logo

bacboot's Introduction

bacboot (EXPERIMENTAL!)

A short, snappy and powerful installer for Bacalhau. Bacalhau Bootstrapper!

In a hurry and just want to install Bacalhau on your machine?

⚠️⚠️⚠️⚠️⚠️⚠️⚠️

This is not yet production ready. Follow the official Bacalhau documentation if you just want to install Bacalhau. Otherwise, read on!

⚠️⚠️⚠️⚠️⚠️⚠️⚠️

curl -sL https://raw.githubusercontent.com/Zorlin/bacboot/main/bacboot.py | python3 - --install --silent --ask-become-pass

(or the same without --ask-become-pass if you have passwordless sudo or will be deploying as root)

Quick start

Want to run BacBoot and try it out? It's pretty simple! Just do the following:

curl -sL https://raw.githubusercontent.com/Zorlin/bacboot/main/bacboot.py -o bacboot.py && chmod +x bacboot.py && python3 bacboot.py

From then on, you can re-run bacboot by simple running ./bacboot.py or python3 bacboot.py in the folder you downloaded it in.

Follow the prompts and have a go! It's currently capable of installing and upgrading the main Bacalhau binary (only on localhost), but a full roadmap is in the works and eventually BacBoot is intended to become the primary supported method of installing Bacalhau, alongside all the alternate methods that will be maintained alongside it.

Only Ubuntu 22.04 has been officially tested. Debian 11 should work, as should anything reasonably Debian-ish. RHEL/CentOS and RHEL-alike distros are not yet supported but support is planned for those.

You will need python3 installed and a working apt install - that's literally it. BacBoot will take care of installing Ansible including setting up pip3 if needed, and (soon) can even clean up afterwards and remove Ansible from the BacBoot host afterwards if needed.

Unattended, silent and truly silent modes

You can run with one of --unattended, --silent or --truly-silent to trigger special modes.

They do the following, respectively:

  • Unattended: Runs with sane choices and does not prompt you unless it must. Still outputs most messages. Will prompt the user if a become/sudo password is needed.
  • Silent: Same as Unattended, except it suppresses everything except for warnings and errors. Implies --unattended.
  • Truly Silent: Same as Silent, except it suppresses warnings too. Implies --silent.

When running with any of these three modes, you must choose an action to do, or else you will see an error.

In unattended mode, we will assume you do not need to use a sudo/become password unless you explicitly call --ask-become-pass.

Actions

You can skip the initial menu and jump straight to a particular action - combine this with the unattended/silent modes to run entirely automatically.

The following actions are available:

  • --install [components] - Installs or upgrades Bacalhau. Optionally, you can specify what components you want to install. If you don't specify --method, will install using Ansible.
  • --upgrade [components] - An alias for --install, as the install step is also an upgrade playbook too. Magic!
  • --verify [components ] - Specifically verify Bacalhau components. Optionally, you can specify which components you want to test. If you do not, BacBoot will ask you what to verify unless you are running in unattended mode (in which case, it will verify the client by default.

Other options

  • --method - Choose an installation method - you can choose from "docker", "ansible", "cloud" and "direct". Ansible is used by default if left unset.
  • --skip-verification - Do not automatically run the verification step after installing or upgrading Bacalhau.

Enjoy!

Credits

BacBoot was initially created in 2023 by Benjamin Arntzen and the Application Research Group, and donated to the Bacalhau Project.

It is free software licenced under the MIT Licence.

bacboot's People

Contributors

zorlin avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

bacboot's Issues

[feat] Basic install verification

When the user asks to run the verification step, or says yes to a prompt to ask if they want to try running a Bacalhau job...

We should run
bacalhau docker run ubuntu echo Hello World

for now just locally.

Demo Request

  • Make an s3 bucket with 20 1 GB videos in them.
  • Spin up 1 VM, run a conversion job against them. Time it.
  • Spin up 20 VMs. Do the same. Time it.
  • Be proud that you achieved the thing so much faster with zero code changes.

(Note, not sure to handle this without sharding - maybe @wdbaruni has an idea? I assume a local bash script or something)

This could be an awesome proof point, benchmark, example and core of the blog post!

[bug] extraneous/erroneous sed output when setting up overrides in the overrides files

Symptoms:

Installing Bacalhau using Ansible...
Awesome, let's get started!
First, we need to install Ansible. This is a one-time thing, and we'll remove it after we're done if you want us to.
We'll also need to install a few other things, like Python 3 and pip3. You probably already have them installed!

Checking if Ansible is installed...
Ansible is installed.
We detected an existing Ansible installation. You're ready to rock already! 🎸🪨
Let's get started! 🚀

First, we need to know what you want to do. Do you want to install the Bacalhau
client, the Bacalhau node, or both?

(If you are upgrading Bacalhau, you can just run this install step and it will upgrade automatically!)


1) Install the Bacalhau client
2) Install a Bacalhau node
3) Install the Bacalhau client and setup a Bacalhau node

Enter your choice or enter 'q' to quit without making any further changes: 1
Installing the Bacalhau client...
We don't really need to know anything to proceed, unless you want to install a specific version of Bacalhau!
Press [ENTER] to proceed, or enter a version number to install a specific version of Bacalhau.

(If you're confused or don't know what to do here, just press ENTER!)
Enter a version number or press [ENTER] to proceed:
sed: can't read : No such file or directory

With some debugging, we can find that the command we're actually trying to run is the issue:

DEBUG: sed -i '' -e 's/^bacalhau_version:.*/bacalhau_version: "latest"/' /tmp/bacalhau-ansible/vars/overrides.yml
wings@chase:~/projects/bacboot$ sed -i '' -e 's/^bacalhau_version:.*/bacalhau_version: "latest"/' /tmp/bacalhau-ansible/vars/overrides.yml
sed: can't read : No such file or directory

However, weirdly the file is still modified. Thanks to our AI overlords we can deduce the issue is the -i '' portion.

JACoB Installed

JACoB here...
I can now access this repo, but ran into trouble during my installation checks.

Here is some additional info on the error(s) I saw:

ENOSPC: no space left on device, mkdir '/mnt/tmp/tmp-98-j0DC5q8RWkS3'

You may need to add or edit a jacob.json file in the root of your repository to help me better understand how to build your project.

Please visit the JACoB documentation for more information on how to resolve this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.