Difference between revisions of "VPP/HostStack/nginx"

From fd.io
< VPP‎ | HostStack
Jump to: navigation, search
(Created page with "Example of how to run nginx via ldp and vcl on top of vpp's host stack. == VPP configuration == In addition to the typical startup config parameters, the host stack require...")
 
(Blanked the page)
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Example of how to run nginx via ldp and vcl on top of vpp's host stack.
 
  
== VPP configuration ==
 
 
In addition to the typical startup config parameters, the host stack requires the ones lower for enabling the use of memfds segments for vpp message queues and to configure the binary api socket transport. For a list of startup parameters see [https://fdio-vpp.readthedocs.io/en/latest/gettingstarted/users/configuring/startup.html# here].
 
 
session { evt_qs_memfd_seg  }
 
socksvr { socket-name /tmp/vpp-api.sock}
 
 
== Nginx ==
 
 
First start the vpp and ensure that the network to the http client is working as expected. Then defined the following environment variables with the appropriate paths:
 
 
VCL_CFG=/path/to/vcl.conf
 
LDP_PATH=/path/to/vpp/build-root/build-vpp-native/vpp/lib/libvcl_ldpreload.so
 
 
And create a minimal startup configuration in <code>/etc/vpp/vcl.conf</code> like the one lower:
 
 
vcl {
 
  heapsize 64M
 
  rx-fifo-size 4000000
 
  tx-fifo-size 4000000
 
  api-socket-name /tmp/vpp-api.sock
 
}
 
 
The above configures vcl to request 4MB receive and transmit fifo sizes and access to both local and global session scopes. Additionally, it provides the path to vpp's binary api socket.
 
 
To start nginx:
 
 
sudo LD_PRELOAD=$LDP_PATH VCL_CONFIG=$VCL_CFG nginx -c nginx.conf
 

Latest revision as of 21:12, 13 February 2020