hogosha/hogosha

Status Page Open Source Portal

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 1

Type:project


README

Build Status Code Quality Code Coverage SensioLabsInsight

Currently in development but ready to use.

Hogosha is a Status Page Portal opensource alternative written in Symfony2. The main idea is to bring a tool to the symfony2 ecosystem so the symfony2 community can contribute easily.

The main advantage of this project is that we tried to do something simplier so you don't have to do anything. You have an automatic mode and a manual mode based on an monitoring tool called Monitor. It can create and resolve an issue on your services or you can resolve it manually.

Features

  • Services
    • List multiple services (API, Web)
    • Group Services
  • RESTful API
    • HATEOS
    • Secure api (JWT)
  • Metrics
    • Per days
    • Per Week
    • Per Month
  • Administration
  • Subscribers
  • Emails
  • Ldap authentication (require php5-ldap extension)
  • Monitoring tool
    • Auto incident updates via Monitor

Requirements

  • PHP 5.5 or newer
  • Mcrypt extension
  • Mysql extension
  • Intl extension
  • Curl extension
  • Composer

How to use

  1. Install the project

    # dev-master
    composer create-project hogosha/hogosha path dev-master
    # stable
    composer create-project hogosha/hogosha path tag
  2. Configure your webserver nginx apache2

  3. Create your first user

    # Create your admin user
    php app/console fos:user:create admin --super-admin
  4. Create your first service on http://hogoshadomain.com/admin

Extras

Notifications

You can have hogosha notification in your slack or hipchat service. Just add those bundles and configure them to get your notification.

Slack

Slack

NB: For this library you need to require this configuration because there is an issue in the bundle for now.

"cleentfaar/slack-bundle": "^0.15.4",
"cleentfaar/slack": "0.17.1 as 0.15.3"

Configure the app_slack_channel and app_slack_user to change the default room and the default user.

Hipchat

Hipchat

Configure the app_hipchat_room and app_hipchat_user to change the default room and the default user.

NB: You can only have one of them

Ldap

The ldap authentication is provide by FR3DLdapBundle. We have pre-added information to help you configure hogosha to use ldap server.

1/ Install ldap bundle

//app/AppKernel.php
new FR3D\LdapBundle\FR3DLdapBundle(),
new FOS\UserBundle\FOSUserBundle(),
//app/config/security.yml
        chain_provider:
            chain:
                providers: [fos_userbundle, fr3d_ldapbundle]
        fr3d_ldapbundle:
            id: fr3d_ldap.security.user.provider
        fos_userbundle:
            id: fos_user.user_provider.username_email
//...
        admin:
            pattern: ^/admin
            anonymous: ~
            fr3d_ldap:  ~
//app/config/config.yml
fr3d_ldap:
    driver:
       host:     ldap
       port:     389
       username: 'cn=admin,dc=nodomain'
       password: 'admin'
       useSsl:   false
       useStartTls: false
    user:
        baseDn: ou=users,dc=nodomain
        filter: (&(ObjectClass=inetOrgPerson))
        attributes:
           - { ldap_attr: cn,  user_method: setUsername } # login field
           - { ldap_attr: mail, user_method: setEmail } # setter in BaseUser

2/ Uncomment LdapUserInterface and dd new dn Attribute

//src/AppBundle/Entity/Core/User.php

class User extends BaseUser implements LdapUserInterface
     /**
     * @ORM\Column(name="dn", type="string", length=255, nullable=true)
     */
    protected $dn;
    
    /**
     * setDn.
     * @param string $dn
     */
    public function setDn($dn)
    {
        $this->dn = $dn;
    }

    /**
     * getDn.
     * @return string
     */
    public function getDn()
    {
        return $this->dn;
    }

3/ Require the bundle

composer require "fr3d/ldap-bundle"

4/ Update doctrine schema

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

Or this command to add the sql manually if you prefer

php app/console doctrine:schema:up --dump-sql

Development

Installation

Use docker

Brew

brew install docker docker-compose docker-machine 
# Those packages are for xhyve hypervisor on mac os El Capitan 
brew install docker-machine-driver-xhyve docker-machine-nfs

Linux

install docker on linux

Create a machine

docker-machine create --driver xhyve dev # for xhyve
docker-machine create dev # for linux
docker-machine create --driver virtualbox dev # if you don't want xhyve
eval $(docker-machine env dev)

NFS for xhyve:

docker-machine-nfs dev #machine name

Run docker compose

~/var/www/hogosha$ docker-compose up -d

Connect to the app

docker-machine env dev # to find the main ip

Project

Test emails

Access the mail interface on: http://docker-machine-ip:1080

If you use mysql change the driver to

database_driver: pdo_mysql

Create schema

php app/console doc:sch:cr

Load fixture if you need to

php app/console doc:fix:load

Start the server

php app/console server:start

Run Test

bin/behat && bin/phpunit -c app/