Skip to content

devops-ru/delivery-pipeline-training

Repository files navigation

delivery-pipeline-training

Build Status

Slack

devops-training-spb.slack.com

Before start

Need to be installed (for Mac OS)

Prepare your database

brew services start postgresql
createuser -s crudtest -P
# password: crudtest
createdb -U crudtest crudtest

Pull docker images

Run on docker console

docker pull prom/prometheus
docker pull tray/node_exporter
docker pull devopsru/delivery-pipeline-training
docker pull grafana/grafana
docker pull elasticsearch
docker pull kibana

Create services accounts

Heroku

New Relic

Installation

git clone https://github.com/devops-ru/delivery-pipeline-training.git myapp
cd myapp
git submodule init && git submodule update

npm install
npm run test
npm run start

Full run

Ports

  • 9090 Prometheus
  • 3000 Grafana
  • 9100 Node-Exporter
  • 5000 CrudTest app
  • 5601 Kibana
  • 9200 ElasticSearch

If you use docker v1.10 and docker-compose v1.7, just run

sudo docker-compose up 

# Deploy app to container, do not forget edit provision/hosts file before
# $ ansible-playbook -i hosts bootstrap.yml
# log in to app container and run 
# $ cd /opt/crudtest/rieman
# $ lein run

# Grafana
# Login:    admin
# Password: admin

Or run each container

sudo docker run --name box-elastic -p 9200:9200 -d elasticsearch

sudo docker run --name=box-kibana -p 5601:5601 --link box-elastic:elasticsearch -d  kibana

sudo docker run --name box-app --link box-elastic:box-elastic.docker -p 5000:5000  -p 9100:9100 -d devopsru/delivery-pipeline-training
# Deploy app to container, do not forget edit hosts file before
# $ ansible-playbook -i hosts bootstrap.yml
# log in to app container and run 
# $ cd /opt/crudtest/rieman
# $ lein run

sudo docker run --name node-exporter -p 9100:9100 tray/node_exporter
sudo docker run --name box-prometheus -p 9090:9090 --link node-exporter -v [REPO DIR]/steps/11-monitoring/prometheus.yml:/etc/prometheus/prometheus.yml -d prom/prometheus

sudo docker run --name box-grafana --link box-prometheus:box-prometheus.docker -p 3000:3000 -d grafana/grafana
# Grafana
# Login:    admin
# Password: admin