Skip to content
This repository was archived by the owner on Sep 10, 2021. It is now read-only.

Commit 1e2f0e4

Browse files
author
Jamie Snape
committed
Fedora and RedHat provisioning fixes
1 parent 6a81e18 commit 1e2f0e4

File tree

11 files changed

+68
-23
lines changed

11 files changed

+68
-23
lines changed

Vagrantfile

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# limitations under the License.
2020
#=============================================================================
2121

22-
Vagrant.configure('2') do |config|
22+
Vagrant.configure(2) do |config|
2323
if Vagrant.has_plugin?('vagrant-cachier')
2424
config.cache.auto_detect = false
2525
config.cache.enable :apt
@@ -29,6 +29,18 @@ Vagrant.configure('2') do |config|
2929
end
3030
config.vm.box = 'ubuntu/trusty64'
3131
config.vm.network 'forwarded_port', guest: 80, host: 8080, auto_correct: true
32+
config.vm.provider 'virtualbox' do |virtualbox|
33+
virtualbox.cpus = 2
34+
virtualbox.memory = 4096
35+
end
36+
config.vm.provider 'vmware_fusion' do |vmware_fusion|
37+
vmware_fusion.vmx['memsize'] = 4096
38+
vmware_fusion.vmx['numvcpus'] = 2
39+
end
40+
config.vm.provider 'vmware_workstation' do |vmware_workstation|
41+
vmware_workstation.vmx['memsize'] = 4096
42+
vmware_workstation.vmx['numvcpus'] = 2
43+
end
3244
config.vm.provision 'ansible' do |ansible|
3345
ansible.playbook = 'provisioning/ansible/site.yml'
3446
end

docs/installation/linux.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ superset of the requirements for production:
254254

255255
```bash
256256
sudo yum update
257-
sudo yum install cmake curl git httpd mariadb-server memcached nano php php-gd php-mysqlnd php-pdo php-pecl-jsonc php-pecl-memcached php-pecl-xdebug php-pgsql postgresql-server python python-jinja2 python-markdown python-pip python-watchdog PyYAML sqlite subversion
257+
sudo yum install cmake curl git httpd mariadb-server memcached nano php php-bcmath php-gd php-mysqlnd php-pdo php-pecl-jsonc php-pecl-memcached php-pecl-xdebug php-pgsql postgresql-server python python-jinja2 python-markdown python-pip python-watchdog PyYAML sqlite subversion
258258
sudo pip install mkdocs
259259
sudo mkdir -p /var/www/example.org/html
260260
sudo chown $USER:$USER /var/www/example.org/html
@@ -303,10 +303,10 @@ sudo yum install php
303303

304304
The mod_php5 Apache module is installed along with the PHP preprocessor.
305305

306-
Install the GD and JSON-C PHP extensions:
306+
Install the BC Math, GD, and JSON-C PHP extensions:
307307

308308
```bash
309-
sudo yum install php-gd php-pecl-jsonc
309+
sudo yum install php-bcmath php-gd php-pecl-jsonc
310310
```
311311

312312
!!! important
@@ -527,7 +527,7 @@ superset of the requirements for production:
527527
```bash
528528
sudo yum install epel-release
529529
sudo yum update
530-
sudo yum install cmake curl git httpd mariadb-server memcached nano php php-gd php-mysqlnd php-pdo php-pecl-memcached php-pecl-xdebug php-pgsql postgresql-server python python-jinja2 python-markdown python-pip PyYAML sqlite subversion
530+
sudo yum install cmake curl git httpd mariadb-server memcached nano php php-bcmath php-gd php-mysqlnd php-pdo php-pecl-memcached php-pecl-xdebug php-pgsql postgresql-server python python-jinja2 python-markdown python-pip PyYAML sqlite subversion
531531
sudo pip install mkdocs
532532
sudo mkdir -p /var/www/example.org/html
533533
sudo chown $USER:$USER /var/www/example.org/html
@@ -582,10 +582,10 @@ sudo yum install php
582582

583583
The mod_php5 Apache module is installed along with the PHP preprocessor.
584584

585-
Install the GD PHP extension:
585+
Install the BC Math and GD PHP extensions:
586586

587587
```bash
588-
sudo yum install php-gd
588+
sudo yum install php-bcmath php-gd
589589
```
590590

591591
The JSON PHP extension was previously installed along with the PHP

provisioning/ansible/roles/apache2/tasks/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,9 @@
3939
- sendmail
4040
when: ansible_pkg_mgr == 'yum'
4141

42+
- name: start apache2
43+
service: name={{ apache2_service }} state=started
44+
4245
- name: enable rewrite module
4346
apache2_module: name=rewrite state=present
4447
notify:

