Giter VIP home page Giter VIP logo

strider's Introduction

Strider

Dependency Status devDependency Status


Brilliant Continuous Deployment

Strider Screenshot more screenshots

NPM

Overview

Strider is an Open Source Continuous Deployment / Continuous Integration platform. It is written in Node.JS / JavaScript and uses MongoDB as a backing store. It is published under the BSD license.

For more details, including features and more, check out the introductory chapter of the Strider Book.

README Contents

## Docker Quickstart For a fully self-contained and pre-built strider installation, check out [Strider in a box](https://github.com/Strider-CD/strider/tree/master/docker), made possible by the incredible [docker](http://docker.io) project.

There's a walkthrough of setting it up on our blog.

Running on Infrastructure =========================

Make sure you have MongoDB installed on your system. You can get the latest version at http://www.mongodb.org/downloads

Next you will need Node.JS. You can get binary packages for most platforms at http://nodejs.org

Once you have Node.JS on your system, you can fetch & install all the dependencies for your Strider clone by executing the following command in the project root:

npm install
Configuring ===========

Strider configuration comes from environment variables. Most of the default values should work fine for running on localhost, however for an Internet-accessible deployment the following variables will need to be exported:

  • DB_URI : MongoDB DB URI if not localhost (you can safely use MongoLab free plan - works great)

  • SERVER_NAME : Address at which server will be accessible on the Internet. E.g. https://strider.example.com (note: no trailing slash)

  • PLUGIN_GITHUB_APP_ID, PLUGIN_GITHUB_SECRET: Github app ID & secret (assuming not running on localhost:3000) - you can register a new one at https://github.com/settings/applications/new - the Main URL should be the same as server name above, and the callback URL should be server name with the path /auth/github/callback. E.g. https://strider.example.com/auth/github/callback

  • If you want email notifications, configure an SMTP server (we recommend Mailgun for SMTP if you need a server - free account gives 200 emails / day):

    • SMTP_HOST: SMTP server hostname e.g. smtp.example.com
    • SMTP_PORT: SMTP server port e.g. 587 (default)
    • SMTP_USER: SMTP auth username e.g. "myuser"
    • SMTP_PASS: SMTP auth password e.g. "supersecret"
    • SMTP_FROM: Default FROM address e.g. "Strider [email protected]" (default)
Adding Initial Admin User =========================

Strider isn't much use without an account to login with. Once you create an administrative user, you can invite as many other people as you like to your instance. There is a simple CLI subcommand to help you create the initial user:

node bin/strider addUser

Example run:

$ node bin/strider addUser
Enter email []: [email protected]
Is admin? (y/n) [n]: y
Enter password []: *******

Email:		[email protected]
Password:	****
isAdmin:	true
OK? (y/n) [y]:
22 Oct 21:21:01 - info: Connecting to MongoDB URL: mongodb://localhost/strider-foss
22 Oct 21:21:01 - info: User added successfully! Enjoy.
Starting Strider ================

Once Strider has been installed and configured, it can be started with:

node bin/strider
Require()'ing Strider =====================

Strider can be require()-ed like any other NPM module. This is particularly useful when you want to

  • Make Strider a dependency at a specific version
  • Choose exactly which plugins to install
  • Customize configuration
  • Do other crazy stuff

For example, you could have a project with its own package.json that depends on strider at a specific version, along with any other extensions you choose loaded from a particular filesystem location. Then you could write a simple initialization shim like the following:

var strider = require('strider')

var instance = strider("/path/to/extensions/dir", config, function(err, initialized, appInstance) {
    console.log("Strider is now running")
})
Extending & Customizing Strider ===============================

Strider is extremely customizable and extensible through plugins. Plugins can add hooks to perform arbitrary actions during build. They can modify the database schema to add custom fields. They can also register their own HTTP routes. Even the front-end is highly customizable through template extensions.

For documentation on extending Strider, see strider-extension-loader's README.

Support & Help ==============

