Take your webapp offline

Network Problems

Network Problems (Jeremiah Roth)

In a previous project, we needed information from farmers about what crops they had on their land. As a digital-first service, this was all done via a web UI. Having taken the app out to user testing, we found that this rich internet application struggled with low bandwidth connections. Even after we minimising and compressed the javascript, CSS and data, it wasn’t enough. So we ended up with a new requirement – how can we take our webapp offline?

Read more ›

Tagged with: , , , ,

London DevOps Meetup – 11th June 2015

Large number of people at the London DevOps Meetup, 11th June 2015

Large number of people at the London DevOps Meetup, 11th June 2015 (Image by @cm6051)

I was at the London DevOps Meetup last night, graciously hosted by Facebook at their London HQ. We had three chats – one about how Facebook ensures it’s running, one about Facebook’s data centres, and one from Google about how they schedule containers onto their server farm.

Read more ›

Tagged with: , , , , , ,

Maven inside Docker’d build agents

I previously posted about how you can use Jenkins in a Docker container, and then use Jenkins Swarm to create build agents automatically? There was an issue with the build agent which caused Maven to download dependencies from localhost. You’d see something like

+ mvn package
[INFO] Scanning for projects...
[INFO]                                                                         
[INFO] ------------------------------------------------------------------------
[INFO] Building MyApp 1.0.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
Downloading: http://localhost:8082/archiva/repository/all/org/apache/maven/plugins/maven-resources-plugin/2.5/maven-resources-plugin-2.5.pom
 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.274s
[INFO] Finished at: Wed May 13 17:13:28 UTC 2015
[INFO] Final Memory: 5M/107M
[INFO] ------------------------------------------------------------------------
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to maestro-mirror (http://localhost:8082/archiva/repository/all): Connection to http://localhost:8082 refused: Connection refused -> [Help 1]

[INFO] ————————————————————————
[INFO] BUILD FAILURE
[INFO] ————————————————————————
[INFO] Total time: 1.274s
[INFO] Finished at: Wed May 13 17:13:28 UTC 2015
[INFO] Final Memory: 5M/107M
[INFO] ————————————————————————
[ERROR] Plugin org.apache.maven.plugins:maven-resources-plugin:2.5 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.5: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.5 from/to maestro-mirror (http://localhost:8082/archiva/repository/all): Connection to http://localhost:8082 refused: Connection refused -> [Help 1]

I tracked it down to the build agent I recommended in the article.

Read more ›

Tagged with: , ,

A training records app using Neo4J

Neo4J's graphic of what a graph-based database stores data

Neo4J’s domain model

Neo4J is possibly the most well-known graph-based databases. That means it’s not your traditional tables, columns and rows – instead, it stores things as nodes and relationships amongst them. Having watched a presentation about it at QCon London 2015, I decided to take a further look.

To make it realistic, I have decided to create a very simplified Training Records application. The target audience are small companies who might be using an Excel spreadsheet to track their employee’s training, or a small training supplier who wants to track what training their customers undertook (eg so you can invite them for a refresher course if training is about to expire).

Read more ›

The Ever Increasing Complexity of Done

“We’ll just edit our definition of done on the Wiki and add that to it”

– anonymous

All the agile projects I’ve worked with have a concept of “Done” at the work item level. For some projects, it’s gloriously printed, framed and given pride of place on a prominent wall. For others, it’s hidden in a wiki page or behind a door somewhere. It’s a noble cause – to ensure everyone knows what is needed to mark a piece of work as completed and claim the story points. Consider it a form of contract between the implementors and the business.

Here’s an interesting challenge – ask your implementation teams what the definition of done is. If they can’t recount your definition of done is, then how can they follow it?

Read more ›

Tagged with: , ,

Hosting your SBT-built Java project on RedHat’s OpenShift platform

If you’re more of an OpenShift than Heroku fan, here’s how you can get your SBT-built Java project onto OpenShift. OpenShift has fewer dynos (“gears”) at the free tier (only 3) but they idle after 24 hours instead of 1, and you get 1gb of disk storage to play with. They’ve also got a wide number of supported technologies you can run, be they languages, databases or servers. And “You could do OpenShift now and Docker will be our container tech in the new release this year” says @TheSteve0.

Read more ›

Tagged with: , , , ,

Getting your SBT-built Java project onto Heroku

I love Heroku for quickly deploying and testing your applications. The free usage tier makes it no cost for simple applications, and the Git Push To Deploy mechanism is a great way to test your build environment isn’t using cached resources.

If you’ve got a DropWizard 0.7.x service or similar built using SBT 0.13.x, and you deploy it to Heroku you may encounter the following error message:-

[error] Not a valid command: stage (similar: last-grep, set, last)
[error] Not a valid project ID: stage
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: stage (similar: state, target, tags)

The fix to this is to use the SBT Native Packager.

Read more ›

Tagged with: , , ,

Using Jenkins in a Docker container

I remember being at a DoxLon meetup back in the days of Docker 1.0, and one of the presenters said that they’d found Jenkins leaked resources so was unsuitable for containerization. Happy news – there’s an official Jenkins image.

Read more ›

Tagged with: , ,

Scala Play from scratch

If DropWizard excels at RESTful webservices, then the Play Framework is often the counterpart which provides an HTML front-end. Although it’s got both Java and Scala support, the Scala support seems to be more active. Here’s an introduction without using all the Activator Framework / play create app template commands.

Read more ›

Tagged with: , , ,
Top