Core domain entities and shared resources for Hal UI and Agent.

3.0.0-alpha1 2017-02-02 16:28 UTC


CircleCI Latest Version Latest Stable Version GitHub License GitHub Language GitHub Activity

Hal Core Components

Core domain entities and shared resources for Hal UI and Agent.

  • Hal Doctrine Entities
  • Phinx Database Migrations
  • Crypto for Encrypted Properties

The ORM used by Hal is Doctrine and migrations are handled with Phinx.


Doctrine Protips

  • Do not cache one-to-many relations!

Handling migrations

Configuration for the migration tool is stored in phinx.yml. This project contains phinx.yml.dist with default settings for dev only. Make sure to copy this file to phinx.yml and add additional settings for managing other environments.

The included script bin/phinx will run Phinx and also an env file phinx.secrets. Phinx will automatically replace environment variables prepended with PHINX_.

See the following for an example, which stores production database password in phinx.secrets:


#!/usr/bin/env sh

export PHINX_PROD_PASSWORD='my-secret-password'


# include other config from phinx.yml.dist here

        adapter: 'pgsql'
        host: 'prod_database_server'
        name: 'prod_database_name'
        user: 'prod_database_username'
        pass: '%%PHINX_PROD_PASSWORD%%'
        port: 5432
        charset: 'utf8'

Check out the official Phinx documentation for handling configuration: docs.phinx.org

Set up Postgres DB for development

  • cp phinx.yml.dist phinx.yml
  • createdb hal
  • createuser hal --superuser
  • bin/phinx migrate

Hal Domain Model


  • Application

    An application in the system. Contains information about source code location.

  • Organization

    Applications are owned by Organizations.

  • Encrypted Property

    Value stored in Hal's encrypted configuration dictionary.


  • AuditEvent

    Denormalized event for record-keeping.

  • System Setting

    Configuration value used by the Hal platform. For Hal internal system use only.


  • Build

    Build job. Builds are run with a commit for a specific environment.

  • Release

    Release job. Releases are run with a build for a specific target.

  • Job Event

    Any event that occurs during a build or release. Contains parameters or data such as shell output or configuration parameters.

  • Job Meta

    Metadata published by a build or release. Information that may be searched or analyzed for further use.

  • Job Process

    An action or process that can be triggered by a job. Currently only used to auto-kickoff a release after a successful build.

Deployment Management

  • Environment

    An environment in the system.

  • Group

    Groups are collection of targets, used to control permissions or simply naturally organize them. Groups typically have a type and name such as "Group rsync for server mydevserver"

  • Target

    Configuration for a group in a environment. Applications can have many targets for a single group or environment. Example: "Target for CodeDeploy group with CodeDeploy application name test-app and S3 bucket dev-releases".

  • Credential

    Security credentials used to connect to a target such as access tokens or private keys.

User Management

  • User

    A user in the system.

  • User Permission

    User permission. Permissions can be assigned per environment, application, organization, or globally.

  • User Settings

    User specific settings such as their favorite applications.

  • User Token

    Tokens can be created by users to access the API.