Skip to content

Commit

Permalink
mereged from stable
Browse files Browse the repository at this point in the history
  • Loading branch information
ksripathi committed Jan 9, 2016
1 parent 817d345 commit 229df13
Show file tree
Hide file tree
Showing 84 changed files with 15,719 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.org
@@ -0,0 +1,14 @@

* Post Installation steps

1. Set http_proxy, https_proxy and no_proxy in /etc/profile .
#+BEGIN_EXAMPLE
export http_proxy="http://proxy.iiit.ac.in:8080"
#+END_EXAMPLE
2. Set http_proxy, https_proxy and no_proxy in /etc/environment
2. Change the APP_URL in file /var/www/src/config.py appropriately.
#+BEGIN_EXAMPLE
# APP_URL
APP_URL = "http://10.2.57.1"
#+END_EXAMPLE

69 changes: 69 additions & 0 deletions makefile
@@ -0,0 +1,69 @@
#SHELL := /bin/bash
BUILD_DEST=build

CODE_DEST="${BUILD_DEST}/code"
VER_BRANCH=build-release
VER_FILE=VERSION

LITERATE_TOOLS="https://github.com/vlead/literate-tools.git"
LITERATE_DIR=literate-tools
ELISP_DIR=elisp
ORG_DIR=org-templates
STYLE_DIR=style
CODE_DIR=build/code
PWD=$(shell pwd)
LINT_FILE=${PWD}/${CODE_DIR}/lint_output
EXIT_FILE=${PWD}/exit.txt
STATUS=0

all: build-with-lint

clean-literate:
rm -rf ${ELISP_DIR}
rm -rf ${ORG_DIR}
rm -rf ${STYLE_DIR}
rm -rf src/${ORG_DIR}
rm -rf src/${STYLE_DIR}

pull-literate-tools:
@echo "pulling literate support code"
echo ${PWD}
ifeq ($(wildcard elisp),)
@echo "proxy is..."
echo $$http_proxy
git clone ${LITERATE_TOOLS}
mv ${LITERATE_DIR}/${ELISP_DIR} .
mv ${LITERATE_DIR}/${ORG_DIR} .
mv ${LITERATE_DIR}/${STYLE_DIR} .
ln -s ${PWD}/${ORG_DIR}/ ${PWD}/src/${ORG_DIR}
ln -s ${PWD}/${STYLE_DIR}/ ${PWD}/src/${STYLE_DIR}
rm -rf ${LITERATE_DIR}
else
@echo "Literate support code already present"
endif

init: pull-literate-tools
rm -rf ${BUILD_DEST}
mkdir -p ${BUILD_DEST} ${CODE_DEST}

