Coder Social home page Coder Social logo

zendesk / samson Goto Github PK

View Code? Open in Web Editor NEW
1.4K 423.0 234.0 355.02 MB

Web interface for deployments, with plugin architecture and kubernetes support

License: Other

JavaScript 1.51% CSS 0.01% HTML 8.63% Ruby 88.95% Shell 0.11% Dockerfile 0.04% SCSS 0.75% Procfile 0.01%
kubernetes cd continuous-delivery

samson's Introduction

Build status FOSSA Status DockerHub Status

Samson is a web interface for deployments. Live Demo It is currently in maintenance mode (bugfix, but no new features) because we are migrating off it.

View the current status of all your projects:

Allow anyone to watch deploys as they happen:

View all recent deploys across all projects:

Deployment Workflow

Create a project and 1 or more stages (staging/production etc), then selects a version and start the deploy.

Samson will:

  • clone git repository
  • execute commands associated with the stage (or execute API calls for kubernetes)
  • stream deploy output to everybody who wants to watch
  • persist deploy output for future review

Requirements

  • MySQL, Postgresql, or SQLite
  • Ruby (see .ruby-version)
  • Git (>= 1.7.2)

Documentation

Contributing

Issues and Pull Requests are always welcome, submit your idea!

License

Use of this software is subject to important terms and conditions as set forth in the LICENSE file

samson's People

Contributors

adam-hart avatar adammw avatar anthonywoo avatar ben avatar bolddane avatar craig-day avatar dasch avatar davidreuss avatar dragonfax avatar eatwithforks avatar gabetax avatar grosser avatar hashnuke avatar henders avatar irwaters avatar jonmoter avatar msufa avatar nogates avatar orien avatar pswadi-zendesk avatar ragurney avatar rdhanoa avatar rikeoka avatar sandlerr avatar sathishavm avatar sbrnunes avatar steved avatar upcomingnewton avatar uthark avatar zendesk-mattlefevre avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

samson's Issues

Better approach to managing integrations

The number of integrations with Samson could grow quite quickly, however not everyone wants them all to be visible when configuring stages.

It would be nice if super admins could have a place where they could toggle the integrations they would like for their version of Samson. This probably belongs as a new page in the admin drop down "Configuration"...

Thoughts @dasch @steved555 @tonymilne?

Deploy on locked stage, as user that locked the stage.

I lock a stage in samson to indicate ownership. Such as I'm working on a bug or testing some branch in that stage. But I often have to redeploy after fixing some issue that came up.

In order to do this on a stage I locked, I have to quickly unlock the stage, issue the deploy, then relock the stage quickly. Otherwise some other joe, or an automated system such as travis can come along and start a deploy on me. This is silly.

If a user locked a stage, he/she should be able to issue new deploys to that stage. The locked state should only stop other users from deploying that stage.

Merge alerts

app_market__zendesk__-_flowdock

