• Home
  • Archive
  • Tools
  • Contact Us
  • Forum

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
Home » Computer and Internet » Cloud Computing » OpenShift OctoPress Auto install Script

By Abhishek Ghosh February 16, 2015 6:27 pm Updated on February 16, 2015

OpenShift OctoPress Auto install Script

Advertisement

OpenShift OctoPress Auto install Script is an Advanced Script to Run OctoPress on Free OpenShift PaaS Practically Without Any Knowing Ruby or Git. Practically, I have not thought it will become so much easy! Running OpenShift OctoPress Auto install Script on the localhost does everything. It is more easy than installing WordPress by a newbie. If you use it once, you’ll never type commands again. I could made it more automated, that will have problem with forward and backward compatibility with the rhc client. Plus for Free Tier of RedHat OpenShift, you might not have an empty cartridge. If you uncomment the lines, it will becomes 100% automated.

 

OpenShift OctoPress Auto install Script : Prerequisite

 

OS X or any GNU/Linux or any unixoid OS. You will need an RedHat OpenShift Account with an empty cartridge. Most important is having the rhc client installed. It will not work without rhc client.

You should not have an octopress named OpenShift gear, an octopress named directory on the place you’ll run the script.

 

OpenShift OctoPress Auto install Script : Steps

 

I have the GitHub Repo of OpenShift OctoPress Auto install Script here. You can wget the shiftocto.sh script, chmod it to execute it.

Open two Terminal Windows (do not use iTerm2 on OS X, use Terminal). On one Terminal Window, run this command :

Vim
1
rhc app create octopress ruby–1.9

It will give you output like this :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
âžœ  ~  rhc app create octopress ruby–1.9
Password: ********
 
Application Options
—————————–
Domain:     abhishekghosh
Cartridges: ruby–1.9
Gear Size:  default
Scaling:    no
 
Creating application ‘octopress’ ... done
 
 
Waiting for your DNS name to be available ... done
 
Cloning into ‘octopress’...
Warning: Permanently added the RSA host key for IP address ‘54.237.153.56’ to the list of known hosts.
 
Your application ‘octopress’ is now available.
 
  URL:        http://octopress–abhishekghosh.rhcloud.com/
  SSH to:     54d7eb615973cae124000140@octopress–abhishekghosh.rhcloud.com
  Git remote: ssh://54d7eb615973cae124000140@octopress–abhishekghosh.rhcloud.com/~/git/octopress.git/
  Cloned to:  /Users/abhishekghosh/octopress

Copy only the Git remote URL. In our case, it is :

Vim
1
ssh://54d7eb615973cae124000140@octopress–abhishekghosh.rhcloud.com/~/git/octopress.git/

On the other Terminal Window run :

Vim
1
2
3
4
5
cd ~
sudo su
wget https://raw.githubusercontent.com/Abhishek–Ghosh/OpenShift–OctoPress–Auto–install–Script/master/shiftocto.sh
chmod +x shiftocto.sh
sh shiftocto.sh

It will ask :

Humm. This Script Will Install OctoPress on OpenShift. Hit Y or N

Hit the y key on keyboard. There is an instruction, it will give you :

Read the instruction? Y will proceed, N will Quit

Everything actually said on the previous steps, still read it. Hit the y key on keyboard. It will ask :

Copy Paste the git URL from the Git remote URL from OpenShift Panel for octopress App which looks like:

Vim
1
ssh://548e1873e0b8cddccf000094@octopress–username.rhcloud.com/~/git/octopress.git/

Paste the Git remote url from the other Terminal Windows (rhc client’s output). Hit the Return / Enter key after pasting it. Your work is to watch if any password prompt or yes/no prompt appears. It will prepare both the local computer and remote computer (OpenShift) ready with studded gems.

A Hello World post will be created. You’ll point your browser to the URL from the other Terminal Window, which will look like http://octopress-abhishekghosh.rhcloud.com/, you’ll see that everything is ready. I do not know what is your name, so default name is Your Name.

OpenShift OctoPress Auto install Script

Screenshot showing automated work by OpenShift OctoPress Auto install Script.

 

OpenShift OctoPress Auto install Script : Configuration and New Post

 

The structure of octopress generated from our script need looks like this :

Vim
1
2
3
4
5
6
octopress git:(master) ✗ ls
 
CHANGELOG.markdown Rakefile           config.ru          source
Gemfile            _config.yml        plugins
Gemfile.lock       _deployment        public
README.markdown    config.rb          sass

It is complicated but entire pushing the entire octopress directory to Openshift is not needed, we need to push the output only.

Advertisement

---

Editing that _config.yml will work fine and when you will post for the first time manually :

