Skip to content

Commit

Permalink
Updated build instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
haxorof committed May 25, 2017
1 parent 8559714 commit cba6965
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 47 deletions.
24 changes: 8 additions & 16 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,30 +47,22 @@ This section describes how you build prometheus-sql distribution packages.

2. All binaries produced are now located in directories under the `dist` directory.

### Build prometheus-sql Docker image
### Build prometheus-sql Docker image locally

1. Build distribution binaries as described in previous section.

2. Build Docker image:
2. Go into `dist` directory.

Using Make:
```bash
make docker
```

Using Docker directly (for test only):
```bash
docker build -t dbhi/prometheus-sql .
```
3. Start Simple HTTP server as a background process: `python -m SimpleHTTPServer &`

### Build inside a Vagrant box
4. Go back to the project root directory.

1. Start VM with Vagrant:
5. Build Docker image:

Using Docker (for test only):
```bash
vagrant up
docker build --tag dbhi/prometheus-sql --rm --build-arg BASE_URL=http://localhost:8000 --no-cache .
```

2. Login as `vagrant` user with password `vagrant`
6. Done! Docker image is now built and you can kill the Simple HTTP server process.

3. See above sections how to build binaries etc.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Prometheus SQL

[![Docker Build Status](https://img.shields.io/docker/build/dbhi/prometheus-sql.svg)](https://hub.docker.com/r/dbhi/prometheus-sql/builds/)
[![GitHub release](https://img.shields.io/github/release/chop-dbhi/prometheus-sql.svg)](https://github.com/chop-dbhi/prometheus-sql)
[![Docker Pulls](https://img.shields.io/docker/pulls/dbhi/prometheus-sql.svg)](https://hub.docker.com/r/dbhi/prometheus-sql/)
[![Docker Build Status](https://img.shields.io/docker/build/dbhi/prometheus-sql.svg)](https://hub.docker.com/r/dbhi/prometheus-sql/builds/)
[![GoDoc](https://godoc.org/github.com/chop-dbhi/prometheus-sql?status.svg)](https://godoc.org/github.com/chop-dbhi/prometheus-sql)

Service that generates basic metrics for SQL result sets and exposing them as Prometheus metrics.
Expand Down Expand Up @@ -73,6 +74,7 @@ Run this service. Mount the `queries.yml` file and link the SQL Agent service.

```bash
docker run -d \
--name prometheus-sql \
-p 8080:8080 \
-v /path/to/queries.yml:/queries.yml \
--link sqlagent:sqlagent \
Expand Down
30 changes: 0 additions & 30 deletions Vagrantfile

This file was deleted.

0 comments on commit cba6965

Please sign in to comment.