provisioning/ansible/roles/apache2/templates/etc-httpd-conf.d-vagrant.conf.j2

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,4 @@
77
ServerName localhost
88
ServerAdmin webmaster@localhost
99
DocumentRoot /var/www/vagrant
10-
ErrorLog ${APACHE_LOG_DIR}/error.log
11-
CustomLog ${APACHE_LOG_DIR}/access.log combined
1210
</VirtualHost>

provisioning/ansible/roles/common/tasks/main.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,6 @@
3636
- unzip
3737
when: ansible_pkg_mgr == 'apt'
3838

39-
- name: yum update
40-
yum: update_cache=yes
41-
when: ansible_pkg_mgr == 'yum'
42-
4339
- name: yum install epel-release
4440
yum: name=epel-release state=present
4541
when: ansible_distribution in ['CentOS', 'RedHat']

provisioning/ansible/roles/memcached/tasks/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,6 @@
3535
notify:
3636
- restart apache2
3737
when: ansible_pkg_mgr == 'yum'
38+
39+
- name: start memcached
40+
service: name=memcached state=started

provisioning/ansible/roles/mysql/tasks/main.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,17 @@
4545
- restart apache2
4646
when: ansible_pkg_mgr == 'yum'
4747

48-
- name: db
48+
- name: start mysql
49+
service: name={{ mysql_service }} state=started
50+
51+
- name: mysql db
4952
mysql_db: name={{ item }} state=present
5053
with_items:
5154
- midas
5255
- midas_test
5356

54-
- name: user
55-
mysql_user: user=vagrant password=vagrant priv={{ item }}.*:ALL state=present
57+
- name: mysql user
58+
mysql_user: user={{ ansible_env.SUDO_USER }} password={{ ansible_env.SUDO_USER }} priv={{ item }}.*:ALL state=present
5659
with_items:
5760
- midas
5861
- midas_test

provisioning/ansible/roles/php/tasks/main.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@
3535
yum: name={{ item }} state=present
3636
with_items:
3737
- php
38+
- php-bcmath
3839
- php-gd
40+
- php-pdo
3941
- php-pecl-xdebug
4042
notify:
4143
- restart apache2
@@ -62,8 +64,8 @@
6264
- name: curl getcomposer.org
6365
shell: curl https://getcomposer.org/installer | php chdir=/vagrant creates=/vagrant/composer.phar
6466

65-
- name: mv composer.phar
66-
command: mv /vagrant/composer.phar /usr/local/bin/composer creates=/usr/local/bin/composer
67+
- name: cp composer.phar
68+
command: cp /vagrant/composer.phar /usr/local/bin/composer creates=/usr/local/bin/composer
6769

6870
- name: chmod 0755 composer
6971
file: path=/usr/local/bin/composer mode=0755 state=file
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#=============================================================================
2+
# Midas Server
3+
# Copyright Kitware SAS, 26 rue Louis Guérin, 69100 Villeurbanne, France.
4+
# All rights reserved.
5+
# For more information visit http://www.kitware.com/.
6+
#
7+
# Licensed under the Apache License, Version 2.0 (the "License");
8+
# you may not use this file except in compliance with the License.
9+
# You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0.txt
12+
#
13+
# Unless required by applicable law or agreed to in writing, software
14+
# distributed under the License is distributed on an "AS IS" BASIS,
15+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
# See the License for the specific language governing permissions and
17+
# limitations under the License.
18+
#=============================================================================
19+
20+
---
21+
- name: restart postgresql
22+
service: name=postgresql state=restarted

provisioning/ansible/roles/postgresql/tasks/main.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,22 @@
3838
- restart apache2
3939
when: ansible_pkg_mgr == 'yum'
4040

41-
- name: db
41+
- name: init postgresql
42+
command: postgresql-setup initdb creates=/var/lib/pgsql/data/postgresql.conf
43+
when: ansible_os_family == 'RedHat'
44+
45+
- name: start postgresql
46+
service: name=postgresql state=started
47+
48+
- name: postgresql db
4249
postgresql_db: name={{ item }} state=present
4350
with_items:
4451
- midas
4552
- midas_test
4653
sudo_user: postgres
4754

48-
- name: user
49-
postgresql_user: db={{ item }} user=vagrant password=vagrant priv=ALL state=present
55+
- name: postgresql user
56+
postgresql_user: db={{ item }} user={{ ansible_env.SUDO_USER }} password={{ ansible_env.SUDO_USER }} priv=ALL state=present
5057
with_items:
5158
- midas
5259
- midas_test

0 commit comments

Comments
 (0)