Skip to content
This repository was archived by the owner on Nov 25, 2020. It is now read-only.

Commit d81bcf2

Browse files
committed
Merge remote-tracking branch 'origin/develop' into develop
2 parents babc8b1 + 185097c commit d81bcf2

16 files changed

+459
-0
lines changed

dist/vagrant/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
.vagrant

dist/vagrant/Vagrantfile

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
# -*- mode: ruby -*-
2+
# vi: set ft=ruby :
3+
4+
require 'yaml'
5+
config = YAML.load_file('config.yaml')
6+
machines = YAML.load_file('machines.yaml')
7+
8+
chosenMachine = machines[config['box']]
9+
chosenVersion = config['version']
10+
chosenApache = chosenMachine['apache']
11+
12+
Vagrant.configure(2) do |config|
13+
14+
config.vm.define "pydio" do |node|
15+
#----------------------------------
16+
# Default box setup
17+
# ( apache, php, etc )
18+
#----------------------------------
19+
node.ssh.shell = "bash -c 'BASH_ENV=/etc/profile exec bash'"
20+
node.ssh.forward_agent = true
21+
22+
node.vm.box = chosenMachine['machine']
23+
node.vm.network "private_network", :ip => chosenMachine['ip']
24+
25+
node.vm.provider "virtualbox" do |v|
26+
v.memory = 1024
27+
v.cpus = 2
28+
end
29+
30+
if File.directory?(chosenVersion['core']) then
31+
installPackages = false;
32+
33+
node.vm.synced_folder chosenVersion['core'], chosenApache['root'], owner: chosenApache['user'], group: chosenApache['group']
34+
else
35+
installPackages = true;
36+
37+
node.vm.synced_folder "./src/", chosenApache['root'], owner: chosenApache['user'], group: chosenApache['group']
38+
end
39+
40+
#----------------------------------
41+
# Setting up LAMP
42+
#----------------------------------
43+
node.vm.provision :shell do |shell|
44+
shell.path = File.join('provision', chosenMachine['type'], 'install-lamp.sh')
45+
shell.args = ''
46+
end
47+
48+
if installPackages then
49+
if ! (chosenVersion['core'] =~ /6.*/ && chosenVersion['enterprise'] =~ /6.*/) then
50+
#----------------------------------
51+
# Setting up GIT and NPM
52+
#----------------------------------
53+
node.vm.provision :shell do |shell|
54+
shell.path = File.join('provision', chosenMachine['type'], 'install-git.sh')
55+
shell.args = ''
56+
end
57+
end
58+
59+
#----------------------------------
60+
# Installing TMP dir
61+
#----------------------------------
62+
node.vm.provision :shell do |shell|
63+
shell.path = File.join('provision', 'setup-tmp.sh')
64+
shell.args = ''
65+
end
66+
67+
#----------------------------------
68+
# Installing CORE code
69+
#----------------------------------
70+
if defined? chosenVersion['core'] then
71+
node.vm.provision :shell do |shell|
72+
shell.path = File.join('provision', 'setup-core.sh')
73+
shell.args = [chosenVersion['core'], chosenApache['root']]
74+
end
75+
end
76+
77+
#----------------------------------
78+
# Installing ENTERPRISE code
79+
#----------------------------------
80+
if defined? chosenVersion['enterprise'] then
81+
node.vm.provision :shell do |shell|
82+
shell.path = File.join('provision', 'setup-enterprise.sh')
83+
shell.args = [chosenVersion['enterprise'], chosenApache['root']]
84+
end
85+
end
86+
end
87+
88+
89+
#----------------------------------
90+
# Installing MySQL dir
91+
#----------------------------------
92+
node.vm.provision :shell do |shell|
93+
shell.path = File.join('provision', 'setup-mysql.sh')
94+
shell.args = ''
95+
end
96+
97+
#----------------------------------
98+
# Installing APACHE dir
99+
#----------------------------------
100+
node.vm.provision :shell do |shell|
101+
shell.path = File.join('provision', 'setup-apache.sh')
102+
shell.args = [chosenApache['user'], chosenApache['group'], chosenApache['root'], chosenApache['conf']]
103+
end
104+
105+
#----------------------------------
106+
# Installing Grunt dir
107+
#----------------------------------
108+
node.vm.provision :shell do |shell|
109+
shell.path = File.join('provision', 'setup-grunt.sh')
110+
shell.args = chosenApache['root']
111+
end
112+
113+
#node.vm.provision "shell" do |s|
114+
#s.path = 'provision/populate.sh'
115+
#end
116+
end
117+
end

