Merge pull request #11437 from influxdata/note-port-9999
chore(readme): indicate that port 9999 is temporarypull/11466/head
commit
b03422106e
57
README.md
57
README.md
|
@ -1,22 +1,25 @@
|
|||
# InfluxDB [![CircleCI](https://circleci.com/gh/influxdata/influxdb.svg?style=svg)](https://circleci.com/gh/influxdata/influxdb)
|
||||
|
||||
This is the for InfluxDB 2.0 OSS, which includes parts that used to be known as Chronograf and Kapacitor.
|
||||
This is the repository for InfluxDB 2.0 OSS, which includes components previously known as Chronograf and Kapacitor.
|
||||
|
||||
If you are looking for the [InfluxDB 1.x Go Client, we've created a new repo](https://github.com/influxdata/influxdb1-client) for that.
|
||||
|
||||
## Installation
|
||||
## Installing from Source
|
||||
|
||||
This project requires Go 1.11 and Go module support.
|
||||
|
||||
Set `GO111MODULE=on` or build the project outside of your `GOPATH` for it to succeed.
|
||||
|
||||
If you are getting an `error loading module requirements` error with `bzr executable file not found in $PATH”` on `make`, `brew install bazaar` (on macOS) before continuing. This error will also be returned if you have not installed `npm`. On macOS, `brew install npm` will install `npm`.
|
||||
If you are getting an `error loading module requirements` error with `bzr executable file not found in $PATH”` on `make`, `brew install bazaar` (on macOS) before continuing.
|
||||
This error will also be returned if you have not installed `npm`.
|
||||
On macOS, `brew install npm` will install `npm`.
|
||||
|
||||
For information about modules, please refer to the [wiki](https://github.com/golang/go/wiki/Modules).
|
||||
|
||||
## Basic Usage
|
||||
|
||||
A successful `make` run results in two binaries, with platform-dependent paths:
|
||||
|
||||
```
|
||||
$ make
|
||||
...
|
||||
|
@ -24,16 +27,19 @@ env GO111MODULE=on go build -tags 'assets ' -o bin/darwin/influx ./cmd/influx
|
|||
env GO111MODULE=on go build -tags 'assets ' -o bin/darwin/influxd ./cmd/influxd
|
||||
```
|
||||
|
||||
`influxd` is the InfluxDB service. `influx` is the CLI management tool.
|
||||
`influxd` is the InfluxDB service.
|
||||
`influx` is the CLI management tool.
|
||||
|
||||
Start the service.
|
||||
Logs to stdout by default:
|
||||
|
||||
Start the service. Logs to stdout by default:
|
||||
```
|
||||
$ bin/darwin/influxd
|
||||
```
|
||||
|
||||
To write and read fancy timeseries data, you'll need to first create a user, credentials, organization and bucket.
|
||||
Use the subcommands `influx user`, `influx auth`, `influx org` and `influx bucket`, or do it all in one breath with `influx setup`:
|
||||
|
||||
```
|
||||
$ bin/darwin/influx setup
|
||||
Welcome to InfluxDB 2.0!
|
||||
|
@ -73,6 +79,7 @@ $ bin/darwin/influx setup --username user --password hunter2 --org my-org --buck
|
|||
Most `influx` commands read the token from this file path by default.
|
||||
|
||||
You may need the organization ID and bucket ID later:
|
||||
|
||||
```
|
||||
$ influx org find
|
||||
ID Name
|
||||
|
@ -86,16 +93,23 @@ ID Name Retention Organization Organiza
|
|||
```
|
||||
|
||||
Write to measurement `m`, with tag `v=2`, in bucket `my-bucket`, which belongs to organization `my-org`:
|
||||
|
||||
```
|
||||
$ bin/darwin/influx write --org my-org --bucket my-bucket --precision s "m v=2 $(date +%s)"
|
||||
```
|
||||
|
||||
Write the same point using `curl`:
|
||||
|
||||
```
|
||||
curl --header "Authorization: Token $(cat ~/.influxdbv2/credentials)" --data-raw "m v=2 $(date +%s)" "http://localhost:9999/api/v2/write?org=033a3f2c708aa000&bucket=033a3f2c710aa000&precision=s"
|
||||
```
|
||||
|
||||
**Note**: Port 9999 will be used during the alpha and beta phases of development of InfluxDB v2.0.
|
||||
This should allow a v2.0-alpha instance to be run alongside a v1.x instance without interfering on port 8086.
|
||||
InfluxDB v2.0 will thereafter continue to use 8086.
|
||||
|
||||
Read that back with a simple Flux query (currently, the `query` subcommand does not have a `--org` flag):
|
||||
|
||||
```
|
||||
$ bin/darwin/influx query --org-id 033a3f2c708aa000 'from(bucket:"my-bucket") |> range(start:-1h)'
|
||||
Result: _result
|
||||
|
@ -106,6 +120,7 @@ Table: keys: [_start, _stop, _field, _measurement]
|
|||
```
|
||||
|
||||
Use the fancy REPL:
|
||||
|
||||
```
|
||||
$ bin/darwin/influx repl --org my-org
|
||||
> from(bucket:"my-bucket") |> range(start:-1h)
|
||||
|
@ -117,9 +132,13 @@ Table: keys: [_start, _stop, _field, _measurement]
|
|||
>
|
||||
```
|
||||
|
||||
Access the user interface in your browser by navigating to `http://localhost:9999/`
|
||||
|
||||
## Introducing Flux
|
||||
|
||||
We recently announced Flux, the MIT-licensed data scripting language (and rename for IFQL). The source for Flux is [available on GitHub](https://github.com/influxdata/flux). Learn more about Flux from [CTO Paul Dix's presentation](https://speakerdeck.com/pauldix/flux-number-fluxlang-a-new-time-series-data-scripting-language).
|
||||
We recently announced Flux, the MIT-licensed data scripting language (and rename for IFQL).
|
||||
The source for Flux is [available on GitHub](https://github.com/influxdata/flux).
|
||||
Learn more about Flux from [CTO Paul Dix's presentation](https://speakerdeck.com/pauldix/flux-number-fluxlang-a-new-time-series-data-scripting-language).
|
||||
|
||||
## CI and Static Analysis
|
||||
|
||||
|
@ -134,15 +153,16 @@ This can take some time, and is not really visible to community contributors.
|
|||
|
||||
### Static Analysis
|
||||
|
||||
This project uses the following static analysis tools. Failure during the running of any of these tools results in a failed build.
|
||||
This project uses the following static analysis tools.
|
||||
Failure during the running of any of these tools results in a failed build.
|
||||
Generally, code must be adjusted to satisfy these tools, though there are exceptions.
|
||||
|
||||
- [go vet](https://golang.org/cmd/vet/) checks for Go code that should be considered incorrect.
|
||||
- [go fmt](https://golang.org/cmd/gofmt/) checks that Go code is correctly formatted.
|
||||
- [go mod tidy](https://tip.golang.org/cmd/go/#hdr-Add_missing_and_remove_unused_modules) ensures that the source code and go.mod agree.
|
||||
- [staticcheck](http://next.staticcheck.io/docs/) checks for things like: unused code, code that can be simplified, code that is incorrect and code that will have performance issues.
|
||||
- [go vet](https://golang.org/cmd/vet/) checks for Go code that should be considered incorrect.
|
||||
- [go fmt](https://golang.org/cmd/gofmt/) checks that Go code is correctly formatted.
|
||||
- [go mod tidy](https://tip.golang.org/cmd/go/#hdr-Add_missing_and_remove_unused_modules) ensures that the source code and go.mod agree.
|
||||
- [staticcheck](http://next.staticcheck.io/docs/) checks for things like: unused code, code that can be simplified, code that is incorrect and code that will have performance issues.
|
||||
|
||||
### staticcheck
|
||||
### staticcheck
|
||||
|
||||
If your PR fails `staticcheck` it is easy to dig into why it failed, and also to fix the problem.
|
||||
First, take a look at the error message in Circle under the `staticcheck` build section, e.g.,
|
||||
|
@ -153,19 +173,18 @@ tsdb/tsm1/encoding.go:172:7: receiver name should not be an underscore, omit the
|
|||
```
|
||||
|
||||
Next, go and take a [look here](http://next.staticcheck.io/docs/checks) for some clarification on the error code that you have received, e.g., `U1000`.
|
||||
The docs will tell you what's wrong, and often what you need to do to fix the issue.
|
||||
The docs will tell you what's wrong, and often what you need to do to fix the issue.
|
||||
|
||||
#### Generated Code
|
||||
|
||||
Sometimes generated code will contain unused code or occasionally that will fail a different check.
|
||||
`staticcheck` allows for [entire files](http://next.staticcheck.io/docs/#ignoring-problems) to be ignored, though it's not ideal.
|
||||
A linter directive, in the form of a comment, must be placed within the generated file.
|
||||
This is problematic because it will be erased if the file is re-generated.
|
||||
This is problematic because it will be erased if the file is re-generated.
|
||||
Until a better solution comes about, below is the list of generated files that need an ignores comment.
|
||||
If you re-generate a file and find that `staticcheck` has failed, please see this list below for what you need to put back:
|
||||
|
||||
| File | Comment |
|
||||
|:-:|:-:|
|
||||
| query/promql/promql.go | //lint:file-ignore SA6001 Ignore all unused code, it's generated |
|
||||
| proto/bin_gen.go | //lint:file-ignore ST1005 Ignore error strings should not be capitalized |
|
||||
|
||||
| File | Comment |
|
||||
| :--------------------: | :----------------------------------------------------------------------: |
|
||||
| query/promql/promql.go | //lint:file-ignore SA6001 Ignore all unused code, it's generated |
|
||||
| proto/bin_gen.go | //lint:file-ignore ST1005 Ignore error strings should not be capitalized |
|
||||
|
|
Loading…
Reference in New Issue