I need a script to setup a multi-tenant environment for hosting

Job ID: 32990236

Budget: $250 – $750 USD

I need a script (bash would be best, but open to suggestions), which would install the following on a centos 7 server:
Apache & PHP (multiple versions)
Postfix (with customizations) & ASSP (Anti-Spam Proxy)
Dovecot & Roundcube
MariaDB & PHPMyAdmin
PowerDNS
PureFTP

Apache & PHP:
I would like it to install all php versions.
Apache would need to be configured by the script to have the website's hosted in the /home/$user/public_html directory and obviously other configs must be able to even access /home/$user/$otherfolders should there be more than 1 domain.

Postfix & ASSP:
Postfix must be setup to pull domains from tables, please suggest if you can increase features to be pulled from DB. But minimum the domains, aliases and mail users must be pulled from a database.

ASSP then needs to be integrated so that all incoming mail first get's scanned by ASSP then passed to Postfix to deliver internally.
With outgoing mail assp would have to be involved too to allow outgoing mail to flow through it on it's way out.

ASSP only needs to be configured to tag spam messages (something like '[Spam]') and then I would like it to be filtered to a "Junk" folder by Postfix/dovecot by default if tagged.
And I would like the basic DB setup to be done by the script for ASSP too. Basically so it uses a database off the bat instead of me having to set it up after the fact.

The ASSP Setup Further can be done after the install

Dovecot & Roundcube:
I would like Dovecot and roundcube to be setup too. Both must be managed from a database.
I would like users for Dovecot to be stored in mysql so we can easily manage it. And I would like it to store the mails in the user's directory.
Something like /home/$user/mail/$domain/$user

MariaDB & PHPMyAdmin:
MariaDB can have it's basic setup. Which basically just secures it. The root username and password the script sets just needs to be displayed on screen (and maybe saved to a file in the script's directory).

PHPMyAdmin needs to be setup to allow for database management. And allow users to login with http://ip-addrtess/phpmyadmin, http://servername/phpmyadmin or http://domainname/phpmyadmin

PowerDNS:
Needs to have it's basic setup done. Must also work with mysql not any form of file storage.

PureFTP:
PureFTP also just needs to be setup to use a mysql database for the users and the quota etc. I don't want the params being read from files for users. All user configuration I would like in a DB

As you can see above it's a lot like some popular control panels. Like cPanel. Only thing is. I would like the script to easily provision another client's server when and if need be.
I would also like the script to be interchangeable.

Interchangeable:
By interchangeable I mean that I would like to specify what I would like to install with the script and it only proceeds to install that. So if I only want php and apache, it would ignore the rest.
If I would like all installed It would then install everything.

I don't think prompts are the best way, maybe using syntax rather like:
./installation install all (would install everything)
./installation install apache php mysql (would only install apache php and mysql)

But with this last step I am open to suggestions?
Related categories: PHP System Admin Linux Apache MySQL