diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e8ec024..da87862 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -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. diff --git a/README.md b/README.md index c285612..26a89e2 100644 --- a/README.md +++ b/README.md @@ -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. @@ -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 \ diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index 393897b..0000000 --- a/Vagrantfile +++ /dev/null @@ -1,30 +0,0 @@ -# -*- mode: ruby -*- -# vi: set ft=ruby : -ENV['VAGRANT_DEFAULT_PROVIDER'] = 'virtualbox' - -Vagrant.configure(2) do |config| - config.vm.provider "virtualbox" do |vb| - vb.cpus = 1 - vb.memory = "1500" - end - config.ssh.insert_key = false - - ################################################################################ - # Plugin: vagrant-vbguest - # - vagrant plugin install vagrant-vbguest - ################################################################################ - # set auto_update to false, if you do NOT want to check the correct - # additions version when booting this machine - config.vbguest.auto_update = true - # do NOT download the iso file from a webserver - config.vbguest.no_remote = true - - config.vm.define "test" do |node| - node.vm.box = "andrewhk/centos72-docker" - config.vm.provision "shell", inline: "sudo yum makecache" - config.vm.provision "shell", inline: "sudo yum -y install deltarpm" - config.vm.provision "shell", inline: "sudo yum -y upgrade" - config.vm.provision "shell", inline: "sudo yum clean all" - config.vm.provision "shell", inline: "sudo systemctl restart docker" - end -end \ No newline at end of file