IRC: irc.freenode.net #strider

We are very responsive to Github Issues - please think of them as a message board for the project!

Strider is maintained and supported by FrozenRidge, LLC. For commercial support, customization, integration & hosting enquiries please email [email protected].

Getting Started With Strider ============================

Getting a project up and running on Strider is very easy. After you create your account, follow the prompts to link your Github account using OAuth2. Strider will then fetch the list of Github repositories for which you have admin rights. Select the initial Github repository that you would like to test (and optionally deploy) with Strider. On the next screen you can add any additional members of the team to the project.

If you would like Strider to deploy to Heroku automatically when tests pass (AKA deploy-on-green), click 'continue to deployment configuration'. You will then need to enter your Heroku API key. You can find your API key about halfway down the 'My Account' page on Heroku. Then select from an existing Heroku app or enter the name for a new app.

The final step is to modify your project so that it will work properly with Strider. This won't take long but is specific to your language and framework, so please click on the appropriate link below.

I would like to configure my project for...

Getting Started: Continuous Integration for node.js

npm install

Strider will run 'npm install' to install all of your packages as specified in package.json and npm-shrinkwrap.json (if present).

npm test / package.json

Once all of the modules are installed, Strider will run the command 'npm test' to execute your node.js automated tests. npm will look for a scripts key in packages.json that should look something like this:

"scripts": {
  "test": "node_modules/mocha/bin/mocha -R tap"
}

We are using Mocha in this example but any test framework will work as long as it can be called from the command line.

Database Connectivity

When your tests run, Strider exports a number of UNIX environment variables which you can use to connect to the test database. Strider supports setting environment variables per-project. Simply browse to the "Environment" tab on the project config page to set these:

Strider Environment Config Screenshot

MongoDB:

Specify the url with the environment variable DB_URI

Sample MongoDB Apps

If you aren't sure how to create a database connection from a database URI, have a look at one of our sample apps:

Sample PostgreSQL App

If you aren't sure how to create a database connection from a database URI, have a look at the sample app:

Sample Redis App

If you aren't sure how to create a database connection from a database URI, have a look at this sample app:

Getting Started: Continuous Deployment for node.js

Once you have finished setting up your node.js app for continuous integration with Strider, you are only a few steps away from continuous deployment to Heroku.

Procfile

Heroku requires that you have a Procfile with the command to start your web app. It should look like this:

web: node app.js

MongoLab Addon (MongoDB in Heroku)

If you would like to use the (free) MongoLab addon with your app, you will need to use the Heroku Toolbelt from your command line to add it to your project. After the Heroku app has been created (either by Strider or via the command line), run the following command:

heroku addons:add mongolab:starter --app [your_app_name]

Deploy on Green

Once you have added a Procfile and confirmed that you are using the Heroku environment variables, your app should be ready to go for continuous deployment to Heroku. By default, Strider will deploy to Heroku on green, ie if all of the tests pass.

If you would prefer to only deploy to Heroku on demand, you can turn off 'deploy on green' in the project configuration settings.

Once you turn off 'deploy on green', Strider will deploy the project to Heroku ONLY when you manually trigger a 'test and deploy' job from the Strider interface.

More Information

For more information on how to configure a node.js app to work on Heroku, see Getting Started with Node.js on Heroku/Cedar.

strider-custom.json configuration

[Strider-custom](https://github.com/Strider-CD/strider-custom) is a plugin that comes bundled with strider and allows you to specify custom prepare, test, and deploy scripts via a `strider-custom.json` file in your project, similar to a `.travis.yml` file for travis-ci.

Example:

{
  "prepare": "echo executed prepare statement!",
  "test": "echo executed deploy statement!",
  "deploy": "echo deploy && git push heroku master --force"
}

strider's People

Contributors

acreeger avatar camshaft avatar constantx avatar jaredly avatar jerryorr avatar marekventur avatar niallo avatar ortuna avatar peterbraden avatar pgte avatar viniciusgama avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  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.