Categories
Linux Open Source Technology Ubuntu

Raspberry PI4 upgrade to bullseye and LXC notes

So whilst guides like this one: https://www.tomshardware.com/how-to/upgrade-raspberry-pi-os-to-bullseye-from-buster are very useful there were a couple of extra things that I needed to fix.

  1. I needed to update /etc/apt/sources.list.d/raspi.list in addition to /etc/apt/sources.list – changing buster to bullseye
  2. LXC config for networking caused issues to the networking

Point 1 is explained above but point 2 took me a while to figure out what was wrong. And this is only really relevant if you are using LXC (Linux Containers – a lightweight precursor to Docker / K8s). I am documenting this for anyone else who might be seeing issues (or my forgetful future self!). Also note that trying to define the static IP via dhcpcd.conf didn’t work (although perhaps as I was trying to configure eth0 rather than lxcbr0?!)

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

# attempting to configuring eth0 here 
# like the below will cause multiple errors!
auto eth0
iface eth0 static
    address 192.168.x.y
    netmask 255.255.255.0
    gateway 192.168.a.b
 
auto lxcbr0
iface lxcbr0 inet dhcp
    bridge_ports eth0
    bridge_fd 0
    bridge_maxwait 0
    
# wifi
allow-hotplug wlan0
iface wlan0 inet dhcp
        wpa-ssid SSID
        wpa-psk KEY

What it needs to look like (the static IP part is configured within the LXC definition).

# interfaces(5) file used by ifup(8) and ifdown(8)



# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

#eth0 - built in ethernet is configured via the LXC bridge
# DO NOT CONFIGURE IT SEPERATELY OR networking and LXC will give errors

auto lxcbr0
iface lxcbr0 inet static
    bridge_ports eth0
    bridge_fd 0
    bridge_maxwait 0
    address 192.168.x.y
    netmask 255.255.255.0
    gateway 192.168.a.b

x.y and a.b are replaced by your actual addresses of course. Hope this helps someone (and I remember it if I need it again!)

Categories
Open Source PHP Technology Web Development

PHP Conference UK 2010 Notes and Thoughts

Here are some notes / interesting products/thoughts that were mentioned (apologies this is more of a set of notes for me than a proper blog post – if I get time I will refine this!)

Started the day on a conference call back to the office so had to miss the keynote which was a shame as it was by quite an eccentric guy who Microsoft have hired (as a UX Architect Evangelist) largely about keeping thing simple and usability from what I gathered of the end of the talk.

Day was very tough as a I had a late night catching up on various things to allow me to free up the Friday – its difficult sitting through talks when really tired!

Met with several former colleagues from my last company (and former colleagues from my current company) so was a bit of a blast from the past at times.

There appear to be a lot of development and interest around NoSQL / document based databases at the moment – definitely something to keep an eye on as it matures as a technology.
http://www.phpconference.co.uk/talks

RDBMS in the social networks age
by Lorenzo Alberton

Database Graph Structures via advanced features of SQL, using SQL-99 and SQL-2003 functionality that certainly MySQL doesn’t have any many other DBs won’t have the 2003 extensions. Obviously using this kind of advanced functionality will have an impact on Database server load.

This talk felt a bit like it was flying in the wind of most new thinking at the moment (although to be fair – this is partly what Lorenzo has now put on his website below) which is to keep your database tier minimally loaded as it’s the part that has most issues with vertical and horzontal scalability (keep most of the CPU load in the web app tier as its easier to add more nodes there).

Slides available at:
http://www.alberton.info/talks

Legacy Code Talk by Ibuildings
doxygen – code documentation for any language not just PHP

ctags.sourceforge.net

BOUML bouml.free.fr (reverse engineering capabilities)

phpcs – Codesniffer (part of PhpUnderControl)

Thoughts for tackling older PHP4 based projects and code bases – get them in Source Control, start to apply Continous Integration type approaches.

Suggestions made around
Full isolation (separate server)
Using wrapper classes
Possible code rewriting routes for legacy code:
Going from random mix of PHP business logic and HTML outputting to neater procedural based code
Procedural to OO
OO to full OO

CouchDB
Early sight of the possible future of web application data persistance and replication. Interesting that CouchDB makes uses of HTTP as the connecting protocol. Might be possible (but probably not desirable apart from specific cases) in the future to create web applications that are JS direct to CouchDB in certain cases?

http://couchdb.apache.org/

Web and mobile application monetisation models / Paypal X

Paypal appear to be launching a new platform / API

  • Adaptive Payments
  • Pay multiplerecipients at once
  • Partnership
  • Chained payments (e.g. commission based payments)

