Running tinytinyRSS on Cloud Foundry

Google Reader is going away in a week or so, and my friends have been asking me where I’m migrating all of my feed reading activities to. The answer for me is a combination of Flipboard and Feedly (both of which I recommend), but for those who prefer a more traditional Reader-style UI and also to retain ownership of their data, running tinytinyRSS is a possible alternative. I’d heard about it, but was tipped off to it again by my friend Dave Neary over at Red Hat 🙂

tinytinyRSS is a PHP application and needs a MySQL or PostgreSQL database. It offers the ability to import an OPML file (basically an XML format for listing RSS subscriptions), as well as various other capabilities and plugins.

Since we launched Cloud Foundry Hosted Developer Edition (aka CF v2) last week, I thought I’d find out how much effort it would be to install and run ttRSS on our new platform. It should “just work” – with buildpack support, you can now bring your own runtime to the platform… and we currently have free Marketplace SQL offerings from ElephantSQL and clearDB. Checks all the boxes!

Here’s what happened when I set up ttRSS on run.pivotal.io (the new URL where Cloud Foundry Hosted Developer Edition from Pivotal runs, replacing the old cloudfoundry.com beta hosted service).

First, I read the installation guide and downloaded the latest release tarball (linked at the bottom of the main wiki page). Then I unpacked the tarball on my Mac.

Once inside the release directory, I decided to just “push” the app to Cloud Foundry. I knew I’d need a PHP runtime, so my first thought was to point at the Heroku PHP buildpack (CF v2 is compatible with many Heroku buildpacks). I grabbed the URL and entered the following:

Tiny-Tiny-RSS-1.8  cf push --buildpack=https://github.com/heroku/heroku-buildpack-php
Name> tinytiny

Instances> 1

1: 64M
2: 128M
3: 256M
Memory Limit> 256M

Creating tinytiny... OK

1: tinytiny
2: none
Subdomain> tinytiny

1: cfapps.io
2: mqttbridge.com
3: none
Domain> 1

Creating route tinytiny.cfapps.io... OK
Binding tinytiny.cfapps.io to tinytiny... OK

Create services for application?> y

1: blazemeter n/a, via blazemeter
2: cleardb n/a, via cleardb
3: cloudamqp n/a, via cloudamqp
4: elephantsql n/a, via elephantsql
5: mongolab n/a, via mongolab
6: rediscloud n/a, via garantiadata
7: treasuredata n/a, via treasuredata
What kind?> 4

Name?> elephantsql-53b67

1: turtle: Tiny Turtle
Which plan?> 1

Creating service elephantsql-53b67... OK
Binding elephantsql-53b67 to tinytiny... OK
Create another service?> n

Bind other services to application?> n

Save configuration?> y

Saving to manifest.yml... OK
Uploading tinytiny... OK
Starting tinytiny... OK
-----> Downloaded app package (3.1M)
Initialized empty Git repository in /tmp/buildpacks/heroku-buildpack-php/.git/
Installing heroku-buildpack-php.
-----> Bundling Apache version 2.2.22
-----> Bundling PHP version 5.3.10
-----> Uploading staged droplet (12M)
-----> Uploaded droplet
Checking tinytiny...
Staging in progress...
Staging in progress...
  0/1 instances: 1 starting
  1/1 instances: 1 running
OK

Hurrah! The app is deployed! Note that while I was running through the steps here, I also chose to provision an ElephantSQL instance and bind it to my app. I could also have done that via the Marketplace in the Web Console before pushing the app. The tinytinyRSS wiki suggested that it performs better with Postgres than it does with MySQL, so I chose to use that.

