• Home
  • Archive
  • Tools
  • Contact Us

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
You are here:Home » 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.

Advertisement

---

 

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.

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 Pinterest

Abhishek Ghosh

About Abhishek Ghosh

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

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

Articles Related to OpenShift OctoPress Auto install Script

  • Deploy OctoPress on OpenStack Swift (HP Cloud)

    Here is How To Deploy OctoPress on OpenStack Swift, Example Given With HP Helion Cloud With Only Python Swift Client & a Custom Shebang Script.

  • Installing Octopress on Openshift PaaS

    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.

  • Nginx WordPress Installation Guide (All Steps)

    This is a Full Nginx WordPress Installation Guide With All the Steps, Including Some Optimization and Setup Which is Compatible With WordPress DOT ORG Example Settings For Nginx.

  • Publishing an OctoPress Site on Shared Hosting

    Publishing an OctoPress Site on Shared Hosting is Not That Difficult Than it Sounds. As We Can Use Git Push on Shared Hosting, It is Easy.

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 Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

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

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are 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

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

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

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