git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
| #!/usr/bin/env python | |
| # Simple [boto3](https://github.com/boto/boto3) based EC2 manipulation tool | |
| # | |
| # To start an instance, create a yaml file with the following format: | |
| # | |
| # frankfurt: | |
| # - subnet-azb: | |
| # - type: t2.micro | |
| # image: image-tagname |
git clone https://gist.github.com/dd6f95398c1bdc9f1038.git vault
cd vault
docker-compose up -d
export VAULT_ADDR=http://192.168.99.100:8200
Initializing a vault:
vault init
| curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["node", "active"], true]' | |
| curl -sf 'http://localhost:8080/v3/facts' | |
| curl -sf 'http://localhost:8080/v3/nodes' | |
| curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fact", "kernel"], "Linux"]' | |
| curl -sfG 'http://localhost:8080/v3/nodes' --data-urlencode 'query=["=", ["fa, "operatingsystem"], "windows"]' |
| # Determine wireless device model (manufacturer 14e4 for Broadcom): | |
| lspci -vvnn | grep 14e4 | |
| # Install Broadcom STA driver for BCM43227: | |
| sudo apt-get update | |
| sudo apt-get install --reinstall linux-headers-generic build-essential dkms bcmwl-kernel-source | |
| sudo modprobe -r b43 ssb wl brcmfmac brcmsmac bcma | |
| sudo modprobe wl | |
| # Connect (press Fn+F3 to enable wifi if necessary first): |
| # -*- mode: ruby -*- | |
| # vi: set ft=ruby : | |
| Vagrant.require_plugin "aws-sdk" | |
| def get_box_download_url(bucket, key) | |
| s3 = AWS::S3.new | |
| bucket = s3.buckets[bucket] | |
| box = bucket.objects[key] | |
| url = box.url_for(:read, {:expires => (60*30), :secure => true}) | |
| url.to_s() |
| { | |
| "title": "Apache and Tomcat Logs", | |
| "services": { | |
| "query": { | |
| "list": { | |
| "0": { | |
| "query": "apache !tomcat !static", | |
| "alias": "", | |
| "color": "#7EB26D", | |
| "id": 0, |
| # check if job exists | |
| curl -XGET 'http://jenkins/checkJobName?value=yourJobFolderName' --user user.name:YourAPIToken | |
| # with folder plugin | |
| curl -s -XPOST 'http://jenkins/job/FolderName/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
| # without folder plugin | |
| curl -s -XPOST 'http://jenkins/createItem?name=yourJobName' --data-binary @config.xml -H "Content-Type:text/xml" --user user.name:YourAPIToken | |
| # create folder |
| input { | |
| stdin { | |
| type => "stdin-type" | |
| } | |
| file { | |
| type => "apache" | |
| path => ["/var/log/apache2/access_log", "/var/log/apache2/error_log", "/var/log/apache2/ssl_request_log"] | |
| } | |
| #!/bin/sh | |
| # Credits to: | |
| # - http://vstone.eu/reducing-vagrant-box-size/ | |
| # - https://github.com/mitchellh/vagrant/issues/343 | |
| aptitude -y purge ri | |
| aptitude -y purge installation-report landscape-common wireless-tools wpasupplicant ubuntu-serverguide | |
| aptitude -y purge python-dbus libnl1 python-smartpm python-twisted-core libiw30 | |
| aptitude -y purge python-twisted-bin libdbus-glib-1-2 python-pexpect python-pycurl python-serial python-gobject python-pam python-openssl libffi5 |
| filter { | |
| # strip the syslog PRI part and create facility and severity fields. | |
| # the original syslog message is saved in field %{syslog_raw_message}. | |
| # the extracted PRI is available in the %{syslog_pri} field. | |
| # | |
| # You get %{syslog_facility_code} and %{syslog_severity_code} fields. | |
| # You also get %{syslog_facility} and %{syslog_severity} fields if the | |
| # use_labels option is set True (the default) on syslog_pri filter. | |
| grok { | |
| type => "syslog-relay" |