Select Page

Author: Darren Cato

Adding SSL to your Openshift hosted website

In order to use ssl on openshift you must at least be on the free bronze plan. This was one of my primary reasons for choosing openshift over other PAAS out there. When building a self funded mvp, every little bit counts in terms of saving money. There are a few other tutorials out there for adding ssl to openshift, but tended to get stuck on the last step. I’ll run through the process and detail the final step. I’ll also provide some links to other tutorials and stackoverflow answers in case you’re still having trouble and need a different perspective. The first step is to ssh into your openshift account and generate the csr I’m assuming you have already purchased your ssl certificates from a reputable host¬† and selected your web server. If so they will prompt you to enter your “CSR” as in the diagram. To do this first ssh into you openshift account. Once you’re in go to: cd ~/app-root/data First generate private key: openssl genrsa -des3 -out myapp.key 2048 Now create csr openssl req -new -key myapp.key -out myapp.csr Finally copy the csr encrypted content and paste to provider cat myapp.csr You may also want to scp ‘myapp.key’ to your local machine so it can be used later. The final step is to combine if all your cert files. If it is not already ready...

Read More

Export your postgress data from Heroku to Openshift

I’ve been considering moving my part-time startup application from Heroku to Openshift for some time now. Heroku is a great platform, but I could forsee the startup costs spiraling out of control long before I could start making any money from my product. I also dont feel as far removed from the infrastructure with openshift. Perhaps I’ll write another blog post about the merits of Open-shift, but for now here are the steps for migrating your Postgress data¬† which I hope may save some people some extra googleing. Step 1. Get the data from heroku $ heroku pgbackups:capture $ curl -o latest.dump `heroku pgbackups:url --app my-app-name` Step 2. Enable Openshift’s port forwarding $ rhc port-forward -a my-app-name --namespace my-domain Step 3. Export the data! $ pg_restore --host --port 0000 --username "db-username" --dbname "-db-name" --no-password -clean no-acl -no-owner --schema public --verbose "latest.dump" Like this:Like...

Read More

Book Review: Instant RSpec Test-Driven Development How-to

Title: Instant RSpec Test-Driven Development How-to Author: Charles Feduke Publisher: Packt Publishing Release Date: June 25, 2013 Format: ePub Pages: 55 Source: Safari Books Online Weighing in at only 55 pages, Instant Rspec gets the reader up to speed very quickly with the rspec domain language. There is zero waste in the book. The author does not even bother to define rspec. He starts off with a brief overview of TDD then jumps right into installing rspec. The code examples are clear and concise. The console screenshots in chapter 1 were so pretty that I was enticed into finally setting up z-shell and pimping my own console. The book prefixed each chapter with simple, intermediate or advanced to indicate the comprehension level of the content. This really helped with reading speed as I tended to gloss over the simple concepts and I prepared myself mentally for the intermediate and advanced concepts. Overall the book was well written. The chapter on mocking could use a bit more clarification but that’s nothing a bit of Googling and stack overflow can’t fix. It took me a weekend to read this book. That’s a normal weekend with a family and all the responsibilities that comes with one. This book can easily be read within an hour or two in one sitting. If you want to get started with rspec testing or need a...

Read More

The perfect home media server / client setup

For several years now I’ve been on what seems to be a never ending quest to find the perfection media center setup. As technology and the times change, so do my requirements. My latest media client is the vizio costar google tv. Its a great little device for streaming media. Access to the android market, a full chrome flash enabled browser and a $99 price tag makes it the most capable and cost effective device on the market today. I’ve had this device for some time now and I’m really enjoying it. However since i gave my httpc the boot, my 1 terabyte external usb disk has been sitting idle along with all my archived media. I set out to change all this by creating a server. I just so happened to have a fanless ssd machine laying aroud that could fullfull just such a need. My goals are to Install Ubuntu Set up file sharing – serve up media files Setup a plex server – manage and decode video files Setup ssh server – remote administration Setup vnc server – remote visual adminitration Install a good torrent applicaton – you never know Installing Ubuntu Lets start with step one. Installing an operating system. I expect this machine to run 24 hours a day and want easy remote access to it. My natural choice for an OS was something...

Read More

Including lib and vendor assets in the rails asset pipeline

The rails asset pipeline provides a simple framework to concatenate and minify or compress JavaScript and CSS files. To learn more about the rails asset pipeline I suggest viewing the railscast or reading the rails guide. However both of these resources leave out a minor detail, which took me too long to figure out. Adding //= require_tree . to the main manifest file does not recurse into the lib and vendor assets directories. There are a number of ways to solve this issue but none very elegant. The simplest way to require all assets, is to add the following...

Read More
%d bloggers like this: