Installing open source P4 development tools

Pick one of these:

(a) I have an existing Ubuntu 16.04, 18.04, or 20.04 Linux system, and I want to install the open source P4 development tools on it

(b) I am comfortable downloading and running a virtual machine image with the P4 open source tools already compiled and installed, e.g. using a virtual machine application like VirtualBox, VMware Fusion, VMware Workstation, Parallels, etc.

For (a), I recommend following the instructions at this link: p4-guide/README-install-troubleshooting.md at master · jafingerhut/p4-guide · GitHub

For (b), I have created a virtual machine image based on Ubuntu 20.04 Desktop Linux for AMD64 architecture processors (Intel and AMD) (the image is about 4 GBytes in size, and to import it into VirtualBox requires about another 12 GBytes of free disk space on top of the 4 GByte download): P4 Tutorial 2021-06-01.ova - Google Drive

There are two user accounts for this VM. The normal one is user id ‘p4’ with password ‘p4’. Another that has a home directory with the source code of the P4 development tools used to build the installed binaries has user id ‘vagrant’ and password ‘vagrant’, but unless you want to look at that source code, there is not much reason to use that account.

It has versions of the P4 open source development tools based on the latest source code as of June 1, 2021, and also a slightly modified version of what is in the GitHub - p4lang/tutorials: P4 language tutorials Github repository so that several of the exercises can run on the system, even though it has only Python3 installed, no Python2 at all. I have been creating similar images monthly since March 2021, and at least a few people have kicked the tires and things mostly seem to work, but I would still consider this image experimental at this point. If you do try it, please report any problems you find, to help us move one step closer to open source P4 dev tools that leave Python2 behind.

1 Like

To anyone familiar with Discourse: I know from experience that I can edit my own posts soon after I have posted them, but is there some kind of time limit after a post is created after which it can no longer be edited? I do not see a way to edit my post above from about a month ago right now, even though I could last month.

By default is 1 month I believe, but should be configurable (server-side).

PD: Here, some info about it.

Thanks. For anyone reading this far, I have put my best answers to both scenarios (a) and (b) at the following link, which I control the content of and so can update it as I create additional pre-built VM images: p4-guide/README-install-troubleshooting.md at master · jafingerhut/p4-guide · GitHub

1 Like