Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Building Continuous Delivery - DevOps Way

Building Continuous Delivery - DevOps Way

Andrey Rebrov

October 12, 2013
Tweet

More Decks by Andrey Rebrov

Other Decks in Programming

Transcript

  1. Что нужно 1.  Ставим pipeline plugin 2.  Делаем dependency между

    задачами 3.  Создаем новый pipeline view 4.  …. 5.  Profit!
  2. Vagrant Vagrant::Config.run do |config| config.vm.box = "precise32" config.vm.box_url = http://files.vagrantup.com/precise32.box

    config.vm.network :hostonly, "192.168.33.10” config.vm.share_folder("v-web", "/vagrant/www", "./www", :nfs => true) config.vm.share_folder("v-db", "/vagrant/db", "./db", :nfs => true) config.vm.forward_port 80, 8080 config.vm.provision :shell, :inline => "apt-get update --fix- missing” end
  3. Docker from ubuntu:12.10 run apt-get update run DEBIAN_FRONTEND=noninteractive apt-get install

    -q -y python run DEBIAN_FRONTEND=noninteractive apt-get install -q -y python-pip run pip install django run DEBIAN_FRONTEND=noninteractive apt-get install -q -y curl run curl -L https://github.com/shykes/helloflask/archive/ master.tar.gz | tar -xzv run cd helloflask-master && pip install -r requirements.txt
  4. Node    Node   Logstash   Elas.cSearch   Kibana  

    Как можно все это собрать
  5. Запуск Lumberjack /opt/lumberjack/bin/lumberjack -- host your.logstash.host -- port port-for- these-logs

    --ssl-ca-path /etc/ssl/ logstash.pub Для генерации ключей на logstash сервере: openssl req -x509 -newkey rsa:2048 -keyout /etc/ ssl/ logstash.key -out /etc/ssl/logstash.pub - nodes -days 365
  6. Конфигурируем Logstash #1 input { lumberjack { type => "apache-access"

    port => 3338 ssl_certificate => "/etc/ssl/logstash.pub" ssl_key => "/etc/ssl/logstash.key" } }
  7. Конфигурируем Logstash #3 output { elasticsearch { embedded => false

    cluster => logs host => "172.28.2.2" index => "apache-%{+YYYY.MM}" type => "apache-access" } }
  8. Конфигурируем Elasticsearch cluster.name: logs index.number_of_replicas: 0 path.data: /elasticsearch/data path.work: /elasticsearch/work

    path.logs: /elasticsearch/logs bootstrap.mlockall: true discovery.zen.ping.multicast.enabled: false
  9. Graphite output { graphite { host => "10.10.10.10" port =>

    2003 type => "system-netstats" metrics => [ hosts.%{@source_host}.netstats.interfaces.%{iface}.rxpck_s, "%{rxpck_s}”] } }