Skip to content

Commit

Permalink
Update documentation and fix vagrant manifest due to moved schema files
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Meyer committed Oct 8, 2014
1 parent abc34a5 commit 8f787e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 24 deletions.
20 changes: 4 additions & 16 deletions .vagrant-puppet/manifests/default.pp
Expand Up @@ -601,27 +601,15 @@
require => Service['postgresql']
}

exec { 'populate-icingaweb-mysql-db-accounts':
exec { 'populate-icingaweb-mysql-db-tables':
unless => 'mysql -uicingaweb -picingaweb icingaweb -e "SELECT * FROM account;" &> /dev/null',
command => 'mysql -uicingaweb -picingaweb icingaweb < /vagrant/etc/schema/accounts.mysql.sql',
command => 'mysql -uicingaweb -picingaweb icingaweb < /vagrant/etc/schema/mysql.sql',
require => [ Exec['create-mysql-icingaweb-db'] ]
}

exec { 'populate-icingweba-pgsql-db-accounts':
exec { 'populate-icingweba-pgsql-db-tables':
unless => 'psql -U icingaweb -d icingaweb -c "SELECT * FROM account;" &> /dev/null',
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/accounts.pgsql.sql',
require => [ Exec['create-pgsql-icingaweb-db'] ]
}

exec { 'populate-icingaweb-mysql-db-preferences':
unless => 'mysql -uicingaweb -picingaweb icingaweb -e "SELECT * FROM preference;" &> /dev/null',
command => 'mysql -uicingaweb -picingaweb icingaweb < /vagrant/etc/schema/preferences.mysql.sql',
require => [ Exec['create-mysql-icingaweb-db'] ]
}

exec { 'populate-icingweba-pgsql-db-preferences':
unless => 'psql -U icingaweb -d icingaweb -c "SELECT * FROM preference;" &> /dev/null',
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/preferences.pgsql.sql',
command => 'sudo -u postgres psql -U icingaweb -d icingaweb -f /vagrant/etc/schema/pgsql.sql',
require => [ Exec['create-pgsql-icingaweb-db'] ]
}

Expand Down
6 changes: 2 additions & 4 deletions doc/installation.md
Expand Up @@ -74,8 +74,7 @@ create all database tables. You will find the installation guides for the differ
>
> RPM packages install the schema into /usr/share/doc/icingaweb-&lt;version&gt;/schema
bash$ mysql -u root -p icingaweb < etc/schema/accounts.mysql.sql
bash$ mysql -u root -p icingaweb < etc/schema/preferences.mysql.sql
bash$ mysql -u root -p icingaweb < etc/schema/mysql.sql


#### PostgreSQL
Expand Down Expand Up @@ -108,8 +107,7 @@ And restart your database ('service postgresql restart' or '/etc/init.d/postgres
>
> RPM packages install the schema into /usr/share/doc/icingaweb-&lt;version&gt;/schema
bash$ psql -U icingaweb -a -f etc/schema/accounts.pgsql.sql
bash$ psql -U icingaweb -a -f etc/schema/preferences.pgsql.sql
bash$ psql -U icingaweb -a -f etc/schema/pgsql.sql



Expand Down
6 changes: 2 additions & 4 deletions packages/rpm/README.md
Expand Up @@ -42,8 +42,7 @@ Decide whether to use MySQL or PostgreSQL.
FLUSH PRIVILEGES;
quit

mysql -u root -p icingaweb < /usr/share/doc/icingaweb2*/schema/accounts.mysql.sql
mysql -u root -p icingaweb < /usr/share/doc/icingaweb2*/schema/preferences.mysql.sql
mysql -u root -p icingaweb < /usr/share/doc/icingaweb2*/schema/mysql.sql

### PostgreSQL

Expand All @@ -62,8 +61,7 @@ in `/var/lib/pgsql/data/pg_hba.conf` and restart the PostgreSQL server.

Now install the `icingaweb` schema

bash$ psql -U icingaweb -a -f /usr/share/doc/icingaweb2*/schema/accounts.pgsql.sql
bash$ psql -U icingaweb -a -f /usr/share/doc/icingaweb2*/schema/preferences.pgsql.sql
bash$ psql -U icingaweb -a -f /usr/share/doc/icingaweb2*/schema/pgsql.sql


## Configuration
Expand Down

0 comments on commit 8f787e6

Please sign in to comment.