adding Raj edits/additions as well as initial round of pages I created
This commit is contained in:
@@ -6,34 +6,34 @@ page_keywords: grafana, build, contribute, documentation
|
||||
|
||||
# Building Grafana from source
|
||||
|
||||
Guide for creating packages from source, and for getting grafana up and running in
|
||||
dev environment.
|
||||
This guide will help you create packages from source and get grafana up and running in
|
||||
dev environment. Grafana ships with its own required backend server; also completely open-source. It's written in [Go](http://golang.org) and has a full [HTTP API](/v2.1/reference/http_api/).
|
||||
|
||||
## Dependencies
|
||||
|
||||
- Go 1.4
|
||||
- NodeJS
|
||||
- [Go 1.4](https://golang.org/dl/)
|
||||
- [NodeJS](https://nodejs.org/download/)
|
||||
|
||||
## Get Code
|
||||
|
||||
Create a directory for the project and set your path accordingly. Then download and install Grafana into your $GOPATH directory
|
||||
```
|
||||
export GOPATH=`pwd`
|
||||
go get github.com/grafana/grafana
|
||||
```
|
||||
|
||||
## Building the backend
|
||||
## Build the Backend
|
||||
```
|
||||
cd $GOPATH/src/github.com/grafana/grafana
|
||||
go run build.go setup (only needed once to install godep)
|
||||
$GOPATH/bin/godep restore (will pull down all golang lib dependecies in your current GOPATH)
|
||||
$GOPATH/bin/godep restore (will pull down all golang lib dependecies in your current GOPATH)
|
||||
go build .
|
||||
```
|
||||
|
||||
## Building on Windows
|
||||
#### Building on Windows
|
||||
The Grafana backend includes Sqlite3 which requires GCC to compile. So in order to compile Grafana on windows you need
|
||||
to install GCC. We recommend [TDM-GCC](http://tdm-gcc.tdragon.net/download).
|
||||
|
||||
## Building frontend assets
|
||||
## Build the Front-end Assets
|
||||
|
||||
To build less to css for the frontend you will need a recent version of of node (v0.12.0),
|
||||
npm (v2.5.0) and grunt (v0.4.5). Run the following:
|
||||
@@ -44,19 +44,21 @@ npm install -g grunt-cli
|
||||
grunt
|
||||
```
|
||||
|
||||
## Recompile backend on source change
|
||||
To rebuild on source change (requires that you executed godep restore)
|
||||
```
|
||||
go get github.com/Unknwon/bra
|
||||
bra run
|
||||
```
|
||||
|
||||
## Running
|
||||
## Running Grafana Locally
|
||||
You can run a local instance of Grafana by running:
|
||||
```
|
||||
./grafana-server
|
||||
```
|
||||
|
||||
Open grafana in your browser (default http://localhost:3000) and login with admin user (default user/pass = admin/admin).
|
||||
Open grafana in your browser (default [http://localhost:3000](http://localhost:3000)) and login with user/pass = admin/admin.
|
||||
|
||||
## Developing for Grafana
|
||||
To add features, customize your config, etc, you'll need to rebuild on source change (requires that you executed [godep restore](#build-the-backend), as outlined above).
|
||||
```
|
||||
go get github.com/Unknwon/bra
|
||||
bra run
|
||||
```
|
||||
You'll also need to run `grunt watch` to watch for changes to the front-end.
|
||||
|
||||
## Creating optimized release packages
|
||||
This step builds linux packages and requires that fpm is installed. Install fpm via `gem install fpm`.
|
||||
@@ -74,5 +76,7 @@ You only need to add the options you want to override. Config files are applied
|
||||
2. custom.ini
|
||||
|
||||
## Create a pull requests
|
||||
Please contribute to the Grafana project and submit a pull request! Build new features, write or update documentation, fix bugs and generally make Grafana even more awesome.
|
||||
|
||||
Before or after your create a pull requests, sign the [contributor license agreement](/project/cla.html).
|
||||
Before or after you create a pull request, sign the [contributor license agreement](/project/cla.html).
|
||||
Together we can build amazing software faster.
|
||||
@@ -28,7 +28,7 @@ but protects both the contributor and the company / foundation behind the projec
|
||||
It also gives us the option to relicense the code with a more permissive license in the future.
|
||||
|
||||
|
||||
If you have more questions, shoot us an email or drop by #grafana on IRC (freenode).
|
||||
If you have more questions, shoot us an [email](mailto:torkel@grafana.org) or drop by #grafana on IRC (freenode).
|
||||
|
||||
Many thanks to [RethinkDB](http://rethinkdb.com) for permission to re-use their CLA!
|
||||
|
||||
@@ -82,4 +82,4 @@ You are not expected to provide support for your contributions, except to the ex
|
||||
The failure of either party to enforce its rights under this agreement for any period shall not be construed as a waiver of such rights. No changes or modifications or waivers to this Agreement will be effective unless in writing and signed by both parties. In the event that any provision of this agreement shall be determined to be illegal or unenforceable, that provision will be limited or eliminated to the minimum extent necessary so that this agreement shall otherwise remain in full force and effect and enforceable. This agreement shall be governed by and construed in accordance with the laws of the State of California in the United States without regard to the conflicts of laws provisions thereof. In any action or proceeding to enforce rights under this agreement, the prevailing party will be entitled to recover costs and attorneys’ fees.
|
||||
|
||||
|
||||
<iframe src="https://docs.google.com/forms/d/1iagLZBotC4IIrz7TXvEdPU5tCtFDk__C5Rs92afXpCE/viewform?embedded=true" width="800" height="820" frameborder="0" marginheight="0" marginwidth="0">Loading CLA...</iframe>
|
||||
<iframe src="https://docs.google.com/forms/d/1iagLZBotC4IIrz7TXvEdPU5tCtFDk__C5Rs92afXpCE/viewform?embedded=true" width="800" height="820" frameborder="0" marginheight="0" marginwidth="0">Loading CLA...</iframe>
|
||||
Reference in New Issue
Block a user