Setup
Dependencies
The only system wide dependency required by pebl is docker. To install docker you can follow the directions at https://docs.docker.com/get-docker/.
SDK
Currently the SDK is supported in Python, Go, and Node.js.
Python
The Python workflow is all done through Docker, so the only requirement
is a valid Dockerfile
built on top of one of
pebl's pre-built images. (Technically
you don't even need Python installed on your local machine!)
For convenience you can stick with the floating tag: peblcloud/python
. This will
always point to the latest SDK version and the latest stable Python release. If you
want a more predictable workflow you can always specify the SDK and Python version.
Go
The Go workflow requires Go to be installed on the local system. We support Go 1.19 and up, and in general recommend that you utilize Go Modules in your projects.
The Go SDK is provided as regular package and
you can simply run go get github.com/peblcloud/go
in your desired projects.
Node.js
The Node workflow requires Node version 20+ to be installed on your system.
The Node package for pebl is provided as an npm package https://www.npmjs.com/package/pebl.
pebl CLI
The pebl cli is currently available for three targets, M1 Mac, Intel Mac, and AMD64 Linux. If your target system isn't available, please let us know at jin@pebl.io.
install script
The easiest way is to use our install script which determines the correct target. Paste the following into your shell:
curl https://www.pebl.io/install | sh
If you are curious, you can inspect the install script: https://www.pebl.io/install.
manual install
If you
want more control over where the pebl binary is placed, you can manually
download using curl. Make sure to choose the correct option based on
your system. This will unzip a binary named pebl
in the working directory.
- Mac M1 (ARM64)
- Mac Intel (AMD64)
- Linux AMD64
- Linux ARM64
curl \
--progress-bar \
--output pebl.zip \
https://www.pebl.io/downloads/pebl-cli-mac-m1.zip \
&& unzip pebl.zip \
&& chmod +x pebl
curl \
--progress-bar \
--output pebl.zip \
https://www.pebl.io/downloads/pebl-cli-mac-intel.zip \
&& unzip pebl.zip \
&& chmod +x pebl
curl \
--progress-bar \
--output pebl.zip \
https://www.pebl.io/downloads/pebl-cli-linux-amd64.zip \
&& unzip pebl.zip \
&& chmod +x pebl
curl \
--progress-bar \
--output pebl.zip \
https://www.pebl.io/downloads/pebl-cli-linux-arm64.zip \
&& unzip pebl.zip \
&& chmod +x pebl
Once unzipped, we recommend placing the pebl
binary on your $PATH
so that
you don't have to specify the whole path when executing the pebl cli.
So something like mv pebl /usr/local/bin
(or any other desired folder) should work.
Auth
This is an optional step. A valid auth token is required for utilizing pebl's cloud runtime.
Simply run pebl auth
and follow the instructions.
Testing
Now let's run through a simple project to make sure you are set up properly!
Check out our github https://github.com/peblcloud/examples.
$ git clone https://github.com/peblcloud/examples
Navigate to our helloworld
example (https://github.com/peblcloud/examples/tree/main/helloworld) and follow the steps in the README.md
:
$ cd examples/helloworld
$ pebl up
:: initializing new pebl cluster...
:: done!
:: run `pebl info` to see logs, endpoints, and other info about the running cluster!
$ pebl run
:: building docker project...
:: starting container...
$ pebl info
If you see the info pane with "hello, world!"
in the logs, you have
properly configured pebl! 🎉