-
安装 etcd <……略……>
-
往 etcd 添加 KV数据,配置文件生成用
This file contains hidden or 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
fastcgi_cache_path /home/ashley/ashleyrich.com/cache levels=1:2 keys_zone=ashleyrich.com:100m inactive=60m; | |
fastcgi_cache_key “$scheme$request_method$host$request_uri”; | |
server { | |
listen 80; | |
server_name pluto.ashleyrich.com; | |
return 301 https://$server_name$request_uri; | |
} |
This file contains hidden or 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
FROM <private repo> | |
MAINTAINER Ross Kukulinski "[email protected]" | |
ADD nginx.toml /etc/confd/conf.d/nginx.toml | |
ADD templates/nginx.tmpl /etc/confd/templates/nginx.tmpl | |
ADD confd-watch /usr/local/bin/confd-watch | |
RUN chmod +x /usr/local/bin/confd-watch |
This installation is going to require 2 servers one acts as kerberos KDC server
and the other machine is going to be client. Lets assume the FQDN's are (here
cw.com
is the domain name, make a note of the domain name here):
- Kerberos KDC Server: kdc.cw.com
- Kerberos Client: kclient.cw.com
Important: Make sure that both systems have their hostnames properly set and both systems have the hostnames and IP addresses of both systems in
This file contains hidden or 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
module("resty.consul", package.seeall) | |
_VERSION = '0.1.0' | |
function service_nodes(service) | |
local http = require "resty.http" | |
local json = require "cjson" | |
local hc = http:new() | |
local upstream = "" |
This file contains hidden or 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 | |
# Setup and enable auditd | |
# MUST REBOOT AFTER SETUP | |
# | |
# FUNCTIONALITIES: | |
# | |
# * Auditing user TTY | |
# aureport --tty | |
# | |
# * Auditing root commands (real uid) |
This file contains hidden or 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
version: '3' | |
services: | |
# FRONT | |
chronograf: | |
# Full tag list: https://hub.docker.com/r/library/chronograf/tags/ | |
image: chronograf | |
deploy: | |
replicas: 1 | |
placement: | |
constraints: |
总有那么些蛋疼的机房,为了所谓的这安全,将NTP 服务器一刀切了。这时候时间同步就是一个问题,不过我们还可以使用
rdate
来解决。
yum -y install rdate
rdate -s time.nist.gov
cat > /etc/cron.daily/rdate << "EOF"
#!/bin/sh
rdate -s time.nist.gov
本來打算試著用 ngx_lua 取代原本用 C 實作的 access control,可是看完了「基本語法」想要找一些相關會用到的 library 都找不太到,像 lua-aws 雖然有人寫,但看起來不太完整。這樣就不能透過 lua script 存取 aws service 取得認證的資訊。
不過,想了想它網頁上 access_by_lua 的例子也沒有直接寫在裡面,就以 deleagte 的形式問了其它 uri:
location / {
deny 192.168.1.1;
allow 192.168.1.0/24;
allow 10.1.1.0/16;
deny all;
OlderNewer