Bit disappointed by this one as it was about PayPal’s API (https://www.x.com) rather than strategies for monetisation which is what the title lead me to believe.

Web Services Best Practise
At the beginning lots of stuff about basic HTTP (eg HTTP headers, Verbs)that ever developer should know about.

Lorna (also from iBuildings) who gave this talk seems to have a bit of a sarcastic talking down to you type tone I found slightly annoying – maybe she gives training to newbies all the time or something. Or maybe I was just tired. She had some interesting things to say about Web Services design particularly towards the end of her talk. The talk was caveated as being a bit of “a rant” and it was exactly that in places – felt like she was having a go at everyone a lot of the time!

Beers at the end sponsored by Facebook were a nice touch though, although I only had time to grab a quick one whilst chatting to Mark Schaschke from iBuildings and a couple of guys from my previous company. Think next year I will sit this one out to allow more developers to attend as think they will get more value out of it.

Categories
Life Mountain Biking

Recent Tech Discoveries (July 09 edition)

Some Recent Tech Discoveries I thought I’d share:

The Good:

Windows 7 RC – writing the blog post from it – excellent OS (and that says a lot coming from me!)

Ubuntu 9.04 -What can I say – wow – is the OS market hotting up or what? Right when they said the Browser will be the O/S – we’ll we aren’t there yet (well not until Google’s Chrome OS anyway…)

Spotify – sure lots of people know about this one now but great streaming music service. Kind of like a commercial radio station where you get to choose the playlist. But native version for Linux would be nice (netbooks will make this kind of porting happen organically now I suspect??)

Bitly – specifically the Bit.ly Sidebar for your browser – very clever. You’ll notice I’m starting to use more bit.ly links in my blog posts but for Twitter they are essential.

The Bad:

ebox – Not a good move to just try and install this on a Ubuntu box (tried this at home) screwed lots of stuff up. Nice idea but if you want to try it out use a seperate box. It looks good and the concept is a great idea but I think its a bit too flawed for me right now (sorry ebox devs).

Denyhosts (prevents brute force attacks on SSH by adding IP addresses that repeatedly fail to login to a black list – in /etc/hosts.deny)  silently stopped working some time ago on my Ubuntu server (due to an upgrade of Python by the looks of things). Following the fix on this forum thread sorted the problem although I found the file you need to change is:  /usr/share/denyhosts/daemon-control-dist rather than the one mentioned.

The Ugly:

HMG Info Sec standards (or rather the OTT implementation of) – I probably can’t say any more or I’ll get burned in acid (its a long and painful story…!)

More posts to come. Enjoy the summer everyone. I intend to on a ride around Litchfield tomorrow – embedded Google Map to follow no doubt…!


Categories
Open Source Technology Web Development Wireless

Options for sending & receiving SMS from web applications

One of my projects at the moment is to look at our options for building SMS enabled web applications (specifically for us around our Zend Framework based apps). Both for data capture (Inbound) and as an alerting / notification system (Outbound).

Thought I’d pull together some of my thoughts and reference material [not exhaustive or complete yet] in case its of use to anyone else in a similar situation. But first I’d like to thank my good friend Jem who helped identify some different angles on this…

Research Material:

As always the first place to start is Google and Wikipedia – http://en.wikipedia.org/wiki/SMS and http://en.wikipedia.org/wiki/SMS_gateways

LinkedIn Q&A is a great reference – here are a few relevant threads that I came across (you’ll probably need a Linkedin.com account to get to these) there are lots more if you search around with SMS related keywords.

Implementation Options:

There are 2 main options – and as always its the struggle between D.I.Y and DRY (Don’t Repeat Yourself – or my version DRY-OFF – DRY or others [for f sake? I just wanted it to be OFF as it sounded better; anyway I’ll shut up now!])

Roll your own

The Kannel FAQ covers this point quite well – http://www.kannel.org/faq.shtml#1.2

pros – complete control over messaging and ability to iron out any kinks in connectivity etc, potentially cheaper to run / only costs you what you use (rather than having to buy credits)

cons – more complex to setup in the first place, need to buy & setup some hardware somewhere etc

Useful article on Kannel on Ubuntu with PHP5: http://www.chipmunkninja.com/Setting-up-Configuring-and-Using-13@

Outsourced

Pros – ease of getting it up and running if the integration API (eg HTTP, XML/E-mail based) is easy to pick up

Cons  – my concern around these guys is how do you how good they are – will they disappear tomorrow? What gateways are they using, how reliable are their channels etc.

Guide to Gateways (US focused) but has some nice general considerations) http://www.developershome.com/sms/howToChooseSMSGateway.asp This site also has a really nice comparison table – which you could also use as a template for doing your own matrix/scoring comparisions of these services.

We will probably go with a combination of the 2 options – using our own system for the development of services (as we have greater control) and then making use of a partner once the message volumes go above what is finanically viable/scalable in house…

Once the technical bit is out of the way you then need to consider the usability and process flow around the app – eg if users are sending in data, queuing, acknowledging their submissions, correcting mistakes etc…

Hope to post more on this topic if I get the opportunity! If anyone has any insights or good resources on this topic then by all means please comment on this post!

