2017 © Pedro PelĂĄez
 

project acspanel-standard

The server administration tool written in Symfony2

image

acs/acspanel-standard

The server administration tool written in Symfony2

  • Monday, October 3, 2016
  • by gtrias
  • Repository
  • 1 Watchers
  • 3 Stars
  • 2 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 22 Open issues
  • 14 Versions
  • 0 % Grown

The README.md

ACSPanel (ACS Control Server Panel)

Travis-ci, (*1)

Welcome to ACSPanel - The server administration tool written in Symfony2, (*2)

This document contains information on how to download, install, and start using ACSPanel., (*3)

Features:

  • Multiserver: ACSPanel can be decentralized, you can have how many servers as you wish for each service. Each server will know what has to do.
  • Role based user system: ACSPanel has 4 basic roles, superadmin, admin, reseller and final user. Each one with its different available actions based on its permissions and assigned plans.
  • Plan system: ACSPanel works with custom Plans, you can create your different Plans to manage your resources.
  • Logged actions: Each change in the database is logged in database. You can know what did anyone and also check the changes and do rollback to the entity (Comming soon...). Thanks to StofDoctrineExtensionsBundle and DoctrineExtensions
  • Admin theme, thanks to [AvanzuAdminThemeBundle][https://github.com/avanzu/AdminThemeBundle]
  • Mobile front-end (Comming soon...):
  • Wordpress farm: See PanelWordpressBundle
  • API Restful, using [FOSRestBundle][https://github.com/FriendsOfSymfony/FOSRestBundle] and [NelmioApiDocBundle][https://github.com/nelmio/NelmioApiDocBundle] for the documentation.
  • Multilanguage: Each user can select the prefered language. (Translators needed)

How it works:

ACSPanel is just a Front-end for a custom Database with all the information related with your services. All the services ask to the panel database what configuration has to load., (*4)

Services supported (At the moment): - DNS: PowerDNS - Web: Apache2, Apache2 webproxy - Database: MySQL - FTP: ProFTPd, PureFTPd, (*5)

Installing ACSPanel

When it comes to installing the ACSPanel, you have the following options., (*6)

Download from GIT repository

To install ACSPanel from git repository, you have to clone the project with the next command and execute the following commands, (*7)

cd /server_root_directory/

git clone git@github.com:AltCtrlSupr/ACSPanel-Standard.git acspanel

curl -sS https://getcomposer.org/installer | php

php composer.phar install

Install using docker

docker run -d --name acspanel -v <parameters.yml-path>:/var/www/app/config/parameters.yml -p <your-exposed-port>:80 altctrlsupr/acspanel

You can also build your own docker image:, (*8)

git clone git@github.com:AltCtrlSupr/ACSPanel-Standard.git acspanel
cd acspanel
docker build --name <user>/acspanel .

And then you can run the image using the command avobe changing the image name for the one you choose., (*9)

Permissions

To avoid permissions issues after executing console commands you should do the next, (*10)

mkdir app/cache && mkdir app/logs (TODO: check this to be created with the initial files...)
sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs

Setting up ACSPanel

You should create your own config_dev.yml, as the parameters you can take config_dev.yml.sample as example., (*11)

cp app/config/config_dev.yml.sample app/config/config_dev.yml

To install all the dependencies you have to execute composer command., (*12)

composer install

Then you are ready to create the acspanel basic schema executing the next command:, (*13)

php app/console doctrine:schema:create

You can load some basic fixtures running next command, like basic groups and admin to start using the panel:, (*14)

php app/console doctrine:fixtures:load

The basic fixtures, adds the superadmin user to let you start to work with the panel. Its default password is 1234. The acspanel will redirect you to password change screen where you should change the password., (*15)

For the AvanzuAdminThemeBundle you should download its assets running the next command:, (*16)

    php app/console avanzu:admin:fetch-vendor

You should install the assets as well:, (*17)

php app/console assets:install --symlink

Congratulations! You're now ready to use ACSPanel., (*18)

Setting up Apache2

<VirtualHost *:80>
    DocumentRoot /home/user/www/acspanel/web
    <Directory /home/user/www/acspanel/web/>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
</VirtualHost>

Ensure you have rewrite mode enabled, (*19)

Getting started with ACSPanel

Changing the panel view parameters:, (*20)

edit app/config/config.yml // Set variables from twig globals, you can change the default date format, the panel name and breadcumb separation character

Setting up third party programs

To set up roundcube to be able to change the passwords with the password plugin you must use the next query:, (*21)

$rcmail_config['password_query'] = 'UPDATE mail_mailbox mb INNER JOIN mail_domain md ON mb.mail_domain_id = md.id INNER JOIN domain d ON md.domain_id = d.id SET mb.password=%p WHERE mb.username=%l AND mb.password=%o AND d.domain=%d';

Updating the panel (DO BACKUPS FIRST!!)

Get the latest version of the code, (*22)

git pull

Install the latest version of the dependencies, (*23)

./composer.phar install

Update the database, (*24)

php app/console doctrine:schema:update --force

And install the assets, (*25)

php app/console assets:install --symlink

Setting up services to automatic apply panel settings

Apache: Copy the script tools/acspanel-srv-apache2-reboot to each Apache2 server and give execution permission to the script. Change the panel database access details and add to crontab. Create a file in /etc/cron.d/ folder with the next contents:, (*26)

* *     * * *   root    /usr/local/sbin/acspanel-srv-apache2-reboot

Change the route to your script location, (*27)

Contribute

If you want to contribute you can open Issues on this github repository. Also you can donate to the next bitcoin address:, (*28)

1yRnWxg7HxbQG9Vqzyja99phcQYnJ3prL

What's inside?

Symfony2 comes pre-configured with the following bundles:, (*29)

  • FrameworkBundle - The core Symfony framework bundle, (*30)

  • SensioFrameworkExtraBundle - Adds several enhancements, including template and routing annotation capability, (*31)

  • DoctrineBundle - Adds support for the Doctrine ORM, (*32)

  • TwigBundle - Adds support for the Twig templating engine, (*33)

  • SecurityBundle - Adds security by integrating Symfony's security component, (*34)

  • SwiftmailerBundle - Adds support for Swiftmailer, a library for sending emails, (*35)

  • MonologBundle - Adds support for Monolog, a logging library, (*36)

  • AsseticBundle - Adds support for Assetic, an asset processing library, (*37)

  • JMSSecurityExtraBundle - Allows security to be added via annotations, (*38)

  • JMSDiExtraBundle - Adds more powerful dependency injection features, (*39)

  • WebProfilerBundle (in dev/test env) - Adds profiling functionality and the web debug toolbar, (*40)

  • SensioDistributionBundle (in dev/test env) - Adds functionality for configuring and working with Symfony distributions, (*41)

  • SensioGeneratorBundle (in dev/test env) - Adds code generation capabilities, (*42)

  • AcmeDemoBundle (in dev/test env) - A demo bundle with some example code, (*43)

And ACSPanel adds the following Bundles:, (*44)

Enjoy!, (*53)

The Versions