Skip to content
Open
Show file tree
Hide file tree
Changes from 12 commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
08c5c9e
Update DEVELOPMENT.md
entlein Apr 27, 2025
e40aed6
Update DEVELOPMENT.md
entlein Apr 27, 2025
17b9d5b
adding the build cache entry for bazel
entlein Apr 27, 2025
652265e
adding the compile mode into vizier skaffold
entlein Apr 27, 2025
ef467a8
these should be the most important steps
entlein Apr 27, 2025
6730d7e
more text
entlein Apr 27, 2025
1124c1f
comments unaligned fixed
entlein Apr 27, 2025
889de79
should be all now
entlein Apr 27, 2025
4036120
should be all now
entlein Apr 27, 2025
6ee0c1b
review development.md, and add extra comments
mebegu May 2, 2025
b01f03e
chore: cosmetic beautification
entlein May 3, 2025
eb762e3
chore: comment out the cache dir for bazel and explain how to use it …
entlein May 4, 2025
e9858af
PR resolve: seperating the 24.04 specifics from the overall description
entlein May 7, 2025
37ca63d
PR resolve: seperating the 24.04 specifics from the overall description
entlein May 7, 2025
aa134b9
PR resolve: referencing upstream doc for cli install and cleaning up …
entlein May 7, 2025
a6568b4
PR resolve: markdown numbering got confused
entlein May 7, 2025
859063a
feature: moving the minikube ubuntu dependencies into chef rather tha…
entlein May 7, 2025
1c1bb8c
Update DEVELOPMENT.md
entlein May 7, 2025
9f31d5f
Update DEVELOPMENT.md
entlein May 7, 2025
61ffd7e
Update DEVELOPMENT.md
entlein May 7, 2025
f7fab71
Fixing the numbering and removing empty quotes
entlein May 7, 2025
77d82f0
newline added
entlein May 7, 2025
3d95116
Fixed -R for recursive setgid bit
entlein May 7, 2025
085e27b
Adding the missing kernel header warning explanation for minikube
entlein May 7, 2025
6b325cb
chore: amend text to resolve PR comments: highlight that minikube is …
entlein May 8, 2025
e078ae7
chore: revert skaffold_visizer but add comments
entlein May 8, 2025
94dd78b
chore: amend text to resolve PR comments: highlight that minikube is …
entlein May 8, 2025
29b5314
Update tools/chef/cookbooks/px_dev/recipes/linux.rb
entlein May 8, 2025
e3588fa
Update DEVELOPMENT.md
entlein May 8, 2025
c616e66
Update DEVELOPMENT.md
entlein May 8, 2025
c846a4d
chore: apply Dom s suggested edit
entlein May 8, 2025
11e0519
chore: adding the compilation mode explanation to the docs
entlein May 8, 2025
c124e0d
Remove trailing whitespace linux.rb
entlein May 8, 2025
a4674d7
Remove trailing whitespace from skaffold_vizier.yaml
entlein May 8, 2025
5b407ff
linting: removing lots of whitespaces at the EOL
entlein May 8, 2025
fd7d4ea
linting: file must end on a newline
entlein May 8, 2025
9401a69
Update DEVELOPMENT.md
entlein May 12, 2025
0ff4301
fix documentation: as requested reverting skaffold yaml to original
entlein May 12, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Global bazelrc file, see https://docs.bazel.build/versions/master/guide.html#bazelrc.

# Use local Cache directory if building on a VM:
# On Chef VM, create a directory and comment in the following line:
# build --disk_cache=</tmp/bazel/> # Optional for multi-user cache: Make this directory owned by a group name e.g. "bazelcache"

# Use strict action env to prevent leaks of env vars.
build --incompatible_strict_action_env

Expand Down
98 changes: 98 additions & 0 deletions DEVELOPMENT.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,104 @@ This document outlines the process for setting up the development environment fo

## Setting up the Environment

Decide first if you'd like a full buildsystem (on a VM) or a containerized dev environment.

