Installing PCFDev on Manjaro Linux
How to install Pivotal Cloud Foundry (PCFDev) on your local manjaro linux notebook.
This blog post is about installing a local Cloud Foundry testing environment on your linux notebook. For some time there was only PCF 1.11 available via PCFDev for Linux. Newer versions of Cloud Foundry could only be used on MacOs and Windows via PCFDev.
But since April 2019 Pivotal Cloud Foundry Application Services Version 2.4.4 can be deployed on Linux via PCFDev.
With PCFDev you can install a fully functional Cloud Foundry deployment on your local notebook. It only needs a single virtual machine. Inside this virtual machine a condensed set of Cloud Foundry components is installed. You can use Redis, RabbitMQ MySQL and Spring Cloud Services in your app instances if you deploy them to PCFDev.
For me this is a perfect start for experiments and gaining a deeper understanding of Cloud Foundry.
This setup guide has been created on Manjaro Linux.
Before we can install PCFDev on Linux we need to satisfy some dependencies of PCFDev.
PCFDev uses QEMU for machine emulation and virtualization.
$ sudo pacman --sync qemu
As virtualization api you need to install libvirt.
$ sudo pacman --sync libvirt
After installation you can enable and start the libvirt daemon.
$ sudo systemctl enable libvirtd.service Created symlink /etc/systemd/system/multi-user.target.wants/libvirtd.service → /usr/lib/systemd/system/libvirtd.service. Created symlink /etc/systemd/system/sockets.target.wants/virtlockd.socket → /usr/lib/systemd/system/virtlockd.socket. Created symlink /etc/systemd/system/sockets.target.wants/virtlogd.socket → /usr/lib/systemd/system/virtlogd.socket. $ sudo systemctl start libvirtd.service
On my machine it did not work out of the box because I had no valid firewall backend for libvirtd on my machine. To fix this I needed to install ebtables for ethernet bridge firewalling and firewalld as firewalling daemon.
$ sudo pacman --sync ebtables $ sudo pacman --sync firewalld
Now would be a good time to reboot your machine.
To activate the necessary virtual ethernet bridge I used virt-manager.
$ sudo pacman --sync virt-manager
Follow the offical setup guide
There is also an official setup tutorial for PCFDev from Pivotal. It is your choice to follow the official guide from here on or to read the rest of this blog post.
Install cf command line interface
Download and install the Cloud Foundry command line interface cf cli.
Install cf cli plugin for PCFDev
$ cf install-plugin cfdev
You can get PCFDev from the Pivotal Network. Just download the file to you local folder.
$ cf dev start -f <filepath/VERSION.tgz>
And now it is time to … waaaaaaait. It takes some minutes for PCFDev to start. When startup is finished successfully you should see the following:
$ cf dev stop
$ rm -rf ~/.cfdev