StratoSTACK Billing Portal
Pre-requisites
Packages:
Apache2
MySQL 5.5+
PHP-5.5.9+
Redis-server, (*1)
Other:
StratoSTACK Bill Records Generation Server
PowerDNS Server
TaxCloud Account
Authorize.Net Account, (*2)
Installation
StratoSTACK uses Composer for dependency management. See its Download Guide for installation instructions., (*3)
Ubuntu
Ubuntu 16.04 Package Dependencies, (*4)
# sudo apt install apache2 php mysql-server php-mysql php-mcrypt php-mbstring libapache2-mod-php php-bcmath php-xml
Ubuntu 14.04 Package Dependencies, (*5)
# sudo apt-get install apache2 php5 mysql-server-5.5 php5-mysql redis-server php5-mcrypt
Move to the html directory:, (*6)
# cd /var/www/html
Install StratoSTACK Billing Portal, (*7)
# composer create-project --prefer-dist 1stel/stratostack-portal portal
Add a MySQL-compatible database named cloud_billing for portal's usage, (*8)
# mysqladmin -u<your user> -p create cloud_billing
Edit configuration files, (*9)
Edit .env, adding database access configuration., (*10)
DB_HOST=localhost
DB_DATABASE=cloud_billing
DB_USERNAME=homestead
DB_PASSWORD=secret
Edit config/cloud.php. Add management server, API credentials and the Bill Records Generation API key., (*11)
Edit config/taxcloud.php, config/authorizenet.php and config/powerdns.php, entering the values for your TaxCloud, Authorize.Net accounts and PowerDNS server credentials., (*12)
Populate the database, (*13)
In /var/www/html/portal, run these commands, (*14)
# php artisan migrate: install
# php artisan migrate --seed
Update Apache Configuration, (*15)
Edit /etc/apache2/sites-enabled/000-default.conf, (*16)
Change DocumentRoot to /var/www/html/portal/public, (*17)
Add the following under DocumentRoot:, (*18)
<Directory /var/www/html>
Options FollowSymLinks
AllowOverride All
</Directory>
Enable mod_rewrite:, (*19)
# a2enmod rewrite
Restart Apache:, (*20)
# service apache2 restart
Set permissions on the Portal, (*21)
# chown www-data.www-data /var/www/html/portal -R
Add Laravel's event scheduler to cron, (*22)
Add the following to your crontab:, (*23)
* * * * * root php /var/www/html/portal/artisan schedule:run >> /dev/null 2>&1
Run the queue processor upon startup, (*24)
Add the following to /etc/rc.local:, (*25)
php /var/www/html/portal/artisan queue:listen --sleep=5 --tries=3 &
Customization
See customize.md for more information on customizing the StratoSTACK installation for your needs., (*26)