### VM as buildsystem
Uses a Ubuntu 24.04 as base to run `chef` to setup all dependencies.
Comment thread
entlein marked this conversation as resolved.
Outdated
The initial compilation is CPU intense and `16vcpu` are recommended.
This was tested on GCP: a balanced disk of 500 GB and a VM type that supports nested virtualization should be chosen, as of writing (May 2025)
`n2-standard-16` works well.

> [!Warning]
> The first build takes several hours and at least 160 Gb of space

Turn on nested virtualization and avoid the use of `spot` VMs for the first build to avoid the very long first
build interrupting. If you create the VMs as templates from an image, you can later switch to more cost-effective `spot` instances.
Comment thread
entlein marked this conversation as resolved.
Outdated



```yaml
advancedMachineFeatures:
enableNestedVirtualization: true
```

1) Install chef and some dependencies

```
sudo apt update sudo apt install -y git coreutils mkcert libnss3-tools screen libvirt-daemon-system libvirt-clients qemu-kvm virt-manager
Comment thread
ddelnano marked this conversation as resolved.
Outdated
curl -L https://chefdownload-community.chef.io/install.sh | sudo bash
```
Now, on this VM, clone pixie (or your fork of it)

```
git clone https://github.com/pixie-io/pixie.git
cd pixie/tools/chef
sudo chef-solo -c solo.rb -j node_workstation.json
sudo usermod -aG libvirt $USER
```

Make permanent the env loading via your bashrc
```sh
echo "source /opt/px_dev/pxenv.inc " >> ~/.bashrc
```

Put the baselrc into your homedir:
Comment thread
ddelnano marked this conversation as resolved.
Outdated
```sh
cp .bazelrc ~/.
```
In order to very significantly speed up your work, you may opt for a local cache directory. This can be shared between users of the VM, if both are part of the same group.
Create a cache dir under <directory-path> like /tmp/bazel
```sh
sudo groupadd bazelcache
sudo usermod -aG bazelcache $USER
sudo mkdir -p <directory-path>
sudo chown :bazelcache <directory-path>
sudo chmod 2775 <directory-path>
```

2) Create/Use a registry you control and login

```sh
docker login ghcr.io/<myregistry>
```

3) Make Minikube run and deploy a vanilla pixie
Comment thread
entlein marked this conversation as resolved.
Outdated

If you added your user to the libvirt group (`sudo usermod -aG libvirt $USER`), this will now work (if you did this interactively: you need to refresh your group membership, e.g. by logout/login)
```sh
make dev-env-start
```
Deploy vanilla pixie (remote cloud)
```sh
sudo bash -c "$(curl -fsSL https://getcosmic.ai/install.sh)"
export PX_CLOUD_ADDR=getcosmic.ai
px auth
px deploy -p=1Gi
```
For reference and further information https://docs.px.dev/installing-pixie/install-guides/hosted-pixie/cosmic-cloud
Comment thread
entlein marked this conversation as resolved.
Outdated

4) Once you make changes to the source code, or switch to another source code version, use Skaffold to deploy (after you have the vanilla setup working on minikube)

Check, that your docker login token is still valid:

```sh
> skaffold run -f skaffold/skaffold_vizier.yaml -p x86_64_sysroot --default-repo=ghcr.io/<myregistry>
```

Optional: you can set default-repo on config, so that you don't need to pass it as an argument everytime
```sh
> skaffold config set default-repo ghcr.io/<myregistry>
> skaffold run -f skaffold/skaffold_vizier.yaml -p x86_64_sysroot
```

5) Golden image

Once all the above is working and the first cache has been build, bake an image of your VM for safekeeping.




### Containerized Devenv
To set up the developer environment required to start building Pixie's components, run the `run_docker.sh` script. The following script will run the Docker container and dump you out inside the docker container console from which you can run all the necessary tools to build, test, and deploy Pixie in development mode.

1. Since this script runs a Docker container, you must have Docker installed. To install it follow these instructions [here](https://docs.docker.com/get-docker/).
Expand Down
1 change: 1 addition & 0 deletions skaffold/skaffold_vizier.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,3 +144,4 @@ profiles:
path: /build/artifacts/context=./bazel/args
value:
- --config=x86_64_sysroot
- --compilation_mode=opt
Comment thread
entlein marked this conversation as resolved.
Outdated
Loading