Update Vagrant config
This commit is contained in:
135
Vagrantfile
vendored
135
Vagrantfile
vendored
@@ -1,123 +1,110 @@
|
|||||||
|
|
||||||
$script_sqlite = <<SCRIPT
|
$debian_script = <<SCRIPT
|
||||||
apt-get update
|
apt-get update
|
||||||
apt-get install -y apache2 php5 php5-gd php5-curl php5-sqlite php5-xdebug
|
apt-get install -y apache2 php5 php5-gd php5-curl php5-sqlite php5-xdebug php5-ldap
|
||||||
apt-get clean -y
|
apt-get clean -y
|
||||||
echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
|
||||||
|
sudo sed -ri 's/AllowOverride None/AllowOverride All/g' /etc/apache2/apache2.conf
|
||||||
|
|
||||||
|
if [ -f /etc/apache2/sites-enabled/000-default ]; then
|
||||||
|
sudo sed -ri 's/AllowOverride None/AllowOverride All/g' /etc/apache2/sites-enabled/000-default
|
||||||
|
fi
|
||||||
|
|
||||||
|
sudo a2enmod rewrite
|
||||||
service apache2 restart
|
service apache2 restart
|
||||||
|
|
||||||
rm -f /var/www/html/index.html
|
rm -f /var/www/html/index.html
|
||||||
date > /etc/vagrant_provisioned_at
|
date > /etc/vagrant_provisioned_at
|
||||||
# install Composer
|
|
||||||
curl -s https://getcomposer.org/installer | php
|
wget -q https://getcomposer.org/composer.phar
|
||||||
|
chmod +x composer.phar
|
||||||
sudo mv composer.phar /usr/local/bin/composer
|
sudo mv composer.phar /usr/local/bin/composer
|
||||||
# install PHPUnit
|
|
||||||
wget https://phar.phpunit.de/phpunit.phar
|
wget -q https://phar.phpunit.de/phpunit.phar
|
||||||
chmod +x phpunit.phar
|
chmod +x phpunit.phar
|
||||||
sudo mv phpunit.phar /usr/local/bin/phpunit
|
sudo mv phpunit.phar /usr/local/bin/phpunit
|
||||||
phpunit --version
|
|
||||||
# Set kanboard dir as working dir
|
|
||||||
echo "cd /var/www/html" >> /home/vagrant/.bashrc
|
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
$script_mysql = <<SCRIPT
|
$centos_script = <<SCRIPT
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
sudo yum update -y
|
||||||
apt-get update
|
sudo yum install -y httpd php php-cli php-gd php-ldap php-mbstring php-mysql php-pdo php-pgsql php-xml wget
|
||||||
apt-get install -y apache2 php5 php5-gd php5-curl php5-mysql php5-xdebug mysql-server mysql-client
|
|
||||||
apt-get clean -y
|
sudo sed -ri 's/AllowOverride None/AllowOverride All/g' /etc/httpd/conf/httpd.conf
|
||||||
echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
|
||||||
service apache2 restart
|
if [ -x /usr/bin/systemctl ]; then
|
||||||
service mysql restart
|
sudo systemctl restart httpd
|
||||||
echo "create database kanboard;" | mysql -u root
|
sudo systemctl enable httpd
|
||||||
rm -f /var/www/html/index.html
|
sudo chcon -R -t httpd_sys_content_rw_t /var/www/html/data
|
||||||
date > /etc/vagrant_provisioned_at
|
sudo setsebool -P httpd_can_network_connect=1
|
||||||
# install Composer
|
else
|
||||||
curl -s https://getcomposer.org/installer | php
|
sudo service httpd restart
|
||||||
sudo mv composer.phar /usr/local/bin/composer
|
sudo chkconfig httpd on
|
||||||
# install PHPUnit
|
fi
|
||||||
wget https://phar.phpunit.de/phpunit.phar
|
|
||||||
chmod +x phpunit.phar
|
|
||||||
sudo mv phpunit.phar /usr/local/bin/phpunit
|
|
||||||
phpunit --version
|
|
||||||
# Set kanboard dir as working dir
|
|
||||||
echo "cd /var/www/html" >> /home/vagrant/.bashrc
|
|
||||||
SCRIPT
|
|
||||||
|
|
||||||
$script_postgres = <<SCRIPT
|
|
||||||
export DEBIAN_FRONTEND=noninteractive
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y apache2 php5 php5-gd php5-curl php5-pgsql php5-xdebug postgresql postgresql-contrib
|
|
||||||
apt-get clean -y
|
|
||||||
echo "ServerName localhost" >> /etc/apache2/apache2.conf
|
|
||||||
service apache2 restart
|
|
||||||
service postgresql restart
|
|
||||||
rm -f /var/www/html/index.html
|
rm -f /var/www/html/index.html
|
||||||
date > /etc/vagrant_provisioned_at
|
date > /etc/vagrant_provisioned_at
|
||||||
# install Composer
|
|
||||||
curl -s https://getcomposer.org/installer | php
|
wget -q https://getcomposer.org/composer.phar
|
||||||
|
chmod +x composer.phar
|
||||||
sudo mv composer.phar /usr/local/bin/composer
|
sudo mv composer.phar /usr/local/bin/composer
|
||||||
# install PHPUnit
|
|
||||||
wget https://phar.phpunit.de/phpunit.phar
|
wget -q https://phar.phpunit.de/phpunit.phar
|
||||||
chmod +x phpunit.phar
|
chmod +x phpunit.phar
|
||||||
sudo mv phpunit.phar /usr/local/bin/phpunit
|
sudo mv phpunit.phar /usr/local/bin/phpunit
|
||||||
phpunit --version
|
|
||||||
# Set kanboard dir as working dir
|
|
||||||
echo "cd /var/www/html" >> /home/vagrant/.bashrc
|
|
||||||
SCRIPT
|
SCRIPT
|
||||||
|
|
||||||
Vagrant.configure("2") do |config|
|
Vagrant.configure("2") do |config|
|
||||||
|
|
||||||
config.vm.define "sqlite" do |m|
|
config.vm.define "ubuntu" do |m|
|
||||||
m.vm.box = "ubuntu/trusty64"
|
m.vm.box = "ubuntu/trusty64"
|
||||||
m.vm.provision "shell", inline: $script_sqlite
|
m.vm.provision "shell", inline: $debian_script
|
||||||
m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.define "mysql" do |m|
|
|
||||||
m.vm.box = "ubuntu/trusty64"
|
|
||||||
m.vm.provision "shell", inline: $script_mysql
|
|
||||||
m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
|
|
||||||
end
|
|
||||||
|
|
||||||
config.vm.define "postgres" do |m|
|
|
||||||
m.vm.box = "ubuntu/trusty64"
|
|
||||||
m.vm.provision "shell", inline: $script_postgres
|
|
||||||
m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
|
m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
|
||||||
|
m.vm.network :forwarded_port, guest: 80, host: 8001
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "debian8" do |m|
|
config.vm.define "debian8" do |m|
|
||||||
m.vm.box = "debian/jessie64"
|
m.vm.box = "debian/jessie64"
|
||||||
m.vm.provision "shell", inline: $script_sqlite
|
m.vm.provision "shell", inline: $debian_script
|
||||||
m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
|
m.vm.synced_folder ".", "/var/www/html", owner: "www-data", group: "www-data"
|
||||||
|
m.vm.network :forwarded_port, guest: 80, host: 8002
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "debian7" do |m|
|
config.vm.define "debian7" do |m|
|
||||||
m.vm.box = "chef/debian-7.6"
|
m.vm.box = "debian/wheezy64"
|
||||||
m.vm.provision "shell", inline: $script_sqlite
|
m.vm.provision "shell", inline: $debian_script
|
||||||
m.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data"
|
m.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data"
|
||||||
|
m.vm.network :forwarded_port, guest: 80, host: 8003
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "debian6" do |m|
|
config.vm.define "debian6" do |m|
|
||||||
m.vm.box = "chef/debian-6.0.10"
|
m.vm.box = "bento/debian-6.0.10"
|
||||||
m.vm.provision "shell", inline: $script_sqlite
|
m.vm.provision "shell", inline: $debian_script
|
||||||
m.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data"
|
m.vm.synced_folder ".", "/var/www", owner: "www-data", group: "www-data"
|
||||||
|
m.vm.network :forwarded_port, guest: 80, host: 8004
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "centos7" do |m|
|
config.vm.define "centos7" do |m|
|
||||||
m.vm.box = "chef/centos-7.0"
|
m.vm.box = "centos/7"
|
||||||
m.vm.synced_folder ".", "/var/www/html", owner: "apache", group: "apache"
|
m.vm.provision "shell", inline: $centos_script
|
||||||
|
m.vm.synced_folder ".", "/var/www/html", owner: "apache", group: "apache", type: "rsync",
|
||||||
|
rsync__exclude: ".git/", rsync__auto: true
|
||||||
|
m.vm.network :forwarded_port, guest: 80, host: 8005
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "centos65" do |m|
|
config.vm.define "centos6" do |m|
|
||||||
m.vm.box = "chef/centos-6.5"
|
m.vm.box = "bento/centos-6.7"
|
||||||
m.vm.synced_folder ".", "/var/www/html", owner: "apache", group: "apache"
|
m.vm.provision "shell", inline: $centos_script
|
||||||
|
m.vm.synced_folder ".", "/var/www/html", owner: "apache", group: "apache", type: "rsync",
|
||||||
|
rsync__exclude: ".git/", rsync__auto: true
|
||||||
|
m.vm.network :forwarded_port, guest: 80, host: 8006
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.define "freebsd10" do |m|
|
config.vm.define "freebsd10" do |m|
|
||||||
m.vm.box = "freebsd/FreeBSD-10.2-STABLE"
|
m.vm.box = "freebsd/FreeBSD-10.2-STABLE"
|
||||||
m.vm.base_mac = "080027D14C66"
|
m.vm.base_mac = "080027D14C66"
|
||||||
m.ssh.shell = "sh"
|
m.ssh.shell = "sh"
|
||||||
|
m.vm.network :forwarded_port, guest: 80, host: 8007
|
||||||
end
|
end
|
||||||
|
|
||||||
config.vm.network :forwarded_port, guest: 80, host: 8001
|
|
||||||
#config.vm.network "public_network", :bridge => "en0: Wi-Fi (AirPort)"
|
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -5,15 +5,13 @@ Vagrant is used to test Kanboard in different environments.
|
|||||||
|
|
||||||
Several configurations are available:
|
Several configurations are available:
|
||||||
|
|
||||||
- Ubuntu 14.04 LTS with Sqlite
|
- Ubuntu 14.04 LTS
|
||||||
- Ubuntu 14.04 LTS with Mysql
|
- Debian 8
|
||||||
- Ubuntu 14.04 LTS with Postgresql
|
- Debian 7
|
||||||
- Debian 8 with sqlite
|
- Debian 6
|
||||||
- Debian 7.6 with Sqlite
|
- Centos 7
|
||||||
- Debian 6 with Sqlite
|
- Centos 6.7
|
||||||
- Centos 7 with Sqlite
|
- Freebsd 10
|
||||||
- Centos 6.5 with Sqlite
|
|
||||||
- Freebsd 10 with Sqlite
|
|
||||||
|
|
||||||
The installation process is not fully automated for all VM, manual configuration can be required.
|
The installation process is not fully automated for all VM, manual configuration can be required.
|
||||||
|
|
||||||
@@ -24,10 +22,10 @@ Standard boxes can be downloaded from Vagrant:
|
|||||||
```bash
|
```bash
|
||||||
vagrant box add ubuntu/trusty64
|
vagrant box add ubuntu/trusty64
|
||||||
vagrant box add debian/jessie64
|
vagrant box add debian/jessie64
|
||||||
vagrant box add chef/debian-7.6
|
vagrant box add debian/wheezy64
|
||||||
vagrant box add chef/debian-6.0.10
|
vagrant box add bento/debian-6.0.10
|
||||||
vagrant box add chef/centos-7.0
|
vagrant box add centos/7
|
||||||
vagrant box add chef/centos-6.5
|
vagrant box add bento/centos-6.7
|
||||||
vagrant box add freebsd/FreeBSD-10.2-STABLE
|
vagrant box add freebsd/FreeBSD-10.2-STABLE
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -39,26 +37,28 @@ If you want to test Kanboard on Ubuntu with Sqlite:
|
|||||||
vagrant up sqlite
|
vagrant up sqlite
|
||||||
```
|
```
|
||||||
|
|
||||||
Run composer:
|
The current directory is synced to the Apache document root.
|
||||||
|
|
||||||
```bash
|
Composer dependencies have to be there, so if you didn't run `composer install` on your host machine you can also do it on the guest machine.
|
||||||
vagrant ssh sqlite
|
|
||||||
cd /var/www/html # change the path according to the chosen distribution
|
|
||||||
sudo composer install
|
|
||||||
```
|
|
||||||
|
|
||||||
After the initialization, go to **http://localhost:8001/**.
|
Each box have its own TCP port:
|
||||||
|
|
||||||
If you want to use Postgresql or Mysql, you have to configure Kanboard manually (`config.php`) and configure the database inside the virtual machine.
|
- ubuntu: http://localhost:8001/
|
||||||
|
- debian8: http://localhost:8002/
|
||||||
|
- debian7: http://localhost:8003/
|
||||||
|
- debian6: http://localhost:8004/
|
||||||
|
- centos7: http://localhost:8005/
|
||||||
|
- centos6: http://localhost:8006/
|
||||||
|
- freebsd10: http://localhost:8007/
|
||||||
|
|
||||||
Available boxes are:
|
Available boxes are:
|
||||||
|
|
||||||
- `vagrant up sqlite`
|
- `vagrant up ubuntu`
|
||||||
- `vagrant up mysql`
|
|
||||||
- `vagrant up postgres`
|
|
||||||
- `vagrant up debian8`
|
- `vagrant up debian8`
|
||||||
- `vagrant up debian7`
|
- `vagrant up debian7`
|
||||||
- `vagrant up debian6`
|
- `vagrant up debian6`
|
||||||
- `vagrant up centos7`
|
- `vagrant up centos7`
|
||||||
- `vagrant up centos65`
|
- `vagrant up centos6`
|
||||||
- `vagrant up freebsd10`
|
- `vagrant up freebsd10`
|
||||||
|
|
||||||
|
Any specific configuration have to done manually (Postgres or Mysql).
|
||||||
|
|||||||
Reference in New Issue
Block a user