dist/vagrant/config.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
box: "centos6.7"
3+
version:
4+
core: "../../core/src"
5+
enterprise: ""

dist/vagrant/machines.yaml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
debian8:
3+
machine: 'oar-team/debian8'
4+
type: 'deb'
5+
ip: '192.168.6.201'
6+
apache:
7+
user: 'www-data'
8+
group: 'www-data'
9+
root: '/var/www/html'
10+
conf: '/etc/apache2/apache.conf'
11+
centos6.7:
12+
machine: 'bento/centos-6.7'
13+
type: 'centos'
14+
ip: '192.168.6.202'
15+
apache:
16+
user: 'apache'
17+
group: 'apache'
18+
root: '/var/www/html'
19+
conf: '/etc/httpd/conf/httpd.conf'
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#!/bin/bash
2+
3+
# ------------------------
4+
# Installing dependencies
5+
# ------------------------
6+
echo -ne "Installing GIT install dependencies..."
7+
sudo yum -y install git-core npm
8+
9+
if [ -f "/usr/bin/nodejs" -a ! -f "/usr/bin/node" ]; then
10+
sudo ln -sf /usr/bin/nodejs /usr/bin/node
11+
fi
12+
sudo npm install --silent -g grunt-cli
13+
echo -ne "DONE\r"
14+
15+
echo -ne "Enabling GIT access..."
16+
sudo mkdir -p /root/.ssh && sudo touch /root/.ssh/known_hosts && ssh-keyscan -H "github.com" | sudo tee -a /root/.ssh/known_hosts && sudo chmod 600 /root/.ssh/known_hosts
17+
echo -ne "DONE\r"
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
#!/bin/bash
2+
3+
# ----------------
4+
# UI variables
5+
# ----------------
6+
#debconf-set-selections <<< 'mysql-server mysql-server/root_password password password'
7+
#debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password password'
8+
9+
# ----------------
10+
# APT install
11+
# ----------------
12+
echo -ne "Adding dependencies repositories..."
13+
echo -ne "DONE\r"
14+
15+
echo -ne "Installing dependencies..."
16+
sudo yum install -y epel-release
17+
sudo yum install -y zip
18+
sudo yum install -y httpd
19+
sudo yum install -y php54
20+
21+
# If php54 is not part of the yum bank, then we add more repos
22+
if [ $? -gt 0 ]; then
23+
sudo rpm -ivh https://www.softwarecollections.org/en/scls/rhscl/php54/epel-6-x86_64/download/rhscl-php54-epel-6-x86_64.noarch.rpm
24+
sudo rpm -ivh https://www.softwarecollections.org/en/scls/remi/php54more/epel-6-x86_64/download/remi-php54more-epel-6-x86_64.noarch.rpm
25+
fi
26+
27+
sudo yum install -y php54 php54-php php54-php-common php54-php-cli php54-php-mcrypt php54-php-mysqlnd
28+
29+
sudo yum install -y mysql-server
30+
echo -ne "DONE\r"
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/bash
2+
3+
# ------------------------
4+
# Installing dependencies
5+
# ------------------------
6+
echo -ne "Installing GIT install dependencies..."
7+
sudo apt-get install -y git-core npm > /dev/null 2>&1
8+
sudo ln -sf /usr/bin/nodejs /usr/bin/node
9+
sudo npm install --silent -g grunt-cli
10+
echo -ne "DONE\r"
11+
12+
echo -ne "Enabling GIT access..."
13+
mkdir -p /root/.ssh && touch /root/.ssh/known_hosts && ssh-keyscan -H "github.com" >> /root/.ssh/known_hosts && chmod 600 /root/.ssh/known_hosts
14+
echo -ne "DONE\r"
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
#!/bin/bash
2+
3+
# ----------------
4+
# Variables
5+
# ----------------
6+
sudo locale-gen "en_US.UTF-8"
7+
debconf-set-selections <<< 'mysql-server mysql-server/root_password password password'
8+
debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password password'
9+
10+
# ----------------
11+
# APT install
12+
# ----------------
13+
echo -ne "Adding dependencies repositories..."
14+
echo "deb http://httpredir.debian.org/debian jessie main" | sudo tee -a /etc/apt/sources.list > /dev/null
15+
echo "deb-src http://httpredir.debian.org/debian jessie main" | sudo tee -a /etc/apt/sources.list > /dev/null
16+
17+
echo "deb http://httpredir.debian.org/debian jessie-updates main" | sudo tee -a /etc/apt/sources.list > /dev/null
18+
echo "deb-src http://httpredir.debian.org/debian jessie-updates main" | sudo tee -a /etc/apt/sources.list > /dev/null
19+
20+
echo "deb http://security.debian.org/ jessie/updates main" | sudo tee -a /etc/apt/sources.list > /dev/null
21+
echo "deb-src http://security.debian.org/ jessie/updates main" | sudo tee -a /etc/apt/sources.list > /dev/null
22+
23+
echo "deb http://downloads.sourceforge.net/project/ubuntuzilla/mozilla/apt all main" | sudo tee -a /etc/apt/sources.list > /dev/null
24+
echo -ne "DONE\r"
25+
26+
echo -ne "Installing dependencies..."
27+
sudo apt-get update > /dev/null 2>&1
28+
sudo apt-get install -y zip > /dev/null 2>&1
29+
sudo apt-get install -y apache2 > /dev/null 2>&1
30+
sudo apt-get install -y php5-common libapache2-mod-php5 php5-cli php5-mcrypt > /dev/null 2>&1
31+
#sudo apt-get install -y --force-yes firefox xvfb
32+
#sudo apt-get install -y libfontconfig1 libxrender1 libasound2 libdbus-glib-1-2 libxcomposite1 libgtk2.0-0
33+
sudo apt-get install -y mysql-server php5-mysql > /dev/null 2>&1
34+
echo -ne "DONE\r"
35+
36+
exit 0
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!bin/bash
2+
3+
# ----------------
4+
# TMP Dirs
5+
# ----------------
6+
echo -ne "Preparing tmp files..."
7+
shopt -s dotglob
8+
sudo rm -rf /var/www/html/* /tmp/pydio
9+
sudo mkdir -p /var/www/html /tmp/pydio
10+
sudo chmod 777 /tmp/pydio
11+
echo -ne "DONE\r"
12+
13+
pushd /tmp/pydio

dist/vagrant/provision/populate.sh

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
#!/usr/bin/env bash
2+
3+
echo -e "-------------------------"
4+
echo -e " Populate data in system"
5+
echo -e "-------------------------"
6+
7+
# ----------------
8+
# APT install
9+
# ----------------
10+
sudo apt-get update > /dev/null 2>&1
11+
sudo apt-get install -y git-core python
12+
sudo curl "https://bootstrap.pypa.io/get-pip.py" -o "get-pip.py"
13+
sudo python get-pip.py
14+
15+
# ----------------
16+
# TMP Dirs
17+
# ----------------
18+
sudo rm -rf /tmp/pydio
19+
sudo mkdir -p /tmp/pydio
20+
sudo chmod 777 /tmp/pydio
21+
cd /tmp/pydio
22+
23+
# ----------------
24+
# Git install
25+
# ----------------
26+
git clone https://github.com/pydio/pydio-integration-tests.git
27+
cd pydio-integration-tests
28+
29+
cp configs/server.sample.json configs/server.0.json
30+
cp configs/workspace.sample.json configs/workspace.0.json
31+
32+
sed -i 's/"user":[^,]*/"user":"admin"/g' configs/server.0.json
33+
sed -i 's/"password":[^,]*/"password":"password"/g' configs/server.0.json
34+
sed -i 's/"ADMIN_USER_PASS":[^,]*/"ADMIN_USER_PASS":"password"/g' configs/server.0.json
35+
sed -i 's/"ADMIN_USER_PASS2":[^,]*/"ADMIN_USER_PASS2":"password"/g' configs/server.0.json
36+
sed -i 's/DB_USER/pydio/g' configs/server.0.json
37+
sed -i 's/DB_PASS/password/g' configs/server.0.json
38+
sed -i 's/DB_HOST/localhost/g' configs/server.0.json
39+
sed -i 's/DB_NAME/pydio/g' configs/server.0.json
40+
41+
# ----------------
42+
# PIP Install
43+
# ----------------
44+
pip install six
45+
pip install pytest
46+
pip install keyring
47+
pip install selenium
48+
pip install requests
49+
50+
python main.py

0 commit comments

Comments
 (0)