1
0
mirror of https://github.com/krislamo/vagrant-easyredmine synced 2024-11-13 23:50:34 +00:00

improvements, progess on provisioning

This commit is contained in:
Mark Heiges 2015-11-18 18:02:49 -05:00
parent 883bc82f40
commit 6bda14a125
11 changed files with 104 additions and 10 deletions

View File

@ -1,3 +1,46 @@
# EasyRedmine
This is a Vagrant project to host a development copy of EuPathDB's
EasyRedmine
It is primarily focused on being a playground for migrating from our
vanilla Redmine 2.3.
Once provisioned, Redmine should be available at http://redmine.vm.apidb.org/
## Requirements
- `scratch/redmine_dump.sql.gz` - a mysql dump of our production
database. _(One of the daily backups on our production Redmine server
is suitable. See `/var/lib/mysql.backups/daily/redmine/`.)_
- `scratch/easyredmine_package_u2072_d201511101601.zip` - the
installation package provided by EasyRedmine (downloaded from their
customer portal).
- Vagrant `landrush` plugin
- When working with a database imported from our production Redmine, you
will need a VPN tunnel to UGA's campus so LDAP authentication queries
can complete. A stock EasyRedmine installation does local
authentication, so no VPN is needed in such case.
## Provisioning
Start the virtual machine with `vagrant up`.
Vagrant provisions the VM using Ansible. See
`roles/easyredmine/vars/main.yml` for configuration options. Especially,
- `do_redmine_db_import`: if `True`, will import sample data from a
mysql dump file
- `do_redmine_installer`: if `True`, will run the redmine installer if
`redmine_root_dir` does not exist or if there is a detected change in
the database (e.g. you drop it and let Ansible recreate it).
## Configuration
Most configuration is in `roles/easyredmine/vars/main.yml`
## EasyRedmine Package ## EasyRedmine Package

7
bin/runansible Executable file
View File

@ -0,0 +1,7 @@
#/bin/sh
ansible-playbook \
-i .vagrant/provisioners/ansible/inventory/vagrant_ansible_inventory \
--private-key=.vagrant/machines/default/virtualbox/private_key \
-u vagrant \
playbook.yml "$@"

View File

@ -5,3 +5,8 @@
service: name=nginx service: name=nginx
state=restarted state=restarted
sudo: yes sudo: yes
- name: restart firewalld
service: name=firewalld
state=restarted
sudo: yes

View File

@ -1,4 +1,5 @@
- yum: name='{{ item }}' - name: install mysql, mariadb packages
yum: name='{{ item }}'
sudo: yes sudo: yes
with_items: with_items:
- mysql-devel - mysql-devel

View File

@ -0,0 +1,16 @@
- service: name=firewalld
state=started
sudo: yes
- firewalld: service=https
permanent=true
state=enabled
sudo: yes
notify: restart firewalld
- firewalld: service=http
permanent=true
state=enabled
sudo: yes
notify: restart firewalld

View File

@ -1,7 +1,11 @@
--- ---
- include: firewall.yml
- include: database.yml - include: database.yml
- include: redmine.yml - include: redmine.yml
- include: nginx.yml - include: nginx.yml
- include: system.yml

View File

@ -14,7 +14,8 @@
- yum: name=epel-release - yum: name=epel-release
sudo: yes sudo: yes
- yum: name='{{ item }}' - name: install nginx, passenger
yum: name='{{ item }}'
sudo: yes sudo: yes
with_items: with_items:
- nginx - nginx

View File

@ -1,4 +1,5 @@
- yum: name='{{ item }}' - name: install redmine package depdendencies
yum: name='{{ item }}'
sudo: yes sudo: yes
with_items: with_items:
- unzip - unzip
@ -10,7 +11,9 @@
- ImageMagick-devel - ImageMagick-devel
- expect # for install_wrapper - expect # for install_wrapper
- gem: name='{{ item }}' - name: install bundler, redmine-installer gems
gem: name='{{ item }}'
user_install=no
sudo: yes sudo: yes
with_items: with_items:
- bundler - bundler
@ -48,5 +51,7 @@
- name: run redmine installer - name: run redmine installer
command: '{{ _redmine_install_wrapper }}' command: '{{ _redmine_install_wrapper }}'
when: mk_redmine_root_dir|changed when: mk_redmine_root_dir|changed and do_redmine_installer == True
sudo: no sudo: no
environment:
PATH: "{{ ansible_env.PATH }}:~/bin"

View File

@ -0,0 +1,10 @@
- name: install system tools
yum: name='{{ item }}'
sudo: yes
with_items:
- rsync
- strace
- nmap

View File

@ -5,7 +5,8 @@
set timeout -1 set timeout -1
spawn ~/bin/redmine install /vagrant/scratch/easyredmine_package_u2072_d201511101601.zip # spawn ~/bin/redmine install /vagrant/scratch/easyredmine_package_u2072_d201511101601.zip
spawn /usr/local/bin/redmine install /vagrant/scratch/easyredmine_package_u2072_d201511101601.zip
expect -re {[\r\n]+Path for redmine_root} expect -re {[\r\n]+Path for redmine_root}
send "{{ redmine_root_dir }}\r" send "{{ redmine_root_dir }}\r"

View File

@ -1,10 +1,11 @@
--- ---
# vars file for easyredmine # vars file for easyredmine
do_redmine_db_import: False do_redmine_db_import: True
do_redmine_installer: False
cache_dir: /vagrant/scratch cache_dir: /vagrant/scratch
installer_package_name: easyredmine_package_u2072_d201511101601.zip installer_package_name: deplugged-redmine.sql.gz
installer_package_path: '{{ cache_dir }}/{{ installer_package_name }}' installer_package_path: '{{ cache_dir }}/{{ installer_package_name }}'
installer_package_url: 'http://software.apidb.org/source/{{ installer_package_name }}' installer_package_url: 'http://software.apidb.org/source/{{ installer_package_name }}'
@ -29,4 +30,4 @@ sendmail_args: -i -t
_redmine_db_import_file: /tmp/redmine_dump.sql _redmine_db_import_file: /tmp/redmine_dump.sql
_redmine_db_import_success: /tmp/redmine_db_import_success _redmine_db_import_success: /tmp/redmine_db_import_success
_redmine_install_wrapper: /home/vagrant/bin/install_wrapper _redmine_install_wrapper: /home/vagrant/install_wrapper