[Gluster-infra] Build process for gluster-site

Eco Willson ewillson at redhat.com
Tue Aug 19 21:36:22 UTC 2014


The following are the steps to build the gluster site from scratch, push to staging and then implement in production.  Let me know if any clarity is needed, steps can be simplified and automated at some point but this is my hack and slash method for the time being.  I tested in F19, F20 and CentOS 7.  There is an issue with CentOS 6 (old version of Ruby) so the site will not build there, in that case use a VM or build directly on the staging server.

1) Get the gluster-site repo
git clone git://forge.gluster.org/gluster-site/gluster-site.git

2) Install packages required to build site
yum install ruby ruby-devel libcurl-devel gcc gcc-c++

3) Change to gluster-site directory
cd gluster-site

4) Install the ruby package bundle
gem install bundle

5) Install ruby dependencies for gluster-site
bundle install

6) Build the site
bundle exec middleman build
This will create a "build" directory.  If there is an existing build dir, it is safe to leave it in place when you run a new build.

7) Create a tarball with an UUID to make identifying specific builds easier
tar -cvzf build.`uuidgen` build

8) Copy the tarball to your home dir on staging
scp <current build>.tgz staging.gluster.org:/~

9) Log in to staging
ssh staging.gluster.org

10) backup existing /var/www/html  (not strictly required since existing archives will exist as backups)
cp -rp /var/www/html ~/<backup dir>

11) Overwrite latest build
tar -xvzf ~/<current build>.tgz && cp -r build/* /var/www/html/

12) Once you have verified changes in staging, you can push to supercolony,gluster.org
scp <current.build>.tgz supercolony.gluster.org:/~

13) Log in to supercolony server
ssh supercolony.gluster.org

14) Copy the tarball into the "build" user home dir
sudo cp ~/<current.build> /home/build

15) Switch to build user
sudo su - build

16)  current/ directory is the latest version of the site.  Make a backup of existing site
cp -rp /var/www/staging current/

17) Get current dates of build tarballs
ls -l *tgz

18) Create a directory for the previous build
mkdir archive/<YYYY>/<MM>/<DD>

19) Archive the previous build
mv <previous build>.tgz into the directory created

20) Extract the current build.  This will create a ~/build/build folder
tar -xvzf  <current build>.tgz

21) Overwrite staging directory:
sudo cp -r build/* /var/www/staging/
!!! DO NOT overwrite /var/www/html, this is still used to serve the blog and wordpress instances

22) ???

23) Profit



More information about the Gluster-infra mailing list