Monitor, management and maintain a history for a centralized Ansible playbook executions.
Name | Description | Configuration |
---|---|---|
Kohana v3.4.x | The swift PHP framework | |
Mustache | Logic-less templates | |
Minion | Command-line PHP tasks | |
Backbone.js | JS framework | |
Marionette.js | Backbone.js extension | |
RequireJS | AMD modules | config.js, build.js |
PHPSpec | BDD tests | phpspec.yml |
Composer | PHP dependency manager | composer.json |
NPM | Node package manager | package.json |
Bower | Package manager | bower.json, .bowerrc |
Grunt | JS task runner | Gruntfile.js |
Git Submodules | 3rd-party repositories | .gitmodules |
Ansible | Automate IT | Playbooks |
Vagrant | Build dev environments | Vagrantfile |
VirtualBox | Virtual-machine backend | Used by Vagrant |
- Clone project:
git clone [email protected]:sortex/ansilog.git && cd ansilog
- Update git submodules:
git submodule update --init
- Install Ansible
- Install Vagrant and NFS (Ubuntu):
apt-get install vagrant nfs-kernel-server
- Create your vagrant instance:
vagrant up
- Add following line to your
/etc/hosts
:33.33.33.10 ansilog.vm
If you choose not to use Vagrant and want to manually prepare your workstation, first install the required package managers:
Then run:
npm install
composer install
bower install
grunt
Apache development vhost conf example:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName ansilog.vm
DocumentRoot /srv/http/ansilog/srv/http
RewriteEngine on
# Short-circuit for 'common' subpath
RewriteRule ^/common/(.*)$ /srv/http/ansilog/srv/assets/common/$1 [L]
# Unless file/folder exists, execute index.php
RewriteCond /srv/http/ansilog/srv/http/%{REQUEST_FILENAME} !-f
RewriteCond /srv/http/ansilog/srv/http/%{REQUEST_FILENAME} !-d
RewriteRule .* /srv/http/ansilog/srv/http/index.php [L]
# Allow any files or directories that exist to be displayed directly
RewriteRule .* /srv/http/ansilog/srv/http/$0
# Protect hidden files from being viewed
<Files .*>
Order Deny,Allow
Deny From All
</Files>
<Directory /srv/http/ansilog/>
Options -Indexes +FollowSymLinks -MultiViews
AllowOverride All
Require all granted
</Directory>
# Levels: debug, info, notice, warn, error, crit, alert, emerg
LogLevel warn
ErrorLog /var/log/httpd/ansilog_error.log
CustomLog /var/log/httpd/ansilog_access.log combined
</VirtualHost>
After an upgrade, you need to update git submodules, and compile stylesheets. As a developer, you're expected to upgrade after every pull/merge.
- Updating submodules:
git submodule update --init --recursive
- Compiling assets in development:
grunt
- Using only composer's autoloader, example
- Using CFS/
Kohana::find_file
andKohana::modules
only for static/media/views - Config: Pre-load files
- Config Reader: Ini-based with nested
groups, and does not use CFS/
Kohana::find_file
- Internal Request Client: Support namespaces
- Base Controller: Automatic DI resolver
- Content Controllers: HTML, Static media, REST
- Kohana Exception: Outputs PHP views by HTTP quality type
- Loggers: Email, File (group by year/month/day), Hipchat, Sentry
- Minion: Overwriting original classes to support PostgreSQL
- Kohana Mustache Loaders: Loader (uses CFS/
Kohana::find_file
), Alias Loader
- Compose controllers with abilities, see example
- Integrate tools, example
- Mustache.php with template inheritance, example
- Packer to build Archlinux ISO, boot/packer
- Vagrant configuration, boot/Vagrantfile
- Ansible plays for provisioning and deployment, boot/playbooks
INI files, php.ini-style with support for nested groups. Formation on loading performs a deep-merge of following files in-order:
http
, Routes formation:- Global routes, srv/http/index.php
- Application routes, app/routes.php
cli
, Minion tasks, srv/cli/index.phpassets
, srv/assets
Copyright (c) 2014-2015, Sortex All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
-
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
-
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
-
Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.