Alerts like those could be merged into one place, or into one?
(maybe not into one, one place would make sense, one place but separate alerts.

Release versioning doesn't support multiple versioning schemas

Currently, every project must follow the v{number} versioning schema when tracking a branch for releases. I'm working on a PR that adds a versioning schema and 'version bump component' field to the project. This would allow us to handle most any versioning approach.

Slack notification support

Would be great to have a message sent to a Slack channel when deployments start/finish.

Advice from the Slack team is the API chat.postMessage endpoint would be best.

For this we'll need to store config for the token and channel to post to.

commenting on pull requests comments on *all* pull requests

We ran into a scenario today where we stood up a fresh Samson instance, created a new project for a github repo, checked Update Pull Request after deployment, and ran a successful deploy.

Since it was the first successful deploy of the project, it covered the PR's for the life of the github repo, and commented on every PR that was already closed.

Some way to grandfather in old PR's on an initial deploy, or whatever, would be nice to avoid this. Consequently this github user, who shall remain nameless, has earned lots of comment points, if that is a thing.

Bootstrap script errors on Ubuntu 14.04 server

Very excited to get Samson up-and-running, it looks great, nice work!

I'm running a fresh install of Ubuntu 14.04 server with Ruby 2.1.2p95:

$ script/bootstrap
Installing bundler... DONE
Bundling... DONE

Copying example files
Creating .env... DONE
Generating a Rails secret... sed: can't read : No such file or directory
FAIL

script/bootstrap: 24: exit: Illegal number: -1

Two errors:

  • It looks like sed isn't playing well with the file paths, although it did manage to replace the key into the .env file.
  • Exit code of -1 is throwing the Illegal number: -1 error, maybe we change this to 1.

Get project configuration from a ".samson.yml"

It could be great to be able to define the stages and associated commands to run from a YML files like travis and co...

deploy:

  stages:
    demo:
      command:
      permalink:
      confirm:
      e-mail:
...

Sansom will

  • clone the project
  • Get and parse the .samson.yml
  • Identify and create the different stages / commands

JobExecution failed: undefined method `create' for Tempfile:Class

Hi there,

I've found this error in my first deploy after installing samson:

Beginning git repo setup
Attempting to lock repository...
Repo locked, starting to clone...
Cloning into '/tmp/d20140814-19414-ha5ff3'...
done.
JobExecution failed: undefined method `create' for Tempfile:Class

Just in case it's a bug. Kind regards, Simon.

Pagination seems broken in deploy

Problem

When I'm on /deploys and start clicking on the numbers below or "next" to go to the next page I get this /deploy?page=3 or ?page=2 but the content on the page doesn't change

Expected behavior

Pagination to take me through the pages

Failed to load more entries.

When I navigate to http://localhost:9080/deploys/recent it says: _Failed to load more entries. When this page is navigated, an ajax call is made for _http://localhost:9080/deploys/recent.json?page=1 and it returns 500 status code.
This is the error message:

No route matches {:action=>"show", :controller=>"deploys", :format=>nil, :id=>#<Deploy id: 1, stage_id: 1, job_id: 1, reference: "v1.03", created_at: "2014-07-29 07:34:18", updated_at: "2014-07-29 07:36:52">, :project_id=>nil} missing required keys: [:project_id]

Support Github Deployments API

Use Github Deployments API to notify github of successful/failed deploy. This would trigger a deployment_status webhook event that could be consumed by Slack/Hipchat and any future company chat solutions, plus internal tooling.

I'm cool to work on this if it makes sense to project owners.

Differentiate non-PR commits

Currently "Commits" tab on deploy page shows all commits. There is no way to see if there are commits that aren't part of a PR (eg. commits directly to master). This is especially dangerous if deploying somebody else's code. How about greying-out PR commits, or use bold for non-PR commits? Thoughts?

JIRA integration

It would be good it we had a way of updating related JIRA stories from a PR with certain stages to certain actions in JIRA. For example, when a branch is deployed to production, you would move any related JIRA stories status to be "In Production" as well.

/cc @princemaple

Wrong user listed as having stopped the deploy

As an admin, if I stop a deploy started by someone else. Samson says that the original deploy stopped the deploy (on the deploy page). It doesn't say anywhere who the real user that stopped the deploy was.

Job status tool

We should have a small utility script that allows us to easily see information about running jobs, eg:

  • what jobs are running
  • for how long
  • pid

It should also allow us to kill long running or stalled jobs.

Project drop down too long

The drop down is filling up the vertical space of my monitor. I guess I shouldn't post a screenshot in this repo, so I will just point out which part I mean:

samson

We can do better than that....

Samson-specific favicon

favicon.ico is still a Zendesk logo, would be nice to have a samson logo so as to find it in tabs.

Can't stop deploys while in the setup stage

When deploying, the setup stage waits for a project lock and clones the repo.

In cases where the project doesn't have the lock, Samson will wait 10 minutes to try and obtain the lock. During this period of time, you don't seem to be able to cancel/stop the deploy as the stop method only affects the terminal executor (ie the actual deploy commands).

I also noticed that the deploy that had the lock froze in the deploying stage however that might be a different issue.

clear out active jobs when samson starts up

When samson restarts, any jobs that were running when it died are still marked as running, and act as a lock on the stage. Shouldn't we have samson set any active jobs as 'stopped' and clear out any locks when it starts up? Even if they are still running in the background it has no way to control or watch them any longer.

@dasch @steved555 @jwswj

AngularJS all the way?

Now that there are more requests for dynamic updates for pages (current deploy page, current deploy badge in header, user search, job execution, ...), and since some of the pages already use AngularJS to some extent, can we start switching over to it fully?

Advantages:

  • Making the samson rails app into an API focused backend will facilitate 3rd party scripting (QA in zendesk currently use some curl requests against samson APIs in their scripts).
  • A more consistent UI which currently consists of Rails views, AngularJS, and direct jQuery HTML changes.
  • More structured mechanism for updating content via data binding.

We don't have to do it all at once, but rather page by page, and a good starting point is the Current-Deploys page which shares 90% of the functionality of the Recent-Deploys page but one is written using Angular and the other is pure Rails.

Should not need GitHub personal access token with organization OAuth

Perhaps I'm missing something, but my understanding is that you should need either a GitHub personal access token or an organization-based OAuth (the client ID & secret). Both the README and the app itself (by way of not working properly) seem to require both.

Would it not make more sense to do either one (depending on individual vs. org), and, if its an org-level OAuth, request all the necessary permissions upon authenticating?

Samson should verify cached repo url when deploying, and remove cached copy when url updated

If you update the url of a project that has a cached copy, it does not currently update the cached copy and requires manual removal of the cached copy before deployments can proceed.

To reproduce:

  1. Create a project
  2. Deploy any version so repository is cached
  3. Change repository url to something different
  4. Deploy a sha, tag, or branch not present in the original repo

Result:
screen shot 2014-08-29 at 11 07 18 am

Help with setup

@jwswj @princemaple

Probably not the right place, but are any of the devs on here coming down to the Ruby Meetup at Inspire9 tonight? Wednesday 24th Sept.

If so would you have a spare 5 mins to run me through how to migrate a deploy from Jenkins to Samson?

Warn when Github is down

We've had a few issues that when Github goes down the users don't know if it's a Samson or Github issue. If Github doesn't return a 200, we could display a warning.

Bitbucket support

At the moment Samson relies heavily on Github. It would be great to see Bitbucket support added.

Save the deploy log while the deploy is running.

Samson waits until the deploy job is finished running before it persists the log.

If the job is killed for some reason, then the deploy log is left empty, regardless of how far the deploy had gotten.

It also makes many issues look as identical "empty-log" issues.

JobExecution failed: undefined method `owned?' for #<MutexOwned:0x00000004760eb8>

When I want to deploy, I have the following error:

Beginning git repo setup
Attempting to lock repository...
Repo locked, starting to clone...
Cloning into bare repository '/home/ymanager64/samson/cached_repos/1'...
fatal: Authentication failed
Failed to execute \ \ \ \ \ \ \ \ if\ \[\ -d\ /home/ymanager64/samson/cached_repos/1\ \]'
'\ \ \ \ \ \ \ \ \ \ then\ cd\ /home/ymanager64/samson/cached_repos/1\ \&\&\ git\ fetch\ -ap'
'\ \ \ \ \ \ \ \ else'
'\ \ \ \ \ \ \ \ \ \ git\ -c\ core.askpass\=true\ clone\ --mirror\ https://github.com/bensuch/Yoopies\ /home/ymanager64/samson/cached_repos/1'
'\ \ \ \ \ \ \ \ fi'
'
JobExecution failed: undefined method `owned?' for #<MutexOwned:0x00000004760eb8>

Thanks

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.