LoginSignup
0

More than 5 years have passed since last update.

Grafanaのフロントエンド開発環境を構築する (on Windows10)

Last updated at Posted at 2018-07-14

Objectives

Grafanaのフロントエンドを修正して遊ぶための開発環境を構築する。

Windowsだといろいろ面倒な手順があったりするのでやったことをまとめておく。基本的に下記ページの手順のままだけど若干変えているところあり。

Environment

  • OS: Windows10
  • node: v8.11.3
  • npm: 5.6.0
  • yarn: 1.7.0
  • git: 2.12.2.windows.2

Details

Install GO

Install GCC

Install node-gyp

npm install -g node-gyp

Build the backend

set GOPATH=[absolute-path-of-work-dir]
go get github.com/grafana/grafana
cd src/github.com/grafana/grafana
go run build.go setup

Build the frontend

yarn install --pure-lockfile
npm run build

Run the backend

copy conf\defaults.ini conf\custom.ini
..\..\..\..\bin\grafana-server
  • custom.ini
    • app_mode = development

Run the frontend

yarn start

Login to Grafana

http://localhost:3333

  • Credential
    • username: admin
    • password: admin

Configure InfluxDB as a data source

Install and run InfluxDB

Install and run Chronograf

Create a database via Chronograf UI

  • http://localhost:8888
    • Connection String: http://localhost:8086
    • Username: admin
    • Password: admin
  • Data Explorer
    • CREATE DATABASE [db-name]

Add a data source via InfluxDB UI

  • http://localhost:3333
    • Type: InfluxDB
    • HTTP URL: http://localhost:8086
    • Auth: Basic Auth
    • Basic Auth Details
      • User: admin
      • Password: admin
    • InfluxDB Details
      • Database: [db-name]
      • User: admin
      • Password: admin

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0