Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simple database creator #46

Open
patch0 opened this issue Jun 13, 2017 · 2 comments
Open

Simple database creator #46

patch0 opened this issue Jun 13, 2017 · 2 comments

Comments

@patch0
Copy link
Contributor

@patch0 patch0 commented Jun 13, 2017

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.

Originally reported on Bytemark's Gitlab by @jiphex on 2016-08-10T11:39:18.395Z

@patch0
Copy link
Contributor Author

@patch0 patch0 commented Jun 13, 2017

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.

Originally posted by @skx on 2015-01-21T16:05:56.000Z

@patch0
Copy link
Contributor Author

@patch0 patch0 commented Jun 13, 2017

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!

Originally posted by @patch0 on 2015-01-21T16:02:39.000Z

@patch0 patch0 added this to the buster+ milestone Jul 20, 2017
@patch0 patch0 added this to the buster+ milestone Jul 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant