• 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

This Article Has Been Shared 544 Times!

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

  • 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 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

  • What is Voice User Interface (VUI) January 31, 2023
  • Proxy Server: Design Pattern in Programming January 30, 2023
  • Cyberpunk Aesthetics: What’s in it Special January 27, 2023
  • How to Do Electrical Layout Plan for Adding Smart Switches January 26, 2023
  • What is a Data Mesh? January 25, 2023

About This Article

Cite this article as: Abhishek Ghosh, "OpenShift OctoPress Auto install Script," in The Customize Windows, February 16, 2015, February 1, 2023, https://thecustomizewindows.com/2015/02/openshift-octopress-auto-install-script/.

Source:The Customize Windows, JiMA.in

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

We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT