Installing Octopress on Openshift PaaS can be done in two ways. We can work from CLI and or modify rake file to create OpenShift Cartridge. Jekyll OpenShift Cartridge is available, you can build your own Cartridge, we are providing all the needed knowledge for Installing Octopress on Openshift PaaS but not for Developing Octopress Openshift Cartridge. Codes mentioned here are under GNU GPL 3.0 (not the text, only the snippets). You can also read OctoPress Installation Step by Step Guide to gain knowledge-karma.
Installing Octopress on Openshift PaaS
New users should read Shell Access on OpenShift and the linked guided on that article to get started. For domain name part, you should follow the guide – Add Domain Name to OpenShift WordPress. Basics will be the same for adding domain name. Octopress is a framework designed for jekyll to produce nice looking blogs instead of docs like pages.
Login to OpenShift account and click on Add Application...
button, when the next page will load, select Ruby 1.9 from the drop down named Browse Tags
, click that Ruby 1.9 application to create an application, do not change any default settings except your application name. Click create application
button. After the process has been completed, you will get Making code changes
page and copy down the git repository url.
---
You will get something like this :
1 | git clone ssh://53c25198e0b8cd3f45000232@octopress-abhishekghosh.rhcloud.com/~/git/octopress.git/ |
Run it to clone on your local computer (it is Mac in our case, things will go same with Linux computer, BSD etc. We can not say about any paranormal, risky Malware System like windozzzz).
So, you are at $HOME
, you can run pwd
to check the path. Now change directory to the cloned one :
1 2 3 4 5 6 7 8 9 10 11 | cd octopress # clone octopress git clone git://github.com/imathis/octopress.git # so it will be under $HOME/octopress/octopress # this is my case, your username is different # do a pwd to get the path cp -r /Users/abhishekghosh/octopress/octopress/* /Users/abhishekghosh/octopress # install bundler sudo gem install bundler # do not use sudo for the next command bundle install |
Output from my bash unto this :
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 | Last login: Fri Jul 11 22:57:10 on ttys000 ? ~ git clone ssh://53c25198e0b8cd3f45000232@octopress-abhishekghosh.rhcloud.com/~/git/octopress.git/ Cloning into 'octopress'... The authenticity of host 'octopress-abhishekghosh.rhcloud.com (50.16.172.242)' can't be established. RSA key fingerprint is cf:ee:77:cb:0e:fc:02:d7:72:7e:ae:80:c0:90:88:a7. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added 'octopress-abhishekghosh.rhcloud.com,50.16.172.242' (RSA) to the list of known hosts. remote: Counting objects: 21, done. remote: Compressing objects: 100% (14/14), done. remote: Total 21 (delta 2), reused 21 (delta 2) Receiving objects: 100% (21/21), 18.47 KiB | 6.00 KiB/s, done. Resolving deltas: 100% (2/2), done. Checking connectivity... done. ? ~ cd octopress ? octopress git:(master) git clone git://github.com/imathis/octopress.git Cloning into 'octopress'... remote: Reusing existing pack: 10541, done. remote: Counting objects: 25, done. remote: Compressing objects: 100% (24/24), done. remote: Total 10566 (delta 8), reused 4 (delta 1) Receiving objects: 100% (10566/10566), 2.78 MiB | 78.00 KiB/s, done. Resolving deltas: 100% (5076/5076), done. Checking connectivity... done. ? octopress git:(master) ? pwd /Users/abhishekghosh/octopress ? octopress git:(master) ? cp -r /Users/abhishekghosh/octopress/octopress/* /Users/abhishekghosh/octopress ? octopress git:(master) ? gem install bundler Password: Fetching: bundler-1.6.3.gem (100%) Successfully installed bundler-1.6.3 Parsing documentation for bundler-1.6.3 Installing ri documentation for bundler-1.6.3 1 gem installed ? octopress git:(master) ? sudo bundle install Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine. |
It will take a huge time. You can take a coffee break. After its complete, install a theme :
1 2 3 | git clone https://github.com/bkutil/bootstrap-theme.git rake install rake generate |
Push it :
1 2 3 | git add . git commit -m 'this is a fun' git push |
Well, you can now login to open shift command line tool and remove default html file, work with ruby commands directly. That /octopress/octopress directory is not needed, you can delete it.