Feature #8733

Simple database creator

Added by James Hannah almost 5 years ago. Updated about 4 years ago.

Status:NewStart date:2015-01-21
Priority:NormalDue date:
Assignee:Steve Kemp% Done:

0%

Category:-
Target version:stretch

Description

A typical usage scenario for Symbiosis is a user creating a new site, then uploading a PHP webapp and expecting it to work.

The problem is, once they've uploaded the PHP content, they need to create a MySQL database, which can only currently be done over the command-line or PHPMyadmin.

An interesting feature would allow a user to create a "database" file in the /srv/domain.tld/config directory, containing a user and password. Symbiosis would detect the presence of this file, and if a database named after the domain didn't already exist, would create a new database, and GRANT the right permissions to it allowing local access with the username/password in the file. The user could then install say, Wordpress with only SFTP.

History

#1 Updated by Steve Kemp almost 5 years ago

  • Assignee set to Steve Kemp

#2 Updated by Patrick Cherry almost 5 years ago

Ideally nothing in Symbiosis would wait for cron to fire.

If cron is required, then please use a sane crontab named after the
package.

Similarly if any binaries/scripts are needed, then name those after the
package too.

e.g. symbiosis-mysql-configure

Ta!

#3 Updated by Steve Kemp almost 5 years ago

Yeah that's sensible enough. I'd aim to create @common/lib/symbiosis/databases.rb@ with some utilities for:

  • creating a database.
  • testing a database exists.
  • deleting a database.

Then add a simple script to look for @/srv/*/config/databases/*@ - for each one:

  • if it doesn't exist
    • the create.
  • otherwise
    • do nothing.

#4 Updated by Patrick Cherry over 4 years ago

  • Target version set to jessie

#5 Updated by Patrick Cherry about 4 years ago

  • Target version changed from jessie to stretch

Also available in: Atom PDF