tag:blogger.com,1999:blog-23636439209420573242024-03-19T15:57:39.560+11:00Graham DumpletonGraham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comBlogger152125tag:blogger.com,1999:blog-2363643920942057324.post-47808132435747265912019-01-03T17:48:00.004+11:002019-01-06T08:41:14.504+11:00Integrating the workshop notes with the imageIf you are still following this series of blog posts, we now have a dashboard for our workshop environment which combines workshop notes with the interactive terminal in the users browser.This enabled us to have the instructions right next to the terminal where workshop attendees execute the commands. Further, it was possible to have it so that they need only click on the commands and they would Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-53961900163352750712019-01-02T10:18:00.000+11:002019-01-02T10:18:44.358+11:00Dashboard combining workshop notes and terminalThe workshop environment described so far in this series of posts only targeted the problem of providing an in browser interactive terminal session for workshop attendees. This approach was initially taken because we already had a separate tool called workshopper for hosting and displaying workshop notes.I didn't want to try and modify the existing workshopper tool as it was implemented in a Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-6725596593198318192019-01-01T14:22:00.001+11:002019-01-10T21:13:41.973+11:00Administration features of JupyterHubYou have seen now in the last post how you can use JupyterHub to deploy a multi user workshop environment where each user is given access to their own interactive shell environment in their web browser. This is by having JupyterHub spawn a terminal application instead of the usual Jupyter notebooks it would be used for.The aim in being able to provide this out of the box experience, is that it Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-89560432835731619062018-12-31T13:57:00.001+11:002019-01-10T21:13:15.544+11:00Deploying a multi user workshop environmentIn this fourth post of this series of posts, we finally get to how to deploy a multi user workshop environment using OpenShift, or at least, how to deploy an interactive terminal session per user accessible in the browser. Right now we are still working on the assumption that the workshop notes are deployed separately, but we will get to that in a later post.From the second post in this series weGraham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-50545283395611133002018-12-30T17:42:00.000+11:002018-12-30T17:42:39.881+11:00Creating your own custom terminal imageIn this series of posts I have been talking about some of the work I have been doing with creating environments to host workshops when needing to train users in using a software product such as OpenShift.In the first post I explained how JupyterHub can be used to deploy web applications other than Jupyter notebooks, and how I use it to deploy user environments which give each attendee of a Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-47529037608785415122018-12-29T13:58:00.002+11:002018-12-29T20:17:24.106+11:00Running an interactive terminal in the browserIn the last blog post I explained that JupyterHub can be used to spawn instances of applications other than Jupyter notebooks. Because JupyterHub can also handle user authentication, this made it a handy way of spinning up distinct user environments when running workshops. Each attendee of the workshop would be given access to a shell environment running in a separate pod inside of Kubernetes, Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-40778657662287445562018-12-28T17:05:00.001+11:002018-12-28T17:05:48.078+11:00Using JupyterHub as a generic application spawnerAs part of my day job I occasionally need to give workshops on using OpenShift, Red Hat's distribution of Kubernetes. The workshop notes that attendees follow to do the exercises we host using an internally developed tool called workshopper. We host the workshop notes using this tool inside of the same OpenShift cluster that users will be working in.To access the OpenShift cluster and do the Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.comtag:blogger.com,1999:blog-2363643920942057324.post-81284499964320129232018-10-22T20:11:00.001+11:002018-10-22T20:11:47.225+11:00Packaging mod_wsgi into a zipapp using shiv.At the recent DjangoCon US conference, Peter Baumgartner presented a talk titled Containerless Django: Deploying without Docker. In the talk Peter described what a zipapp (executable Python zip archive) is and how these could be created using the shiv tool, the aim being to be able to create a single file executable for a complete Python application, including all its Python package dependencies.Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-88418380934784288042018-04-13T19:53:00.000+10:002018-04-13T19:53:24.766+10:00Book #2: Deploying to OpenShiftI have been more than a bit busy over the past year and this blog has become somewhat neglected. One of the reasons for being so busy was that I was working on a second book. As with the first book, which I co-authored, this book is on OpenShift. This time I am the sole author, and the book somewhat thicker, so you can imagine it has taken a fair bit of time and effort.For those who may not know Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-62686234099212697592018-01-30T18:31:00.001+11:002018-01-30T18:36:00.135+11:00The "Decorator Pattern" versus the Python "wrapt" package.Brandon Rhodes published a post today about the Decorator Pattern and how that translates into Python. He explains the manual way that the pattern can be implemented in Python as a wrapper, as well as how you can try to minimise the amount of work you need to do by overriding special methods of a Python object.
The wrapt package I authored was purpose built for this task of creating wrappers Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-32018486066071169672017-04-30T16:20:00.001+10:002017-04-30T16:33:05.958+10:00Deploying Jupyter Notebooks in a hosted environment.The popularity of a programming language can often be dictated by the existence of a killer application. One example is PHP and the web site creation tool Wordpress. In the Python language community, it is harder to point to any one application that helps in promoting the language above and beyond any others. This is in part because Python can be applied in various ways and is not focused on justGraham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-66152921191611077062016-12-09T16:22:00.001+11:002016-12-09T16:34:32.895+11:00Backdoors for becoming root in a Docker container.In my last post, the main issue I looked at was whether you can trust what a Docker-formatted image says about the user it will run as. What we found was that if the ‘USER’ statement is used in a Dockefile, but is set to a name, you have no idea what UNIX user ID the application in the container will run as. This is because the name could be mapped to any user ID by the UNIX passwd file.
Setting Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com2tag:blogger.com,1999:blog-2363643920942057324.post-84406178736615915402016-12-01T16:38:00.001+11:002016-12-01T16:55:30.056+11:00What USER should you use to run Docker images.If you follow this blog and my rants on Twitter you will know that I often complain about the prevalence of Docker-formatted container images that will only work if run as the root user, even though there is no technical reason to run them as root. With more and more organisations moving towards containers and using these images in production, some at least are realising that running them as rootGraham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com2tag:blogger.com,1999:blog-2363643920942057324.post-74404918785488624592016-08-01T16:43:00.001+10:002016-08-01T16:57:33.483+10:00Testing out deployment of Python based Opal health care framework.When I was working on mod_wsgi, but also in a previous job where I was working on web application performance monitoring tools, I was always after good sample Python web applications to test with. Unlike other programming languages for the web there weren’t many end user applications written in Python that you could quickly download and get running. Most of what existed out there were incomplete Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com8tag:blogger.com,1999:blog-2363643920942057324.post-1321224688134721542016-07-26T14:15:00.001+10:002016-07-26T14:21:44.323+10:00Installing mod_wsgi on MacOS X with native operating system tools.Operating systems inevitably change over time, and because writing documentation is often an after thought or developers have no time, the existing instructions on how to install a piece of software can suffer bit rot and stop working. This has been the case for a while with various parts of the documentation for mod_wsgi. This post is a first step at least in getting the documentation for Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-74799249245812912952016-04-08T08:53:00.001+10:002016-04-08T08:59:47.511+10:00How are you using Docker in your development workflow?If you have been reading my blog posts rather than simply flicking them out of your news feed as a bit of noise, you will know that I have been working on a project which aims to make the deployment of Python web applications easier. I wrote a bit about this in the post titled 'Building a better user experience for deploying Python web applications’.
That post got a surprising number of reads, Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com1tag:blogger.com,1999:blog-2363643920942057324.post-52135824281710618362016-04-07T16:18:00.001+10:002016-04-07T18:16:22.078+10:00Learning more about using OpenShift 3.I still have a long list of topics I could post about here on my own blog site, but over the last couple of months or so, I have been having too much fun playing with the new version of OpenShift based on Docker and Kubernetes, and understanding everything about it. The more I dig into OpenShift, the more awesome it gets as far as being the best platform around for deploying applications in our Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-20041161146576971322016-03-02T09:09:00.001+11:002016-03-02T09:16:04.776+11:00Speeding up Docker build times for Python applications.I recently wrote a post where I talked about building a better user experience for deploying Python web applications. If one counts page hits as an indicator of interest in a subject then it certainly seems like an area people would like to see improvements.
In that post I talked about a system I was working on which simplified starting up a Python web server for your web application in your Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com1tag:blogger.com,1999:blog-2363643920942057324.post-74888266858693404612016-02-24T12:56:00.001+11:002016-02-25T07:21:39.011+11:00A walkthrough of using OpenShift 3.Since starting with Red Hat on the OpenShift project, I have written various blogs posts here on my own site but they were mainly related to Docker. They still had some relevance to OpenShift as they talked about how to construct Docker images properly so that they will work under the more stringent security requirements imposed by a multi tenant hosting service using Docker, such as OpenShift. Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-52472157946842071112016-02-18T15:45:00.001+11:002016-02-18T15:45:58.178+11:00Building a better user experience for deploying Python web applications. Yet again I missed out on a getting a talk into PyCon US. The title of my proposed talk was the same as this blog post. Since it wasn’t accepted, I thought I might instead use a blog post to give a sneak peek at some of the more recent work I have been doing on Python web application deployment, which I otherwise would have described a bit about in my talk if it had been accepted.
For those who Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com1tag:blogger.com,1999:blog-2363643920942057324.post-26132900791436713762016-01-18T09:54:00.001+11:002016-01-18T10:13:41.215+11:00Automating deployment of Lektor blog sites.Towards the end of last year, Armin Ronacher formally announced a new project of his called Lektor. Armin is one of those developers who when he creates some new piece of software, or publishes a blog post, you should alway pay attention. His knowledge and attention to detail is something everyone should aspire to. So ever since he announced Lektor I have been aiming to put aside some time to Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-9176873004118539622016-01-14T21:46:00.001+11:002016-01-14T21:47:25.865+11:00Python virtual environments and Docker.When creating a Docker base image for running Python applications, you have various choices for how you can get Python installed. You can install whatever Python version is supplied by your operating system. You can use Python packages from separate repositories such as the Software Collections (SCL) repository for CentOS, or the dead snakes repository for Debian. Alternatively, you could installGraham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com11tag:blogger.com,1999:blog-2363643920942057324.post-59055502831876463222016-01-04T15:04:00.001+11:002016-01-04T15:05:08.050+11:00Roundup of Docker issues when hosting IPython.Over the last two weeks I have posted a total of six blog posts in a series about what I encountered when attempting to run IPython on Docker. Getting it to run wasn’t straight forward because I wanted to run it in a hosting service which doesn’t permit you to run your application as ‘root' inside of the container.
The reason for not being able to run the application as ‘root’ was because Docker Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-30842689538235031862015-12-29T12:44:00.001+11:002015-12-29T20:39:22.573+11:00Issues with running as PID 1 in a Docker container.We are getting close to the end of this initial series of posts on getting IPython to work with Docker and OpenShift. In the last post we finally got everything working in plain Docker when a random user ID was used and consequently also under OpenShift.
Although we covered various issues and had to make changes to the existing ‘Dockerfile’ used with the ‘jupyter/notebook’ image to get it all Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com0tag:blogger.com,1999:blog-2363643920942057324.post-66135533466945724032015-12-24T22:19:00.001+11:002015-12-24T22:20:57.321+11:00Unknown user when running Docker container.In the last post we covered how to setup a Docker image to cope with the prospect of a random user ID being used when the Docker container was started. The discussion so far has though only dealt with the issue of ensuring file system access permissions were set correctly to allow the original default user, as well as the random user ID being used, to update files.
A remaining issue of concern Graham Dumpletonhttp://www.blogger.com/profile/13609779138164842374noreply@blogger.com3