Vim
1
2
3
4
5
6
7
8
rake new_post[‘Your World’]
rake generate
rm –rf _deployment/public/*
cp –R public/* _deployment/public/
cd _deployment
git add .
git commit –am ‘Your blog post’
git push openshift master —force

It will work fine. Obviously, you’ll not do rm -rf _deployment/public/* every time. This OctoPress have a huge documentation, you will not have problem.

Vim
1
2
3
4
5
6
7
rake new_post[‘Your Another World’]
rake generate
cp –R public/* _deployment/public/
cd _deployment
git add .
git commit –am ‘Your another blog post’
git push openshift master —force

Also, the backup is remaining in your directory of localhost. You are pushing the _deployment only. The default post which we can see is :

Vim
1
./octopress/_deployment/public/blog/2015/02/09/hello–world

 

OpenShift OctoPress Auto install Script : Which Repo Has Benn Used

 

Default repo. The full script is this, the found the Gemfile somewhere in GitHub, you may need your own thing. If you look at the main steps, you’ll understand the philosophy, this the bare script, only notice, which is copied, moved etc. :

shiftocto.sh

Vim
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
#!/bin/bash –e
#
echo “Copy Paste the git URL from the Git remote URL from OpenShift Panel for octopress App which looks like:”
echo “ssh://548e1873e0b8cddccf000094@octopress-username.rhcloud.com/~/git/octopress.git/”
read key
RUBY_VERSION=1.9.3–p448
sudo rm –rf octopress
git clone git://github.com/imathis/octopress.git octopress && cd octopress
sudo gem install bundler
rbenv rehash
bundle install
rake install
cd ..
mkdir _deployment && cd _deployment
cp ../octopress/config.ru .
cp ../octopress/Gemfile .
bundle install
mkdir public/
git init .
git remote add openshift $key
git add .
git commit –am ‘initial deploy’
cd ..
mv _deployment octopress
cd octopress
git add _deployment/
rake new_post[‘Hello World’]
rake generate
rm –rf _deployment/public/*
cp –R public/* _deployment/public/
cd _deployment
git add .
git commit –am ‘New blog post’
git push openshift master —force

Your local computer will work for generating the static files. You need not to push the whole thing to change your name and details. If the main files are changed, it will become a new Press, not OctoPress.

Tagged With openshift install script , rhcloud auto pinger
Facebook Twitter Google+ Pinterest

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Orthopaedic Surgeon, Author and Blogger. You can keep touch with him on Google Plus - Abhishek Ghosh1 and on Twitter - @AbhishekCTRL.

Follow the Author of this article :

13.7K+ Followers 18.7K+ Followers 2.5K+ Followers 1.5K Followers

Here’s what we’ve got for you which might like :

Articles Related to OpenShift OctoPress Auto install Script

  • Get SSH Type Functions When Root Access is Restricted

    Get SSH Type Functions When Root Access is Restricted by Mounting your FTP location locally using SSHFS. This only can be done on some Cloud Computing Platform.

  • Cloud Computing Risk Analysis

    Cloud Computing Risk Analysis is an important administrative and marketing task. ENISA itself has a pdf guide. However, we will cover a generalized idea.

  • Private Cloud : 6 Errors in Cloud Integration

    Private Cloud integration strategy if not carried rightly can be fatal for a Company.Cost, technology, management of Private Cloud differs from brand to brand.

  • Node in Cloud Computing : What this Node Means ?

    Node in Cloud Computing is a connection point, either a redistribution point or an end point for data transmissions in general. Node in Cloud Computing is not a neologism.

  • Example of Platform as a Service in Cloud Computing : Heroku Cloud

    Example of Platform as a Service in Cloud Computing can be Heroku Cloud which is Debian based platform supporting Ruby, Java, Node.js,Scala,Clojure, Python,PHP.

Additionally, performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Google+ or Twitter to join the conversation right now!

If you want to Advertise on our Article or want Business Partnership, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

You can subscribe to our Free Once a Day, Regular Newsletter by clicking the subscribe button below.

Click To Subscribe Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website...

 

 

Popular Articles

All articles of this Website are fully Free to read. Here are some, which possibly you'll like to read! Do not hesitate to contact us for any concern.

Contact Us

Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Recent Posts

  • Arduino : IR Obstacle Detection Sensor For Dimming LED (Stop Event Facing Obstacle) April 24, 2018
  • Approaches of Deep Learning : Part 3 April 24, 2018
  • Regular IR Distance Sensor Vs Sharp IR Distance Sensor (Arduino, Pi) April 24, 2018
  • Fight Increasing Hacking Attempts on Cloud Telephony & VoIP April 23, 2018
  • Arduino IR Obstacle Sensor Buzzer With LED April 23, 2018

About This Article

Title: OpenShift OctoPress Auto install Script
February 16, 2015
Author: Abhishek Ghosh
Subjects: Cloud Computing, Computer and Internet
Is Part Of:

TheCustomizeWindows, February 16, 2015, Vol.1(01),
p.1–39075 [IoT Ready Journal]

Source:The Customize Windows
ISSN: 0019-5847 ;
E-ISSN: 0019-5847 ;
Publisher: jima.in

Cite this article as: Abhishek Ghosh, "OpenShift OctoPress Auto install Script," in The Customize Windows, February 16, 2015, April 25, 2018, https://thecustomizewindows.com/2015/02/openshift-octopress-auto-install-script/.
This website uses cookies.

Read Cookie Policy

Contents are copyright protected and reproduction demands our permission.


PC users can consult Corrine Chorney for Security.

Want to know more about us? Read Notability and Mentions & Our Setup.

web analysis

Copyright © 2018 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy