From abbb89893df26e12770120b74b55b27fae72b370 Mon Sep 17 00:00:00 2001 From: James Brooks Date: Tue, 13 Jan 2015 15:23:39 +0000 Subject: [PATCH] Remove all documentation. --- docs/api/components.md | 78 --------- docs/api/incidents.md | 76 --------- docs/api/making-requests.md | 42 ----- docs/api/metrics.md | 44 ------ docs/api/readme.md | 12 -- docs/dashboard/creating-components.md | 2 - docs/dashboard/creating-incidents.md | 2 - docs/dashboard/readme.md | 1 - docs/heroku/readme.md | 3 - docs/heroku/upgrade.md | 67 -------- docs/intro/readme.md | 55 ------- docs/readme.md | 24 --- docs/setup/centos6.md | 12 -- docs/setup/install.md | 220 -------------------------- docs/setup/readme.md | 1 - 15 files changed, 639 deletions(-) delete mode 100644 docs/api/components.md delete mode 100644 docs/api/incidents.md delete mode 100644 docs/api/making-requests.md delete mode 100644 docs/api/metrics.md delete mode 100644 docs/api/readme.md delete mode 100644 docs/dashboard/creating-components.md delete mode 100644 docs/dashboard/creating-incidents.md delete mode 100644 docs/dashboard/readme.md delete mode 100644 docs/heroku/readme.md delete mode 100644 docs/heroku/upgrade.md delete mode 100644 docs/intro/readme.md delete mode 100644 docs/readme.md delete mode 100644 docs/setup/centos6.md delete mode 100644 docs/setup/install.md delete mode 100644 docs/setup/readme.md diff --git a/docs/api/components.md b/docs/api/components.md deleted file mode 100644 index 861bcda8..00000000 --- a/docs/api/components.md +++ /dev/null @@ -1,78 +0,0 @@ -# API Components - -## `/components` - -Interact with components - -Example URL: `http://status.cachethq.io/api/components` - -* `GET`: returns a list of the current components and their status - - success: 200: - - ~~~json - { - "data": [ - { - "updated_at": 1420029799, - "created_at": 1420029577, - "incident_count": 0, - "status": "Operational", - "status_id": 1, - "description": "This is an example component", - "name": "Example Component", - "id": 5 - }, - { - "updated_at": 1420037024, - "created_at": 1420037024, - "incident_count": 0, - "status": "Major Outage", - "status_id": 4, - "description": "This is a second example component", - "name": "Second Example Components", - "id": 2 - } - ] - } - ~~~ - -* `POST`: Create a component - - payload - - ~~~json - { - "name":"Example Created API", - "description":"API Created", - "status":2 - } - ~~~ - - - -## `/components/:id` - -Show a single component - -Example URL: `http://status.cachethq.io/api/components/1` - -* `GET`: Return a single component and its status - - success: 200: - - ~~~json - { - "data": [ - { - "updated_at": 1420029799, - "created_at": 1420029577, - "incident_count": 0, - "status": "Operational", - "status_id": 1, - "description": "SelfServe automation tool for project publishes, resets and Operations tasks", - "name": "SelfServe", - "id": 1 - } - ] - } - ~~~ - - diff --git a/docs/api/incidents.md b/docs/api/incidents.md deleted file mode 100644 index 5f99a18b..00000000 --- a/docs/api/incidents.md +++ /dev/null @@ -1,76 +0,0 @@ -# API Incidents - -## `/incidents` - -Interact with incidents - -Example URL: `http://status.cachethq.io/api/incidents` - -* `GET`: returns a list of the current incidents and their status - - success: 200: - - ~~~json - { - "data": [ - { - "updated_at": 1420036705, - "created_at": 1420036705, - "component": null, - "human_status": "Investigating", - "status": 1, - "message": "This is an example incident", - "name": "Example Incident", - "id": 6 - }, - { - "updated_at": 1420038898, - "created_at": 1420038898, - "component": null, - "human_status": "Fixed", - "status": 4, - "message": "This is a resolved incident", - "name": "A resolved incident", - "id": 7 - } - ] - } - ~~~ - -* `POST`: Create an incident - - payload - - ~~~json - { - "name":"Example Created Incident", - "message":"Description for an API created incident", - "status":2 - } - ~~~ - - - -## `/incidents/:id` - -Show a single incident - -Example URL: `http://status.cachethq.io/api/incident/1` - -* `GET`: Return a single incident and its status - - success: 200: - - ~~~json - { - "data": { - "updated_at": 1420038898, - "created_at": 1420038898, - "component": null, - "human_status": "Fixed", - "status": 4, - "message": "This is a resolved incident", - "name": "A resolved incident", - "id": 1 - } - } - ~~~ - - diff --git a/docs/api/making-requests.md b/docs/api/making-requests.md deleted file mode 100644 index c0e657f9..00000000 --- a/docs/api/making-requests.md +++ /dev/null @@ -1,42 +0,0 @@ -# Making requests - -The Cachet API provides access to incidents and components, allowing you to view, create and update via JSON requests. - -The API is accessible from `http:///api/` - -## Examples - -You can use curl to interact with the API. There is no authentication required for `GET` requests: - -```bash -$ curl -XGET http://status.cachethq.io/api/components -``` - -In order to create incidents, you must send the a json string with the required payload and authenticate. More information can be found in the Endpoints documentation listed below. - -Here's a simple example: - -```bash -$ curl -u username@example.com -H "Content-Type: application/json" -d '{"name":"API","description":"An example description","status":1}' http://status.cachethq.io/api/components -``` - -# Endpoints - -## `/components` -List and create components - -See [Component API documentation](components.md) for more information - -## `/incidents` -List and create and update incidents - -See [Incidents API documentation](incidents.md) for more information - -## `/metrics` -List and add metrics - -See [Incidents API documentation](metrics.md) for more information - -# Authorization - -# Security diff --git a/docs/api/metrics.md b/docs/api/metrics.md deleted file mode 100644 index 97890d37..00000000 --- a/docs/api/metrics.md +++ /dev/null @@ -1,44 +0,0 @@ -# API Metrics - -**_Work In Progress_** - -## `/metrics` - -Interact with metrics - -Example URL: `http://status.cachethq.io/api/metrics` - -* `GET`: returns a list of the current metrics - - success: 200: - - ~~~json - To be confirmed - ~~~ - -* `POST`: Create an metric - - payload - - ~~~json - To be confirmed - ~~~ - - - -## `/metrics/:id` - -Show a single metric - -Example URL: `http://status.cachethq.io/api/metrics/1` - -* `GET`: Return a single metric - - success: 200: - - ~~~json - To be confirmed - ~~~ - -## `/metrics/points` - -To be confirmed - - diff --git a/docs/api/readme.md b/docs/api/readme.md deleted file mode 100644 index 8c6fca39..00000000 --- a/docs/api/readme.md +++ /dev/null @@ -1,12 +0,0 @@ -# Cachet API - -## Making Requests - -Cachet's API is JSON based, making interaction simple. Take a look at the [Making Requests](making-requests.md) page for some simple examples - -## Endpoints - -There are endpoints for [Components](components.md), [Incidents](incidents.md) and [Metrics](metrics.md) with more to come soon. - - - diff --git a/docs/dashboard/creating-components.md b/docs/dashboard/creating-components.md deleted file mode 100644 index 47f8c057..00000000 --- a/docs/dashboard/creating-components.md +++ /dev/null @@ -1,2 +0,0 @@ -# Creating components - diff --git a/docs/dashboard/creating-incidents.md b/docs/dashboard/creating-incidents.md deleted file mode 100644 index dec84147..00000000 --- a/docs/dashboard/creating-incidents.md +++ /dev/null @@ -1,2 +0,0 @@ -# Creating incidents - diff --git a/docs/dashboard/readme.md b/docs/dashboard/readme.md deleted file mode 100644 index c451e09d..00000000 --- a/docs/dashboard/readme.md +++ /dev/null @@ -1 +0,0 @@ -# Dashboard overview diff --git a/docs/heroku/readme.md b/docs/heroku/readme.md deleted file mode 100644 index 50a64f67..00000000 --- a/docs/heroku/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# Heroku - -- [Upgrade Heroku](/docs/heroku/upgrade.md) diff --git a/docs/heroku/upgrade.md b/docs/heroku/upgrade.md deleted file mode 100644 index 9cac260c..00000000 --- a/docs/heroku/upgrade.md +++ /dev/null @@ -1,67 +0,0 @@ -# Upgrade Cachet on Heroku - -To begin, you'll need the [Heroku Toolbelt](https://toolbelt.heroku.com/) on your system. - -## Login to Heroku - -Run the following command to login to your Heroku account. You'll need to provide your email and password. - -```bash -$ heroku login -``` - -## Clone your app - -Now clone your app to somewhere on your system, for this example we'll use the desktop and `cachet` as our app name. - -```bash -$ cd ~/Desktop -$ heroku git:clone -a cachet -``` - -The toolbelt will now use Git to clone your app locally. - -## Add a new remote - -Once cloned we'll want to change into the app directory. - -```bash -$ cd cachet -``` - -We can now add a new remote - the Cachet source to the repository. - -```bash -$ git remote add origin git@github.com:cachethq/cachet.git -``` - -Now we update our app with the latest version. - -```bash -$ git fetch origin -$ git reset --hard origin/master -``` - -## Change the buildpack - -You'll only need to do this if your `BUILDPACK_URL` env var is different to `https://github.com/cachethq/cachet-buildpack`. You can check this by running: - -```bash -$ heroku config:get BUILDPACK_URL -``` - -If you're buildpack does not match the above, you need to run: - -```bash -$ heroku config:set BUILDPACK_URL=https://github.com/cachethq/cachet-buildpack -``` - -## Push the changes - -Our app will now be running the latest version of Cachet, we just need to push it back to Heroku. - -```bash -$ git push heroku -``` - -We're done! diff --git a/docs/intro/readme.md b/docs/intro/readme.md deleted file mode 100644 index 15d3c618..00000000 --- a/docs/intro/readme.md +++ /dev/null @@ -1,55 +0,0 @@ -# Introduction to Cachet - -This document is a brief breakdown of what Cachet is, why it was built and how it works. Each section is explained in more detail within other pages. - -## What is Cachet? - -Cachet is a status page used for informing your customers/employees/developers with any updates or issues affecting your service and the individual components which make it up. - -For example, if you're running an online store, you may have the following components powering it: - -- Stripe (payments) -- Storefront (website) -- CDN -- API - -If your API breaks, developers may want to know what's going on as their integrations will have broken. You can easily update the status of the component and then create a new incident explaining the issue. As you progress through to rectifying the issue you can create more incidents with a new status. Eventually you'll have fixed the issue and your service status banner will turn green. - -## Why build it? - -Originally built by [James Brooks](http://james-brooks.uk/cachet/), Cachet was a solution to a problem. Whilst there was [StatusPage.io](https://statuspage.io), it's an expensive service for the [small service](http://anorakci.com) that was being built at the time. - -Since Cachet is open source, **anybody** can run it and anybody can contribute to it. Contributions make software better and having the freedom to fork and improve upon it means it'll be forever improving. - -## How does it work? - -Cachet is built upon two core concepts: - -- [Components](#components) -- [Incidents](#incidents) - -Here we'll break down these concepts and how they work together. Cachet also uses metrics, however they're an optional feature of Cachet that can be unused without affecting anything. - -### Components - -A component is setup for each of the core, individual parts to a service or product, for instance; - -- API -- Website -- CDN -- Payments - -In the future Cachet will be able to create third-party components directly for things like: - -- GitHub -- Stripe -- Intercom -- Desk.com - -And automatically update the status based on their current service status. - -### Incidents - -Incidents are individual to components but come pre-designed to be linked against one of them, this background feature is ready for third-party components which will be coming later on. - -An incident is a status update containing a title, message and readable status. diff --git a/docs/readme.md b/docs/readme.md deleted file mode 100644 index 8000aec9..00000000 --- a/docs/readme.md +++ /dev/null @@ -1,24 +0,0 @@ -# Cachet Documentation - -Cachet is an open source alternative to StatusPage.io written in PHP 5 with the Laravel 4.2 framework. - -## Table of contents - -### Introduction - -- [Introduction to Cachet](/docs/intro/readme.md) - -### Setup - -- [Setting up Cachet](/docs/setup/readme.md) -- [Install](/docs/setup/install.md) - -### Dashboard - -- [Dashboard overview](/docs/dashboard/readme.md) -- [Creating components](/docs/dashboard/creating-components.md) -- [Creating incidents](/docs/dashboard/creating-incidents.md) - -### API - -- [Cachet API](/docs/api/readme.md) diff --git a/docs/setup/centos6.md b/docs/setup/centos6.md deleted file mode 100644 index eec45599..00000000 --- a/docs/setup/centos6.md +++ /dev/null @@ -1,12 +0,0 @@ -# Installing on CentOS 6 - -The main issue with installing Cachet on CentOS 6 is the old PHP version. Laravel and Composer expect a version of PHP of greater than or equal to 5.4, which is the default that ships with CentOS. You also need the same version of the required extensions. - -## Remi Repo - -To solve this problem, the 3rd party [http://rpms.famillecollet.com/](Remi Repo) can be used, which provides newer versions of PHP. - -NOTE: This will upgrade existing versions of PHP on your system, so if you already have a PHP 5.3 requirement, you'll need to consider using [RedHat's Software Collections](https://access.redhat.com/documentation/en-US/Red_Hat_Developer_Toolset/1/html-single/Software_Collections_Guide/) which allows you to install PHP 5.4 alongside the systems PHP 5.3. You'll need to compile some of the extensions yourself though - - - diff --git a/docs/setup/install.md b/docs/setup/install.md deleted file mode 100644 index 234423d5..00000000 --- a/docs/setup/install.md +++ /dev/null @@ -1,220 +0,0 @@ -# Installation - -Cachet is an open source replacement to [StatusPage.io](https://statuspage.io) written in PHP and the [Laravel](http://laravel.com) framework. - -You need at least PHP >= 5.4, [Composer](https://getcomposer.org/) and the following PHP extensions installed to run Cachet: - - - `php-mcrypt` - - `php-mbstring` - - `php-apc` - - `php-xml` - - `php-pdo` - - A database driver for your DB, such as `php-mysql` - - `OpenSSL` - -# Table of contents - -1. [Get a copy!](#get-a-copy) -2. [Deploy to Heroku](#deploy-to-heroku) -3. [Configuring a database!](#configuring-a-database) - 1. [Running database migrations](#running-database-migrations) - 2. [Seeding](#seeding) -4. [Running Cachet](#running-cachet) - 1. [Apache setup](#apache) - 2. [nginx setup](#nginx) -5. [Environment detection](#environment-detection) - -# Get a copy! - -> If you want to run Cachet locally or help develop then you'll want to use this method. - -The easiest way is to use Git to pull down the code. You'll need to put it into your web server directory for Apache & Nginx. - -```bash -$ cd /var/www -$ git clone https://github.com/cachethq/Cachet.git -$ cd Cachet -``` - -## Install requirements - -You need to have a modern version of node.js installed (with NPM) - see https://github.com/nodesource/distributions - -```bash -apt-get install nodejs npm -npm install -g bower -npm install -g gulp -curl -sS https://getcomposer.org/installer | php #always be careful when piping from the internet! -``` - -## Build the assets. - -```bash -$ npm install -$ bower install -$ gulp -``` - -# Configuring a database without Heroku - -Cachet relies on a database to store the components and incidents, however it needs to be configured for your [environment](https://github.com/cachethq/Cachet/blob/master/docs/setup/install.md#environment-detection). - -Our database configuration (`./app/config/database.php`) is setup to require the following environment variables: - -- `DB_DRIVER` - `sqlite`, `mysql`, `pgsql` or `sqlsrv`. -- `DB_HOST` -- `DB_DATABASE` - SQLite file within the `app/database` directory or database name. -- `DB_USERNAME` -- `DB_PASSWORD` - -Laravel uses PDO for its database driver so it should be compatible with: - -- SQLite -- MySQL -- Postgresql -- MSSQL - -No `.sqlite` file is included, so be sure to add this into your `app/database` directory. - -Laravel 4 enables you to [protect your sensitive configuration details](http://laravel.com/docs/4.2/configuration#protecting-sensitive-configuration) with the use of .env files. For your production environment, create a `.env.php` file in the root of your project, or for environment specific create the file named `.env.environment.php`. - -For example, if working locally with MySQL, your `.env.local.php` file would be: - -```php - 'mysql', - 'DB_HOST' => 'localhost', - 'DB_DATABASE' => 'cachet', - 'DB_USERNAME' => 'root', - 'DB_PASSWORD' => 'secret', -]; -``` - -> Even though SQLite doesn't require a host, username or password, these still must be set (an empty string will suffice). - -# Install dependencies - -Now we need to install of the dependencies that Cachet requires: - -```bash -$ composer install --no-dev -o -``` - -# Deploy to Heroku - -When using the **Deploy to Heroku** button you needn't worry about using a database as the install will setup a free instance of ClearDB. Once installed Heroku can direct you to the setup page where you'll configure the site/application information and create an administrator account. - -### Running database migrations - -Once we've decided on our database, we now need to run the migrations to create the tables. In our command line we need to run the migrations, from within the root directory: - -```bash -$ php artisan migrate -``` - -You should see the output of the current project migration files being migrated to your database. - -### Seeding - -If you're getting Cachet setup to develop on, then you may want to seed the database with some example data. - -```bash -$ php artisan db:seed -``` - -# Running Cachet - -## Apache - -Apache is one of the easier installations. We simply need to create a new Virtual Host and add it to our `HOSTS` file. - -We simply add the following Virtual Host to our `httpd-vhosts.conf` file: - -``` - - ServerName cachet.dev # Or whatever you want to use - ServerAlias cachet.dev # Make this the same as ServerName - DocumentRoot "/var/www/Cachet/public" - - Require all granted # Used by Apache 2.4 - Options Indexes FollowSymLinks - AllowOverride All - Order allow,deny - Allow from all - - -``` - -Next we add a lookup on our `HOSTS` file (if we're not serving Cachet externally). So open up `/etc/hosts` or on Windows it'll be `C:\Windows\System32\drivers\etc\hosts` and add this line: - -``` -127.0.0.1 cachet.dev -``` - -Restart Apache and you're done! - -## nginx - -- Install php5-fpm -- Generate your SSL key+certificate -- Create a new vhost such as `/etc/nginx/sites-enabled/cachet.conf`: - -``` -# Upstream to abstract backend connection(s) for php -upstream php { - server unix:/tmp/php-cgi.socket; - server 127.0.0.1:9000; -} - -server { - server_name cachet.mycompany.com; # Or whatever you want to use - listen 80 default; - rewrite ^(.*) https://cachet.mycompany.com$1 permanent; -} - -# HTTPS server - -server { - listen 443; - server_name cachet.mycompany.com; - - root /var/vhost/cachet.mycompany.com/public; - index index.php; - - ssl on; - ssl_certificate /etc/ssl/crt/cachet.mycompany.com.crt; # Or wherever your crt is - ssl_certificate_key /etc/ssl/key/cachet.mycompany.com.key; # Or wherever your key is - ssl_session_timeout 5m; - - # Best practice as at March 2014 - ssl_protocols TLSv1 TLSv1.1 TLSv1.2; - ssl_prefer_server_ciphers on; - ssl_ciphers "ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-DSS-AES128-GCM-SHA256:kEDH+AESGCM:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA:ECDHE-ECDSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-DSS-AES128-SHA256:DHE-RSA-AES256-SHA256:DHE-DSS-AES256-SHA:DHE-RSA-AES256-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:AES:CAMELLIA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!RC4:!MD5:!PSK:!aECDH:!EDH-DSS-DES-CBC3-SHA:!EDH-RSA-DES-CBC3-SHA:!KRB5-DES-CBC3-SHA"; - ssl_buffer_size 1400; # 1400 bytes, within MTU - because we generally have small responses. Could increase to 4k, but default 16k is too big - - location / { - add_header Strict-Transport-Security max-age=15768000; - try_files $uri /index.php$is_args$args; - } - - location ~ \.php$ { - include fastcgi_params; - fastcgi_pass unix:/var/run/php5-fpm.sock; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_index index.php; - fastcgi_keep_conn on; - add_header Strict-Transport-Security max-age=15768000; - } -} -``` -Start php5-fpm and nginx and you're done! - -# Environment Detection - -If you're deploying into production you'll want to create an environmental variable as `ENV=production`. In the instance where the variable isn't defined, Cachet will think that it's `local`. - -# Security - -After deploying to a server that isn't [Heroku](#heroku) you should run `php artisan key:generate` before setting Cachet up. This changes the application key (found in `/app/config/app.php`) which is used for encryption. diff --git a/docs/setup/readme.md b/docs/setup/readme.md deleted file mode 100644 index c95ce085..00000000 --- a/docs/setup/readme.md +++ /dev/null @@ -1 +0,0 @@ -# Setting up Cachet