Another FPM fan here :-)
In case it's useful for anyone, here's a Vagrantfile & provisioning script that:
- builds the latest non-release-candidate OpenResty
- inside a Vagrant/Virtualbox Debian VM
- using the debian nginx-common config style (/sites-enabled/ etc)
- including nginx-push-stream-module & ngx_cache_purge
- packages it up as a .deb file using FPM
- spits the .deb out into the Vagrant host directory.
https://github.com/igorclark/vagrant-builds/tree/master/debian/openresty%2Brealtime-extras
It relies on module numbering conventions to retrieve modules and file locations for a bit of patching, and it's basically a glued-together shell script, so it's a bit brittle in places - but it does what I need it to do and works well for my purposes. Bug reports welcome. Takes just under 5 mins on my macbook on an OK DSL connection.
BTW it installs the chef/bento 'wheezy' Vagrant box, so there's init scripts rather than systemd units.
Hope someone else can use it too :-)
Cheers,
Igor
On Monday, October 19, 2015 at 6:01:47 PM UTC+1, David Birdsong wrote:
On Mon, Oct 19, 2015 at 8:54 AM Yichun Zhang (agentzh) <
age...@gmail.com> wrote:
Hello!
On Sun, Oct 18, 2015 at 11:06 PM, studdugie wrote:
> I've been meaning to play w/ OpenResty for a while now but have been putting
> it off until I got a new workstation and upgraded to the latest version of
> Ubuntu (15.04). Well this weekend the magic happened. Yeah me! And yeah you
> too, maybe.
>
> Attached is a bash shell script that automates all the manual steps that it
> took me to build, install, and run OpenResty on a modern Ubuntu Linux
> system. Just pass it the version number and it will download, untar,
> configure, compile, install, and register OpenResty w/ systemd so that it
> starts/stops automatically on boot/shutdown and can be manually managed w/
> the service and systemctl commands. So if you are on Ubuntu Linux and are
> looking for an easy way to get started give it a try. Please note you'll
> probably want to change the ./configure options to suit your needs.
>
Yeah, I understand that. And I have a TODO item to setup a Ubuntu
binary deb package repos for OpenResty. Haven't really worked on it
yet.
I build and deploy numerous instances of open-resty and name them differently to reflect their use and to separate their deployments.
Here's an example fpm script:
./configure -j6 --prefix=/usr/hwyman-ngx --with-http_dav_module --sbin-path=/usr/sbin/hwyman-ngx --conf-path=/etc/hwyman-ngx/hwy.conf --error-log-path=/data/log/hwyman-ngx/error.log --pid-path=/var/run/hwyman-ngx.pid --http-log-path=/data/log/hwyman-ngx/access.log && make -j6 && make install DESTDIR=/tmp/hwyman-ngx-installdir
fpm -v 1.7.7.2-1ix --description='nginx proxy for hwyman, straight from ngx_openresty-1.7.7.2' -t deb -s dir -n hwyman-ngx -C /tmp/hwyman-ngx-installdir data etc usr var
Regards,
-agentzh.