Giter VIP home page Giter VIP logo

horizon's Introduction

Horizon CircleCI

Visual representations of release pipelines.

Quick links

Setup

# via hokusai
hokusai dev run 'bundle exec rake db:migrate'
hokusai dev start
# or
dotenv bundle exec rails db:prepare
dotenv bundle exec rails server

# run the webpack-dev-server in a seperate terminal window for hot reloading:
./bin/webpack-dev-server

The administrative UI can then be found at http://localhost:3000/admin. Create organizations, projects, profiles, and stages from there.

Artsy developers can use the db setup script to dump our staging data to a local development environment (requires VPN):

./bin/pull_data

Alternatively, here's an example using the console:

org = Organization.create!(name: 'Acme')
website = org.projects.create!(name: 'acme.org')
heroku = org.profiles.create!(
  name: 'heroku',
  basic_username: 'heroku',
  basic_password: '<heroku_token>'
)
github_aws = org.profiles.create!(
  name: 'github/aws',
  basic_username: 'github',
  basic_password: '<github_token>',
  environment: {'AWS_ACCESS_KEY_ID' => '<aws_id>', 'AWS_SECRET_ACCESS_KEY' => '<aws_secret>'}
)
website.stages.create!(
  name: 'master',
  git_remote: 'https://github.com/acme/website.git',
  profile: github_aws
)
website.stages.create!(
  name: 'staging',
  git_remote: 'https://git.heroku.com/acme-website-staging.git',
  profile: heroku
)
website.stages.create!(
  name: 'production',
  git_remote: 'https://git.heroku.com/acme-website-production.git',
  profile: heroku
)

Once the cron has run, its snapshots are visible from the /projects page.

Design

  • Organizations have many Projects
  • Each Project has an associated list of Stages, with their order determined by Stage#position (e.g., master, staging, and production)
  • Stages must describe how to get information about their current state. This takes the form of a #git_remote (e.g., referring to Github or Heroku), optional #branch name (default: master), optional #hokusai environment (e.g., staging or production), or #tag_pattern (e.g., release-*). The releasecop gem is used internally to determine stage diffs, so see that project for more detail.
  • Stages can optionally be associated with a Profile that stores credentials for accessing git providers or AWS.
  • Snapshots capture the complete state of a project's stages at a point in time. Each Snapshot has associated Comparisons between the consecutive stages of a project (e).g., a comparison between master and staging, and a second between staging and production)
  • A cron periodically reevaluates these comparisons, creating a new snapshot if the state has changed at all.
  • A Stage (such as "production") can have a DeployStrategy for automatically triggering releases. Currently only the "github pull request" provider is implemented. When defined, a deploy strategy will automatically start a release (e.g., by opening a pull request) when a diff exceeds a certain threshold.
  • DeployBlocks indicate that a project should not be released. In addition to appearing on dashboards, any unresolved blocks will prevent new releases from being automated.

TO DO

  • Support hokusai
  • Better visual
  • Allow SSH keys to be configured for each org or project (probably like git config --local core.sshCommand "ssh -i ~/.ssh/some_key_file"...). (Maybe not necessary given github/heroku tokens in https URLs)
  • sanitize URLs with tokens/credentials in them
  • instead of including tokens in each git URL, define "profiles" associated with each organization and project
  • Experiment with programmatic git/hokusai access instead of shelling out
  • button to refresh project on-demand
  • Fix ugly AWS credentials -> hokusai flow
  • Make errors [when refreshing projects] visible and avoid short-circuiting entire cron
  • Make sorting and classifying of projects more sophisticated (penalize staleness and number of contributors and not just number of commits)
  • Add tags to projects and enable filtering dashboard/list view by them

horizon's People

Contributors

artsy-peril[bot] avatar ashkan18 avatar damassi avatar dblandin avatar dependabot[bot] avatar dleve123 avatar eessex avatar izakp avatar joeyaghion avatar mdole avatar mzikherman avatar orta avatar peril-staging[bot] avatar renovate-bot avatar zephraph avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.