Thanks

Categories
Random Thoughts

Blog > Twitter > Facebook

When I publish this blog article it should update my Twitter status, my Twitter status is linked to my Facebook status via the Twitter Application.

Hmm I wonder whether these could get caught up in an infinite loop – updating themselves and annoying the hell out of everyone…!

I know – This is all very very sad – but maybe it will save me some time to do something useful for a change!

Categories
Environment Technology

Some recent browsing (Green Issues, SOA, Dashboards)

Some sites that I found interesting recently…

I’ve been looking at quite a lot of Green IT/Business type issues recently www.climatechangecorp.com is a good site (even if it does heavily promote its events on the content).

Carbon Calculators article: http://www.climatechangecorp.com/content.asp?ContentID=5119 Its disappointing it mentions AEA only in the context of providing the emissions factors – we actually do a whole lot more including building online carbon/emissions data platforms (and calculators) ourselves.

Great article from Adobe on Web 2.0, SOA etc – gives a great overview: http://www.adobe.com/devnet/articles/web_end.html

Sun Microsystems came into to talk to us about their Java CAPS recently and it looks really interesting. We’ve already started to look at NetBeans IDE more closely (particularly the PHP plugin and its SOA/Business Process (BPEL) diagram/visualisation to BPEL XML code features…

See http://www.sun.com/software/javaenterprisesystem/javacaps/index.jsp

Dashboards, Flex with PHP etc:

One of my current projects is update our (data) visualisation and dashboard piece of our offering – as such we’ve been researching whats out there that we could use to enhance our technology stack:

Flex and PHP http://devzone.zend.com/article/3580-Building-Dashboards-With-PHP-and-Flex

Zend Framework/Adobe Media Remoting – http://corlan.org/2008/11/13/flex-and-php-remoting-with-zend-amf/

Interestingly Microsoft seem to be about to launch a new Dynamics AX product which is focused at Environmental data management – interesting to see the main IT vendors start to move into the space that we’ve been in for some time. This is really good news as it will give more deployment and integration options moving forward (eg for customers already using Dynamics).

Categories
Open Source Technology Web Development

Wowed by upgrade to WordPress 2.7…

Have just upgraded to the latest and greatest WordPress and was shocked as it has wowed me again in terms of user interface. The pace of improvement of this Open Source product is incredible. Just as I think wouldn’t it be good if… they’ve done it in the next release (and improved stability / fixed bugs).

They’ve introduced a turbo button which makes use of Google Gears (the offline/browser enchancement) and added more time saving shortcuts and a better post writing interface (particularly for re-using existing tags on new posts – this UI for tagging taxonomy might have to be borrowed on some of my projects…) Read their blog post here for more info on features (includes a video).

Below is the new dashboard – compare the below to WordPress 2.5 that I upgraded to back in May 08

fireshot-capture-5-olivere28099s-yard-ollie-cronke28099s-blog-e280ba-add-new-post-e28094-wordpress-blog_cronky_net_wordpress_wp-admin_post-new_php

The new dashboard is below – it now has dragable “modules”

wordpress_wp-admin

Trouble is it now makes me want to upgrade the design of my blog – but I know I have way more important things to do with my time before I faff with that again!

Categories
Technology

New Facebook Design and Badges

If your a facebook user then you’ll want to check out the new design:  which is a vast improvement – sharing content link URLs and photos is now mega easy compared to the old site.

Also I discovered badges on FB tonight too – here’s mine which I’ve inserted into the sidebar of this WordPress powered blog (this is easy to do in the admin – just edit the sidebar.php file in design -> theme editor). I guess I’ll have to watch what I put as my status message now though..!

Categories
Technology Web Development

Facebook privacy issue workaround, and police using a FB app…

I’ve blogged about Facebook before here and here when I was talking about privacy; came across a couple of videos on BBC news (talking of which is really impressive the video and audio quality has vastly improved over last time I used) about facebook – one of which is about a facebook privacy flaw relating to Google applications. What they don’t tell you is how you can fix this…

If you want a workaround to prevent this then when next logged in to FB go to “privacy” option (which is top right), then “applications” then “other application”, scroll down until you see the image below:

Click to view full size version

Note that I’ve unticked the Basic Info and Personal Info (I’ve actually now unticked Work and Education too) as can’t really see why a Facebook application really needs this stuff in any case.

The other video is about a police force developing some kind of app that allows the local community to help fight crime through alerting them to crimes and related news. Thats pretty innovative and cutting edge for a Police force and is definitely food for thought for other uses in the public sector.

I’ve also changed my facebook password as realised it was the same as a couple of other sites and seeing as Facebook is probably a massive target / security risk (as makes such a juicy target) decided that it wouldn’t be good if someone got hold of my personal details AND a password I use for some other stuff (note to self: use password management and more passwords!!!).

We’re doing some ISO27001 stuff at work at the moment which is really making me re-think information security stuff…