BlueBeak Installation Guide
Task 1: Building the CLI
The directory structure looks like
1)cd into bbtools
2)cd into bbtools/bin
3)I have executables for linux arm64, windows amd64 and mac (darwin amd64),If you have any other system then skip this section and go to the next section.
Assuming you are on linux execute the command
Run install command:
Run greet command:
./bbtools greet hello ron
Building CLI binary using Go:
This requires us to install go. There are a couple of ways to install go.
- Downloading go installer from their official site:
- Using make file to install go:
I have also created a Makefile that installs and add the go to path for linux.
This installs go and then runs go install to create the binary which is located in ~/go/bin.
Now we can be in any directory and use bbtools. (like run ~/go/bin/bbtools greet hello ron)
- In ubuntu we can use snap to install go.
sudo apt update sudo apt install snapd sudo snap install go --classic
Check go installation using:
Building the binary:
Now that go is installed we can build the executable. (No need to do this if installed using make as make already has built the binary executable)
cd bbtools go install bbtools install bbtools greet hello ron
We can run bbtools from any directory once go install has been run. We don’t necessarily need to be inside bbtools directory.
NOTE: If go aur bbtools are not running due to command not found error there are two ways to resolve this.
cd bbtools usr/local/go/bin/go install ~/go/bin/bbtools install ~/go/bin/bbtools bbtools greet hello ron
OR add path to ~/.profile like (gedit ~/.profile)
export PATH=$PATH:/usr/local/go/bin export PATH=$PATH:/home/zeedx/go/bin
then run source and the go and bbtools should work without having to give their paths.
source ~/.profile go version
Task 2: Building nanovm using ops to run a R script
curl https://ops.city/get.sh -sSfL | sh sudo apt-get install qemu-kvm qemu-utils
Running hello.R script:
cd bbtools ops pkg load R_3.4.4 -c config.json
Thus we get the desired output
I was ideally supposed to pull the docker image from local registry and then run the hello.R using that but despite trying several different base images that didn’t happen. I also spoke to the main collaborator and creater and CEO of nanovms and he said that there is an issue with Rscript specifically that deters the run of a R script using the Rscript command. I am attaching everything I did in the page below.