• 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 » Deploy OctoPress on OpenStack Swift (HP Cloud)

By Abhishek Ghosh March 26, 2015 12:29 am Updated on March 26, 2015

Deploy OctoPress on OpenStack Swift (HP Cloud)

Advertisement

Here is How To Deploy OctoPress on OpenStack Swift, Example Given With HP Helion Cloud With Only Python Swift Client & a Custom Shebang Script. Previously, we have shown how to deploy OctoPress on OpenShift PaaS with our custom shebang script and how to upload Static Objects on on OpenStack Swift (HP Cloud). Most funny part is that – we need no middleware like Pyrax for the whole work.

 

Deploy OctoPress on OpenStack Swift (HP Cloud) : Basic is OctoPress Not OpenStack Swift

 

The most important part of this guide to deploy OctoPress on OpenStack Swift is the philosophy – we basically need not to work hard behind OpenStack Swift, rather working on OctoPress makes the thing easier to deploy. The previous approaches by Rackspace were by not much deeper work with OctoPress.

When we are installing WordPress on Heroku versus OpenShift versus Rackspace versus HP Helion Cloud – the way needs to get modified. Minor modification of the web software gives better mileage. It is near impossible to know everything about all the backend softwares.

Advertisement

---

The trick is, essentially within the OctoPress configuration file – _config.yml. Except knowing about basics on OpenStack – like about OpenStack RC file and configuring Python Swift Client, only knowing the fact that HP Cloud CDN can host Static HTML websites – we need not much to know about OpenStack.

 

Deploy OctoPress on OpenStack Swift (HP Cloud) : How The Things Can Be Done

 

We have created a shebang script for the whole work to get fully semi-automated. You can check our GitHub repo for the script to deploy OctoPress on HP Helion Cloud’s OpenStack Swift.

You can dry run the script. First download the script and run these commands :

Vim
1
2
chmod +x shiftoctopress.sh
sh shiftoctopress.sh

Do not use iTerm2 on OS X, use Terminal. You should place this script at your $HOME directory and execute it. You need to have Python Swift Client installed and configured on your local computer. Here is the whole script :

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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/bash -e
#
 
echo "This Script Will Deploy OctoPress on OpenStack Swift Object Storage."
read -p "Hit Y or N " -n 1 -r
echo "+++++"
echo "You Should Place This Script at Your $HOME Directory and Execute it."
echo "++++++"
echo " "
echo "Is everything is fine?"
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
echo "Run this script in a separate new Terminal Window with Sudo Privilege"
echo "You can get sudo privilege by running :"
echo "sudo su"
fi
 
read -p "Read the instruction? Y will proceed, N will Quit " -n 1 -r
 
RUBY_VERSION=1.9.3-p448
 
echo "We will cd to $HOME"
echo " "
cd ~
echo "Your OctoPress on local computer is at"
pwd
echo " "
echo "We will delete any existing directory with the name octopress."
rm -r -f octopress
echo " "
echo "Supply the container name below:"
read container
echo " "
echo "Now, visit :"
echo "https://horizon.hpcloud.com/project/containers/"
echo "and make the container named $container public & enable CDN."
echo " "
echo "You should create a custom _config.yml file. We will delete the default one "
echo "and ask you a custom _config.yml file's URL, you can use Github Gist's RAW URL."
echo "A basic example is like :"
echo "https://gist.githubusercontent.com/AbhishekGhosh/d8283097c50c2b5d64a1/raw/3b6b914d88b5c7f49dded82ff71d1c696fc7bcfb/_config.yml"
echo " "
echo "copy that url and paste when we will ask you."
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 add .
git commit -am 'initial deploy'
cd ..
mv _deployment octopress
cd octopress
rm -r _config.yml
echo "Supply the full URL of the _config.yml file:"
read yml
echo " "
wget $yml
echo " "
git add _deployment/
rake install
echo "Depending on your environment, use bundle exec"
echo "Edit and save the file in source/_posts/2015-02-09-Hello-World.markdown"
echo "Proceed? Y/N"
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
rake new_post['Hello World']
echo "sudo su"
fi
rake generate
rm -rf _deployment/public/*
cp -R public/* _deployment/public/
swift upload $container *
finish=`date "+%Y-%m-%d-%H-%M-%S"`
echo "Deployment at Swift container $container completed at ${finish}"
read -p "OK. This Script Will Quit. That is Desired. Hit Y or N " -n 1 -r
echo
if [[ $REPLY =~ ^[Yy]$ ]]
then
exit
fi

For readability purpose, we have made the above one shorter than the real script. When you will execute the script, it will look like this :

Deploy OctoPress on OpenStack Swift (HP Cloud)

Quite obviously, the Container needs to be Public and CDN enabled. The script is quite complex, it is not that easy to combine so many works together.

 

_config.yml Matters the Most

 

Here is custom sample gist of the _config.yml file. A running live example of OctoPress is here.

There are OctoPress specific issues which needs to be fixed (which we are not interested to fix). You’ll notice that, the hyperlinks are not working, like Blog Archives link will not work. This is nothing because the links should be like :

Main : /_deployment/public/index.html

Archive : /_deployment/public/blog/archives/index.html

Blog Post : /_deployment/public/blog/2015/03/26/hello-world/index.html

Feed : /_deployment/public/atom.xml

These are permalink related stuffs and expect the noobs, they are not quite difficult to fix. If you set those -Meta content headers, you can omit the index.html part.

 

Why the _deployment Directory?

 

If you follow Rackspace Pyrax way, it will give the way to directory browsing :

http://ha5b38a50fda888a7851b261ba7835f0a.cdn.hpcloudsvc.com

But browsing _deployment directory is not possible :

/_deployment/

try to access :

/_deployment/public/

you can only access :

/_deployment/public/index.html

and other static files.

So, if you only upload the _deployment directory and set container sync, versioning; it becomes a safer setup. Now, after a bit working and pointing a naked domain or subdomain towards it, it will be quite safer. At the same time, the localhost setup is git based. If you simply add remote, you can change from OpenStack Swift to normal server or PaaS. Wider easy compatibility. The work might be more with OctoPress, but this approach is the proper approach.

This Article Has Been Shared 639 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 Deploy OctoPress on OpenStack Swift (HP Cloud)

  • Cloud Computing 3D Rendering And Scope In Film Industry

    Cloud Computing 3D Rendering Has Definite Scope in Film Industry which might alarm the Stars of tomorrow and relieve the Producers investing in the Films.

  • SaaS : Everything You Wanted To Know

    SaaS or Software as a Service is designed by the architecture to be used by the consumer. SaaS is the model oCloud which the general users mostly know to exist.

  • Cloud Computing Grown as There Was Real Demand From The Customers

    Cloud Computing grown as there was a clear cut demand from the consumer. Most users who cares for quality, actually went mad with the traditional web hosts. The crap graphics of cPanel, increasing bill for Virtual Private Server and Dedicated server, “your problem you will solve” type of mentality, usage of worst possible hardwares, all […]

  • Cloud Database : Migrating From Relational Database Model to NoSQL

    Cloud Database is more and being in use now than before. The question of migrating from relational database model to NoSQL Database is becoming more important.

  • Mobile Phone Camera Photography : Get The Best Result

    Mobile Phone Camera Photography is becoming an important matter to seriously consider for Digital Photography. We always take a Mobile Phone with us.

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, "Deploy OctoPress on OpenStack Swift (HP Cloud)," in The Customize Windows, March 26, 2015, February 1, 2023, https://thecustomizewindows.com/2015/03/deploy-octopress-on-openstack-swift-hp-cloud/.

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