This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
vault mount -path=rootpki pki | |
vault mount-tune -max-lease-ttl="175200h" rootpki | |
vault write rootpki/root/generate/exported common_name=example.com ttl="175200h" | |
vault write rootpki/root/generate/internal common_name=example.com ttl="175200h" | |
vault write rootpki/intermediate/generate/exported common_name=example.com ttl="175200h" | |
vault write rootpki/intermediate/generate/internal common_name=example.com ttl="175200h" | |
vault mount -path=intermediatepki pki | |
vault mount-tune -max-lease-ttl="8760h" intermediatepki |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# to generate your dhparam.pem file, run in the terminal | |
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
set -e | |
# export DOTOKEN=XXXXXXXXX | |
DOREGION=nyc1 | |
#export DOSSHKEY=XXXXXXXX | |
DOPRIVATE=true | |
DOOPTIONS=" --digitalocean-region=$DOREGION --digitalocean-private-networking=$DOPRIVATE --digitalocean-ssh-key-fingerprint=$DOSSHKEY" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 yum -y update | |
2 yum -y install epel-release | |
3 yum -y install vim htop screen | |
4 rpm -Uvh https://yum.puppetlabs.com/puppet5/puppet5-release-el-7.noarch.rpm | |
5 exit | |
6 yum install puppet-agent | |
7 puexport PATH=/opt/puppetlabs/bin:$PATH | |
8 export PATH=/opt/puppetlabs/bin:$PATH | |
9 puppet module search elasticsearch | |
10 puppet module install elastic-elasticsearch |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class { 'elasticsearch': | |
java_install => true, | |
manage_repo => true, | |
repo_version => '5.x', | |
restart_on_change => true, | |
security_plugin => 'x-pack', | |
jvm_options => [ | |
'-Xms1g', | |
'-Xmx1g' | |
], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
add-apt-repository -y ppa:ubuntu-lxc/lxd-stable | |
apt update -y | |
apt install -y lxd zfsutils-linux vim htop screen | |
apt update -y | |
DEBIAN_FRONTEND=noninteractive apt upgrade -y | |
service lxd restart | |
lxc network create lxdbr0 ipv6.address=none ipv4.address=172.22.3.1/24 ipv4.nat=true | |
lxc network attach-profile lxdbr0 default eth0 | |
lxd init --auto --storage-backend zfs --storage-pool lxd --storage-create-loop 15 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input { | |
stdin { } | |
} | |
filter { | |
grok { | |
match => [ "message", "<(?<ruleID>.*)>(?<msg>.*)" ] | |
add_tag => "grok" | |
} | |
kv { source => "msg" } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# | |
# filebeat: Startup script for Filebeat Log Shipper. | |
# | |
# chkconfig: 3 80 05 | |
# description: Startup script for Filebeat Log Shipper standalone | |
FILEBEAT_HOME=/usr/local/filebeat; | |
export FILEBEAT_HOME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Script to run {.beat_name} in foreground with the same path settings that | |
# the init script / systemd unit file would do. | |
/usr/local/filebeat/filebeat \ | |
-path.home /usr/local/filebeat \ | |
-path.config /etc/filebeat \ | |
-path.data /var/lib/filebeat \ | |
-path.logs /var/log/filebeat \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl -XGET --user elastic:changeme http://localhost:9200/_cluster/health | jq . | |
curl -XGET --user elastic:changeme http://localhost:9200/_cluster/allocation/explain | jq . | |
curl -XGET --user elastic:changeme http://localhost:9200/_cluster/health?level=indices | jq . | |
curl -XGET 'localhost:9200/_cat/shards/logstash*?v&bytes=m&h=index,store.size&s=store.size:desc' | |
curl -XGET 'localhost:9200/_cat/indices/logstash*?s=store.size:desc&h=index,pri.store.size' |
OlderNewer