死后追踪器
This is a PHP based web application to help manage your postmortems. It has a pluggable feature system and can pull in related information from IRC and JIRA as well as storing relevant links and graphs. This talk from DevOpsDays NYC 2013 gives an introduction and shows some of its features.
You can also join #morgue on Freenode IRC if you have questions.
In the cloned repo, use the example.json file as a template to create your own configuration file.
cp config/example.json config/development.json
NOTES: You may need to remove references to "custom_feature" from your development.json as those only exist as examples to show you how to add custom features to your Morgue installation.
Morgue relies on the Slim Framework, a dependency that can be easily managed by Composer. Directions to install composer can be found on here). Once installed, run :
php composer.phar update
This is a basic example for an Apache vhost. The MORGUE_ENVIRONMENT variable
is used to determine which config file to use (see above step).
ServerName morgue.hostname.com
DocumentRoot /var/www/morgue/htdocs
AllowOverride All
SetEnv MORGUE_ENVIRONMENT development
php_value include_path "/var/www/morgue:/var/www/morgue/features"
NOTE: If you maintain a custom Morgue features outside the document root, be
sure to include that directory in the php_value include_path directive.
Restart apache and hit the servername you defined above.
Create a database named morgue and give access to the morgue user with the morgue password defined in the config file you created at step 1
CREATE DATABASE morgue;
CREATE USER 'morgue'@'localhost' IDENTIFIED BY 'morgue';
GRANT ALL ON morgue.* TO 'morgue'@'localhost';
SET PASSWORD FOR 'morgue'@'localhost' = PASSWORD('morgue_password');
Then add the schema to the database:
…
Use make feature to generate a skeleton structure for your new feature.
% make feature NAME=my_new_feature
making new feature my_new_feature
Feature directory for my_new_feature created.
Remember to add an entry to your feature config.
% tree features/my_new_feature
features/my_new_feature
├── lib.php
├── routes.php
└── views
└── my_new_feature.php
Add it to and enable it in your config.json.
You can run the unit test suite with:
make unittests
You may have created your schemas before some features that required schema changes were added. Simply run the migration(s) commands to update your schemas:
alter table postmortems change etsystatustime statustime int(11) UNSIGNED NOT NULL;
alter table postmortems add column why_surprised text NOT NULL;
Or simply :
mysql -p -u morgue -h localhost morgue < schemas/migrations/rename_statustime_column.sql
mysql -p -u morgue -h localhost morgue < schemas/migrations/add_why_surprised_field.sql
mysql -p -u morgue -h localhost morgue < schemas/migrations/change_text_to_longtext.sql
mysql -p -u morgue -h localhost morgue < schemas/migrations/add_event_facilitators.sql
mysql -p -u morgue -h localhost morgue < schemas/migrations/add_edit_locking.sql
暂无开放 Issues,或尚未同步最近议题。