build: init write-version
emacs --script elisp/publish.el
rm -f ${BUILD_DEST}/docs/*.html~
cp -R src/static/ ${BUILD_DEST}/code/src/
cp -R src/templates/ ${BUILD_DEST}/code/src/

# get the latest commit hash and its subject line
# and write that to the VERSION file
write-version:
echo -n "Built from commit: " > ${CODE_DEST}/${VER_FILE}
echo `git rev-parse HEAD` >> ${CODE_DEST}/${VER_FILE}
echo `git log --pretty=format:'%s' -n 1` >> ${CODE_DEST}/${VER_FILE}

lint:
pep8 --ignore=E302 ${PWD}/${CODE_DIR} > ${LINT_FILE};

build-with-lint: build lint

clean: clean-literate
rm -rf ${BUILD_DEST}

23 changes: 23 additions & 0 deletions release-notes.org
@@ -0,0 +1,23 @@
#+Title: Release Notes Sample
#+Author: VLEAD Outreach Team
#+Email: engg@vlabs.ac.in
#+DATE: [2015-12-22 Thurs]
#+SETUPFILE: ./org-templates/level-0.org
#+LANGUAGE: en
#+OPTIONS: ^:nil

* Commit id of the Source
Commit id : 60574e6cdef6e75f7e8f676f520f19da54f704c6
* Version Number of the Lab
Version of the lab to be released : v2.0

* New Features Added
* Resolved Defects
- S1 : 14,36,37,38,43,49,55.
- S2 : 3,4 to 40, 55,58,65,61,57,56,53.
- S3 : 6 and 10
* Environment Settings
- OS : Windows 7, Linux
- Browsers : Firefox, Chrome


45 changes: 45 additions & 0 deletions scripts/backup
@@ -0,0 +1,45 @@
#!/bin/bash

# Absolute path to the scripts directory
SCRIPTS_DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
DOC_FOLDER=$(cd ../src/static/uploads)
DB_NAME="outreach"
DB_PASS=$(cat ../build/code/db_pass.txt)

OUT_FILE_NAME="outreachbackup"
VERSION="v0.2.0"
OUT_FILE="$OUT_FILE_NAME-$VERSION.tar"

# stop the services before taking the dump
$SCRIPTS_DIR && ./stop

# take the dump
mysqldump -u root -p$DB_PASS $DB_NAME > $DB_NAME.sql
if [ $? -ne 0 ]; then
echo "Error: Something went wrong while taking db dump."
echo "Aborting backup."
exit 1;
fi

# start back the services
$SCRIPTS_DIR && ./start

# tar the $DB_NAME.sql file
tar cfvz $OUT_FILE $DB_NAME.sql
if [ $? -ne 0 ]; then
echo "Error: Something went wrong while tar-ing the sql dump."
echo "Aborting backup."
exit 1;
fi

# tar the Documents folder
tar cvpzf $DOC_FOLDER
if [ $? -ne 0 ]; then
echo "Error: Something went wrong while tar-ing the static folderdump."
echo "Aborting backup."
exit 1;
fi

echo "Backup successful."
exit 0;

21 changes: 21 additions & 0 deletions scripts/install_emacs24.sh
@@ -0,0 +1,21 @@
#!/bin/bash

if [[ `id -u` -ne 0 ]]; then
echo "You have to execute this script as super user!"
exit 1;
fi

apt-get update
apt-get install -y build-essential libncurses-dev git
apt-get build-dep emacs24
wget http://ftp.gnu.org/gnu/emacs/emacs-24.4.tar.gz
tar -xzvf emacs-24.4.tar.gz
rm emacs-24.4.tar.gz
cd emacs-24.4
./configure
make
make install
mkdir -p ~/emacs/lisp
cd emacs/lisp
wget http://orgmode.org/org-8.2.10.tar.gz
tar zxvf org-8.2.10.tar.gz
148 changes: 148 additions & 0 deletions scripts/labspec.json
@@ -0,0 +1,148 @@
{
"lab": {
"description": {
"name": "Outreach Portal",
"id": "data",
"status": "Work in Progress",
"discipline": [],
"type": "",
"server-side": true,
"integration_level": 6,
"developer": [
{
"name": "Madhavi Puliraju",
"title": "",
"role": "Software Engineer",
"organization": "VLEAD",
"institute": "IIIT Hyderabad",
"web": "",
"department": "Software Engg Research Lab (SERL)",
"contact": {
"email": "madhavi@vlabs.ac.in",
"alternate_email": "",
"mobile_number": "",
"office_number": ""
}
},
{
"name": "Ambika Kaul",
"title": "",
"role": "Software Engineer",
"organization": "VLEAD",
"institute": "IIIT Hyderabad",
"web": "",
"department": "Software Engg Research Lab (SERL)",
"contact": {
"email": "ambika@vlabs.ac.in",
"alternate_email": "",
"mobile_number": "",
"office_number": ""
}
},
{
"name": "Thirumal Ravula",
"title": "",
"role": "Software Engineer",
"organization": "VLEAD",
"institute": "IIIT Hyderabad",
"web": "",
"department": "Software Engg Research Lab (SERL)",
"contact": {
"email": "travula@vlabs.ac.in",
"alternate_email": "",
"mobile_number": "",
"office_number": ""
}
},
{
"name": "Sripathi",
"title": "",
"role": "Software Engineer",
"organization": "VLEAD",
"institute": "IIIT Hyderabad",
"web": "",
"department": "Software Engg Research Lab (SERL)",
"contact": {
"email": "sripathi@vlabs.ac.in",
"alternate_email": "",
"mobile_number": "",
"office_number": ""
}
},
{
"name": "Dinesh",
"title": "",
"role": "Software Engineer",
"organization": "VLEAD",
"institute": "IIIT Hyderabad",
"web": "",
"department": "Software Engg Research Lab (SERL)",
"contact": {
"email": "dinesh@vlabs.ac.in",
"alternate_email": "",
"mobile_number": "",
"office_number": ""
}
}
]
},
"build_requirements": {
"platform": {
"os": "ubuntu",
"osVersion": "12",
"arch": "x64",
"service_pack": "",
"installer": [
],
"build_steps": {
"configure": [],
"pre_build": [],
"build": [
"cd ../;make build"
],
"post_build": [
"cp -R ../build/code/* /var/www/",
"chmod -R 777 /var/www"
],
"status": []
}
}
},
"runtime_requirements": {
"platform": {
"os": "ubuntu",
"osVersion": "12",
"arch": "x64",
"servicepack": "",
"hosting": "dedicated",
"memory": {
"max_required": "4gb",
"min_required": "2gb"
},
"storage": {
"min_required": "10gb"
},
"installer": [
"bash /var/www/setup.sh",
"python /var/www/setup.py install",
"bash /var/www/configure.sh",
"python /var/www/db_setup.py"
],
"lab_actions": {
"init" : [],
"shutdown": [],
"pause" : [],
"resume" : [],
"start" : ["./start"],
"stop" : ["./stop"],
"backup" : ["./backup"],
"restore" : ["./restore"],
"clean" : [],
"stats" : [],
"publish" : []
}
}
}
},
"template": "1.0"
}
1 change: 1 addition & 0 deletions scripts/restore
@@ -0,0 +1 @@
# No restore of data required for this release.
4 changes: 4 additions & 0 deletions scripts/start
@@ -0,0 +1,4 @@
#!/bin/bash

service mysql start
service apache2 start
4 changes: 4 additions & 0 deletions scripts/stop
@@ -0,0 +1,4 @@
#!/bin/bash

service apache2 stop
service mysql stop

0 comments on commit 229df13

Please sign in to comment.