My Pi3 Experiment
Posted: Mon 03 Apr 2017 2:49 pm
I have been running MX on an old Model B Raspberry Pi, and hosting the database on a Steve's web server.
Previously with Cumulus 1 I had hosted Cumulus, Apache web server, PHP, and MySQL all on a Windows desktop - but it was far too power hungry for 24x7x365 operation.
So I invested in a pi3, added an RTC module, and boot it off a 128 GB SSD drive - as a test to see if the pi3 was up to running all the services. As par of the test I have now switched over my production web site from Steve's server to the pi3 and I'll see how it copes. If there are major issues I can drop back to the hosted server quite quickly.
The old pi always hosted my old astro web site, and that has been moved over to the new pi3 as well.
The pi3 is running Nginx for web services, PHP 5.6, and MariaDB for MySQL services. One thing I did find was that some of the SQL queries were a bit taxing for the pi3 (taking up to 8 seconds to run ), so I have changed the code to run them once a day after the daily roll-over and cache the result.
The site template has had a spruce up too, now using a later version of Skel and a different menu system - the css needs a bit of tweaking in some areas but it is almost there.
So far it is looking OK, and hosting everything on one box also allows for future adventures in how to capture and present the data. For instance I can grab the wind data directly from the radio packets for almost real time updates. If it continues to go well then I'll eventually pull the plug in the hosted web site.
One issue I have is that I cannot use the external domain name to access the weather web site on my internal network. It serves up static content fine, but all PHP pages get redirected to 127.0.0.1 (but the single php page on the astro web site works fine using the external domain name!). That one is driving me nuts - if I put a dummy entry in my hosts file to point to the pi3 internal IP address that works OK.
Unlike the picture, the SSD is now stuck on top of the pi case.
Previously with Cumulus 1 I had hosted Cumulus, Apache web server, PHP, and MySQL all on a Windows desktop - but it was far too power hungry for 24x7x365 operation.
So I invested in a pi3, added an RTC module, and boot it off a 128 GB SSD drive - as a test to see if the pi3 was up to running all the services. As par of the test I have now switched over my production web site from Steve's server to the pi3 and I'll see how it copes. If there are major issues I can drop back to the hosted server quite quickly.
The old pi always hosted my old astro web site, and that has been moved over to the new pi3 as well.
The pi3 is running Nginx for web services, PHP 5.6, and MariaDB for MySQL services. One thing I did find was that some of the SQL queries were a bit taxing for the pi3 (taking up to 8 seconds to run ), so I have changed the code to run them once a day after the daily roll-over and cache the result.
The site template has had a spruce up too, now using a later version of Skel and a different menu system - the css needs a bit of tweaking in some areas but it is almost there.
So far it is looking OK, and hosting everything on one box also allows for future adventures in how to capture and present the data. For instance I can grab the wind data directly from the radio packets for almost real time updates. If it continues to go well then I'll eventually pull the plug in the hosted web site.
One issue I have is that I cannot use the external domain name to access the weather web site on my internal network. It serves up static content fine, but all PHP pages get redirected to 127.0.0.1 (but the single php page on the astro web site works fine using the external domain name!). That one is driving me nuts - if I put a dummy entry in my hosts file to point to the pi3 internal IP address that works OK.
Unlike the picture, the SSD is now stuck on top of the pi case.