Skip to content

Instantly share code, notes, and snippets.

Ming-der Wang mingderwang

Block or report user

Report or block mingderwang

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@mingderwang
mingderwang / config.yml
Last active Dec 11, 2019
OD security plugin config file OK for LDAP
View config.yml
---
# OK for authz
# This is the main Open Distro Security configuration file where authentication
# and authorization is defined.
#
# You need to configure at least one authentication domain in the authc of this file.
# An authentication domain is responsible for extracting the user credentials from
# the request and for validating them against an authentication backend like Active Directory for example.
#
@mingderwang
mingderwang / config.yml
Created Dec 10, 2019
/usr/share/elasticsearch/plugins/opendistro_security/securityconfig
View config.yml
---
# This is the main Open Distro Security configuration file where authentication
# and authorization is defined.
#
# You need to configure at least one authentication domain in the authc of this file.
# An authentication domain is responsible for extracting the user credentials from
# the request and for validating them against an authentication backend like Active Directory for example.
#
# If more than one authentication domain is configured the first one which succeeds wins.
@mingderwang
mingderwang / elasticsearch.yml
Created Dec 10, 2019
default OD elasticsearch.yml with demo cert.
View elasticsearch.yml
cluster.name: "docker-cluster"
network.host: 0.0.0.0
# # minimum_master_nodes need to be explicitly set when bound on a public IP
# # set to 1 to allow single node clusters
# # Details: https://github.com/elastic/elasticsearch/pull/17288
# discovery.zen.minimum_master_nodes: 1
# # Breaking change in 7.0
# # https://www.elastic.co/guide/en/elasticsearch/reference/7.0/breaking-changes-7.0.html#breaking_70_discovery_changes
View dhcpd.conf
# this DHCP server to be declared valid
#authoritative;
### 設定子網段與 IP 位置配發範圍 ###
subnet 10.99.1.0 netmask 255.255.255.0 {
range 10.99.1.220 10.99.1.250;
### 指定 DNS IP 位置 ###
option domain-name-servers 8.8.8.8, 168.95.1.1, 8.8.4.4, 1.1.1.1;
### 指定網域名稱 ###
@mingderwang
mingderwang / dhcpd.conf
Last active Nov 22, 2019 — forked from muka/dhcpd.conf
Setup a dhcpd server using docker
View dhcpd.conf
ddns-update-style none;
option domain-name "bimap.co";
option domain-name-servers 208.67.222.222, 208.67.220.220;
default-lease-time 86400;
max-lease-time 604800;
authoritative;
View robot.txt
#
# robots.txt
#
# This file is to prevent the crawling and indexing of certain parts
# of your site by web crawlers and spiders run by sites like Yahoo!
# and Google. By telling these "robots" where not to go on your site,
# you save bandwidth and server resources.
#
# This file will be ignored unless it is at the root of your host:
# Used: http://example.com/robots.txt
View docker-compose.yml
version: '3'
services:
odfe-node1:
image: amazon/opendistro-for-elasticsearch:1.2.0
container_name: odfe-node1
environment:
- cluster.name=odfe-cluster
- node.name=odfe-node1
- discovery.seed_hosts=odfe-node1,odfe-node2
- cluster.initial_master_nodes=odfe-node1,odfe-node2
@mingderwang
mingderwang / bimap_for_localhost_fact.yml
Created Nov 17, 2019
to run ansible on server itself to test performance and spec
View bimap_for_localhost_fact.yml
---
- hosts: localhost
sudo: yes
tasks:
# gathering fact on remote server.
- name: Collect only facts returned by facter
setup:
gather_subset:
- 'virtual'
@mingderwang
mingderwang / bimap_fact.yml
Last active Nov 17, 2019
ansible-playbook bimap_fact.yml -v
View bimap_fact.yml
---
- hosts: all
sudo: yes
tasks:
# gathering fact on remote server.
- name: Collect only facts returned by facter
setup:
gather_subset:
- 'virtual'
@mingderwang
mingderwang / performance.log
Created Nov 17, 2019
use ansible to gathering system info and performance
View performance.log
Using /etc/ansible/ansible.cfg as config file
PLAY [all] ************************************************************************************************************************************
TASK [Gathering Facts] ************************************************************************************************************************
ok: [13]
TASK [Collect only facts returned by facter] **************************************************************************************************
ok: [13]
You can’t perform that action at this time.