The next step in the regular installation is to visit the URL (in this case http://tinytiny.cfapps.io) and check that things are working OK. When I got there, I found a form asking me to fill in the database credentials.

That’s a small issue – right now, there is no autoconfiguration for PHP apps with databases on Cloud Foundry, and I hadn’t modified the application code to grab the information from anywhere in the environment. Fortunately, there is a way to find out what the settings should be – via the env.log file in the application container. Running cf logs got me back the contents of the file. VCAP_SERVICES is where I needed to look.

VCAP_SERVICES={"elephantsql-n/a":[{"name":"elephantsql-53b67","label":"elephantsql-n/a","plan":"turtle","credentials":{"uri":"postgres://xxxxkjkj:lbI7r3Bh@babar.elephantsql.com:5432/xxxxkjkj"}}]}

I’ve modified the values here, for obvious reasons, but I plugged the values from the elephantsql service right into the form… hit the Test DB button… and got an error that my PHP runtime didn’t have support for mbstring…

Hmm!

Fortunately, there’s another buildpack for Heroku which adds PHP support, and does have support for mbstring (as well as using nginx instead of Apache, and a few other tweaks). I thought I’d give that one a go instead. I’d already saved my application settings to the manifest.yml file, so I could not just push a second time with a different buildpack, I had to use the --reset flag to apply the change:

Tiny-Tiny-RSS-1.8  cf push --buildpack=https://github.com/iphoting/heroku-buildpack-php-tyler.git --reset
Using manifest file manifest.yml

Uploading tinytiny... OK
Changes:
  buildpack: 'https://github.com/heroku/heroku-buildpack-php' -> 'https://github.com/iphoting/heroku-buildpack-php-tyler.git'
Updating tinytiny... OK
Stopping tinytiny... OKStarting tinytiny... OK
-----> Downloaded app package (3.1M)
-----> Downloaded app buildpack cache (4.0K)
Initialized empty Git repository in /tmp/buildpacks/heroku-buildpack-php-tyler.git/.git/
Installing heroku-buildpack-php-tyler.git.
-----> Fetching Manifest
       https://s3.amazonaws.com/heroku-buildpack-php-tyler/manifest.md5sum
-----> Installing Nginx
       Bundling Nginx v1.4.1
       https://s3.amazonaws.com/heroku-buildpack-php-tyler/nginx-1.4.1-heroku.tar.gz
-----> Installing libmcrypt
       Bundling libmcrypt v2.5.8
       https://s3.amazonaws.com/heroku-buildpack-php-tyler/libmcrypt-2.5.8.tar.gz
-----> Installing libmemcached
       Bundling libmemcached v1.0.7
       https://s3.amazonaws.com/heroku-buildpack-php-tyler/libmemcached-1.0.7.tar.gz
-----> Installing PHP
       Bundling PHP v5.4.12
       https://s3.amazonaws.com/heroku-buildpack-php-tyler/php-5.4.12-with-fpm-heroku.tar.gz
-----> Installing newrelic
       Bundling newrelic daemon v2.9.5.78
       https://s3.amazonaws.com/heroku-buildpack-php-tyler/newrelic-2.9.5.78-heroku.tar.gz
-----> Copying config files
-----> Installing boot script
-----> Done with compile
-----> Uploading staged droplet (38M)
-----> Uploaded droplet
Checking tinytiny...
Staging in progress...
Staging in progress...
Staging in progress...
  0/1 instances: 1 starting
  0/1 instances: 1 starting
  0/1 instances: 1 starting
  1/1 instances: 1 running
OK

Success again! reloading the configuration page, I was greeted with confirmation that the database connection was now working.

Screenshot_21_06_2013_14_58-4

After this, I simply needed to initialise the database, save the configuration, login, change my password, and import my Google Reader OPML file (there are ttRSS plugins which also allow you to import your whole Google Takeout from Reader, including likes and shares).

Screenshot_21_06_2013_15_16-2

As I said, I’m personally a big fan of Feedly and I don’t think I’ll be using ttRSS full-time, but this was a really nice and very quick way to prove that Cloud Foundry v2 is ready to host these kind of apps – even with the redeployment step to swap buildpacks. You might want to give it a try!

 

Busy times, but let’s talk Cloud Foundry!

Users of the existing beta Cloud Foundry hosted service cloudfoundry.com were sent emails this week explaining that we are almost ready to launch version 2 of the service. If you’re a current user, or if you have signed up in the past, dig through your inbox filters for the email (mine ended up under the “Promotions” label thanks to Gmail’s auto-filing magic).

Cloud Foundry v2, sometimes known as “next-gen” or ng, is a big set of updates. I wrote about some of them in my last blog post, and also noted there that we are going to run the new version on AWS.

Some of the things worth getting excited about are:

  • custom domains (the number one thing I’ve been asked for after every talk!)
  • buildpacks – the ability to use “any” language, framework or runtime that has a buildpack, not just Java, Ruby, or node.js (Matt and Brian seem to be competing to find interesting ones!). By the way, you should totally be trying your Spring and Groovy apps on v2! 🙂
  • organisations and spaces – the ability to share apps with a team and collaborate
  • a web management console for your apps
  • a Marketplace, which we will be expanding over time, allowing you to bind third-party services in to your applications.

These are all big changes, and there are many more under the hood (Warden, a new staging process, a new router… it’s a very long list).

My colleague Nima posted a nice slide deck giving a more technical overview of some of the internal changes:

In addition, our demo ninja Dekel has shared a great video of some of the things you can expect from version 2:

Over the past 24 hours or so I’ve been doing my best to respond to questions on Twitter and elsewhere. The existing v1 version will go away on June 30th, so if you are using it now you’ll want to look at migrating apps in the next couple of weeks, and we’ll share more on that soon. The new version will have pricing attached, with a free trial period too. Of course, the code is always available on Github and you’re free to spin up your own CF instance running on AWS, OpenStack or vSphere.

I know folks will have many more questions about the specifics over the next week or so, and we will be looking out for them.

Supercharging the community

As we have grown closer to v2 release, there has been ever-increasing activity in the vcap-dev mailing list and around the community. We’ve had more and more code contributions (so much so that I recently wrote a blog post about how you can contribute to the CF core projects). Projects like the cf-vagrant-installer and cf-nise-installer are helping people get local environments running very quickly. Our friends from PistonCloud released their turtles project. Best of all, the super Dr Nic Williams recently set up a cloudfoundry-community organisation on Github to act as an umbrella for many of these community contributions (info on how to join is here).

Let’s talk! (in London)

Over the past year or so I’ve spent a lot of time out in the developer community in London, and it has become apparent that a lot of folks are interested, already contributing to the community, or in some cases, already running their own CF instances in production 🙂

So, I thought it would be a good idea to do some bridge building and bring folks together to get to know one another. A brief unscientific Twitter poll suggested that other people liked the idea, so we’ve stuck a stake in the ground (evening of July 3rd) and I set up an Eventbrite page for a meet up. If you’d like to chat with people about Cloud Foundry over a drink, do sign up and come along. I’ll sort out a venue in the next couple of weeks, but I imagine it will be “around Shoreditch” or possibly over towards Waterloo, for purely selfish reasons! Totally informal, this is just a community meet up, so I’m not planning to do slides and talks and stuff – just come and share ideas or ask questions!

 

Cloud Foundry has gone Pivotal – so what’s new?

A few weeks ago I was privileged to be at the launch of Pivotal – a new organisation formed by VMware, EMC, and with investment from GE. You can read all about our new company at GoPivotal.com.

I am Pivotal

I am Pivotal

What does that mean for me, and for my role on the Cloud Foundry team? What is happening with Cloud Foundry right now? What about the Cloud Foundry community?

Well, as my über-boss James Watters recently wrote – we are a central part of the Pivotal business.

Our mission is to become the most popular platform for new applications and the services used to build them across public and private clouds.

That’s a pretty compelling mission statement, and I’d personally even add that we want to be the “best” platform, as much as “most popular”. One of the main reasons I wanted to spend a couple of weeks at the Pivotal office in San Francisco was really to immerse myself in the team and in the culture of Pivotal Labs, as well as to be at the launch event, and to get a strong handle on what is happening with Cloud Foundry, version 2…

Wait, what? Version 2?

In the middle of last year, the Cloud Foundry team started some major work to improve many of the features offered by the platform. Back then, it was written about on the Cloud Foundry blog. We initially started to refer to “ng” components like the Cloud Controller (“cc-ng”), and that’s what we now mean when we refer to “v2”. At the start of the year we published a roadmap which laid out a lot more detail in terms of what is coming. There’s some really great stuff in there – many bugs squashed; a new, high performance router; support for developers to collaborate on apps, via concepts of organisations and spaces; new containerisation via Warden; custom domains (yes, finally!); and most importantly, support for buildpacks. Buildpacks will bring a major change to our platform, replacing the former concepts of runtimes and frameworks (say, Java with Spring) with the ability to drop in whatever runtime or container you may choose, instantly making the platform more customisable. We’re pleased that the folks over at Heroku have allowed us to inherit the buildpack concept and having played with the new platform, I believe this gives us a really cool and solid way to support apps.

Deploying #cloudfoundry v2 on Amazon

Deploying Cloud Foundry v2 on Amazon

While I was in San Francisco, I used BOSH to deploy my own new Cloud Foundry v2 instance to Amazon EC2 (and also attended the AWS Summit, which was a bonus!). Right now the team is working on migrating our  hosted cloudfoundry.com platform to EC2, and when we officially boot up v2 for the public, it will be running right there. This is not new news – both James, and our CEO Paul Maritz, have repeatedly spoken about AWS.  The point of Cloud Foundry has always been that it is a platform that is Infrastructure-as-a-Service agnostic, even when it was started by VMware, and I’m seeing increasing interest from folks want to run it on OpenStack, AWS, and other infrastructures as well as vSphere (by the way, did you read about how Comic Relief 2013 ran on Cloud Foundry on vSphere and AWS? so cool!). There is no lock-in here – write once, deploy to cloudfoundry.com, to a partner running a compatible Cloud Foundry-based instance, or to your own private cloud on your on infrastructure, as you wish. The Open Source nature of the project is exactly why I jumped on board with the team a little over a year ago.

Talking of the update to cloudfoundry.com: it is also worth mentioning that when the beta period comes to a close we will have pricing plans, a nice web console for user, organisation and application management, and the start of a marketplace for partners to plug-in their own services for developers. I can’t give more details in this post, watch the official channels for news!

I felt very strongly that I wanted to write about version 2. It is a very big step in evolving the Cloud Foundry architecture, and I believe that it is important for the broader  community to understand that it is a significant change. If you are running an app on cloudfoundry.com today, we’ll shortly contact you with information about migration to the new platform, as some changes will be needed to adapt to the fact that runtimes and frameworks are now buildpacks, there will be some changes to the way services work, and you will need our new ‘cf’ gem to deploy to the new service. We have already “paused” new signups on the current platform. If you look at the new documentation, you will find that it now focuses on version 2 – we apologise for any confusion during the transition process.

We’ve been talking with ecosystem partners about version 2 as well. For instance, our friends at Tier 3 recently blogged about Iron Foundry plans, and I had the pleasure of meeting with Stackato folks in person in San Francisco recently. If you are working with your own Cloud Foundry instance privately (we know that many organisations are!) I strongly urge you to talk to us via the vcap-dev mailing list to learn how you can start to take advantage of what the new platform brings.

What else does Pivotal mean for Cloud Foundry? Well – we are more open than ever, and keen to work with the community on pull requests to add features via Github. I’ve just written a  post for the Cloud Foundry blog about how to participate in the Open Source project. In fact, I’ll be talking more about this at the Cloud East conference in Cambridge next Friday May 24. We’re always happy to talk more about how to collaborate.

These are exciting times!

 

Two weeks with a Nokia Lumia 920

Just in time for Nokia to announce the Lumia 925 (and 928), I’m belatedly posting my review of a Lumia 920 (d’oh!).

As a techie and long-time disparager of Microsoft technology, the Xbox 360 was the MS product which turned my head. I won mine in a competition (having been a PlayStation and Nintendo gamer), and from the very first experience I was impressed – it was easy to get up-and-running, get online and pull in my social contacts from Facebook, and it was generally a smooth and impressive device. Since then I’ve also gotten to know some of the folks at Microsoft who are focussed on working with the Open Source community, and my opinions have distinctly softened and changed.

I’ve played with both Windows 8 and Windows Phone 8 on display in stores, so when the nice folks at Nokia Connects offered me the opportunity to trial their flagship Lumia 920 for a fortnight in March, I jumped at the chance to immerse myself in the experience. The last Nokia phone I’d owned was the slider  7650 model from way back in 2001 – I’d been a loyalist through the 1990s until then, but wandered into BlackBerry land for a couple of years after that. I’ve also had every iPhone model since the 3G and have in parallel tried Android devices running 2.2 through to 4.1. So, from both a hardware and software perspective, I guess I’ve got a fairly broad experience, and was intrigued to find how a Windows Phone from Nokia would suit my “power user” habits!

A couple of notes. Firstly, if I’m mixing tenses here it’s just because I’ve now returned the device per the trial arrangement. The other thing to point out is that I really did do road test of the phone for two weeks, to the extent of popping my nanoSIM into a microSIM adapter and using it for as much as I could. More on this to come.

The first thing to say is that the bright red Lumia 920 looked and felt fantastic in the hand, although it is substantially larger than the iPhone 5.

The Nokia 920, customised to taste

The Nokia 920, customised to taste

One tiny issue I felt that wasn’t considered was the central positioning of the camera lens and flash in the back of the device, which meant I’d often have my hand across it and needed to wipe it, but I suppose a case or skin might have reduced that. The screen was a visual treat, it looks stunning in day-to-day use, and was also very nice for watching the couple of videos I looked at while I had the Lumia. The iPhone took over most of my photographic life for many years (which is sad in many ways, I realise), and I’ve got thousands of photos stored on it. Coming back to the camera on the Lumia, apart from the seemingly more-frequent need to clean the lens, it produced some great results – although I did miss the HDR capability which might have levelled out some of the contrast in a few shots I attempted.

no HDR

HDR would have helped with this early-morning shot

One particularly innovative feature of the camera on Windows Phone 8 is the concept of “lenses” – apps which can extend the basic function of the camera application itself. I also appreciated the way in which the Photos app enabled me to both browse my own Facebook and other social network albums, but also to see the latest content from my friends. Clever stuff. Oh, and SkyDrive let me get to the images straight away across different devices and on the web. +1 for sensible functionality. I vaguely missed Instagram for a couple of weeks, but I imagine that app will materialise for the platform before too long (and since the Instagram/Facebook “ToS-gate” I’ve largely moved back to Flickr or to dual posting anyway).

Rounding out the hardware commentary, I’ll add that the battery life was acceptable (I tended to pop the phone on charge whilst in the office and overnight, but it seemed on a par with my other device). I was also very happy with the performance of the phone – everything was extremely fluid and I didn’t encounter any hangups or freezes. Very slick.

Live tiles

Live tiles

Time, then, to talk about Windows Phone 8. I’ve admired the rebooted and reimagined Windows Phone UI from afar for a while now. After all that came before it in Windows Mobile efforts, it’s a bold and stunning revolution of a user experience – and I believe it is one that works.

It’s an interface that is alive, glanceable, and easy to use. The live tiles in particular are a game changer. The resizable tiled UI lives up to the selling point of true personalisation. More than that, the list of apps is one swipe away, and not only is is searchable, it’s super fast to jump to any lettered section of apps (sorted alphabetically – crazy, right?). I am a definite fan. I’m not yet convinced of the Modern UI / tiles in Windows 8 the desktop experience, but that’s more because of the janky need to switch between old and new paradigms to get some things done – for Xbox, tablet and phone, I think this is a useful approach.

The alphabetical list of apps is useful

The alphabetical list of apps is useful

I was pleased to be able to get back to my content and online services quickly, at least in relation to a subset of the apps I use regularly. Amazon (Kindle and Shop, plus a handy barcode scanner tile shortcut), Evernote, Last.fm, Spotify, Netflix, and Paypal were all present and correct. Twitter is covered by multiple apps (I chose Rowi), as is Facebook – although in the case of the latter most are fairly poor mobile web wrappers. There’s a giffgaff app already too, for all you giffgaffers out there!

However – and you may have seen this coming – the key missing parts of my daily workflow were all essentially app deficiencies. No 1Password, no good route planning apps for bus and train, no TomTom, no Feedly or Flipboard, no Instagram, no Google+ or Google Maps, or anything decent for YouTube.

Petty arguments between technology behemoths aside, I’d love to see more organisations taking Windows Phone seriously as a platform, as it does involve rethinking existing UI strategies, and I believe that the Modern UI is something here to stay across Microsoft devices. A few apps do exist for other things I use like BBC News, Github and Flickr, but all could do with an update or an “official” app to come along. I genuinely believe it is a mistake for organisations to ignore this platform.

Finally of course we reach “the prison I knowingly built myself” – and that is called Apple iCloud. The majority of my music is now stored there, and whilst the Windows Phone app for OS X was very effective at enabling me to sync iTunes playlists, I couldn’t just grab things from the cloud when I wanted. Messaging was particularly frustrating too, as I barely have any Windows Live or Skype contacts compared with the folks I interact with daily via iMessage. Messaging was annoying, as iPhone users tended to end up getting half of my conversations, some via text, and then missing things as they were logged in via their email address. I could see some great stuff in the Windows Contacts world, having groups of contacts whose updates I wanted to follow, but I wasn’t immersed enough for it to immediately work for me.

To round off on a high note – let’s talk about online management. Both Google and Microsoft seem to have this right, and Apple are living in the past. Using the My Windows Phone portal was great, and a better experience than even Android’s ability to send apps from Google Play to the phone – I liked the integrated view of SkyDrive, Xbox Live etc.

Thanks Nokia for a chance to play with your lovely device – definitely something I’d recommend to those looking to commit to a change and wanting a modern device. A few more apps, and a way out of my prison, and I’d be there myself…

Footnote:

A last, personal and slightly unrelated note – Microsoft are very lucky to have hired the man who persuaded me to leave IBM, Patrick Chanezon – Pat’s blog post about his choice in many ways mirrors my experience of dealing with Microsoft over the past few years – there’s a much more heterogeneous and open approach there now, and I wish him very well in the future, I had a great year at VMware working with him!

Go Pivotal!

I’m in San Francisco today for the launch of a new company – Pivotal.

IMG_0116.jpg

Pivotal is bringing together a number of key technology assets – our Open Source cloud platform (Cloud Foundry), agile development frameworks like Spring, Groovy and Grails, a messaging fabric (RabbitMQ), and big, fast data assets like PivotalHD.

I’ll be live tweeting from the event, where Paul Maritz our CEO will be introducing the company and vision. You can also follow the @gopivotal Twitter ID, and check out the new website.