소스 검색

README.md

tags/v1.0.0
Robin Thoni 7 년 전
부모
커밋
7999b0f7b5
2개의 변경된 파일97개의 추가작업 그리고 0개의 파일을 삭제
  1. 97
    0
      README.md
  2. 0
    0
      sitegencli/sitegen.py

+ 97
- 0
README.md 파일 보기

@@ -0,0 +1,97 @@
1
+sitegen
2
+=======
3
+
4
+CLI tool to build web site configuration and obtain SSL certificates from letsencrypt using certbot.
5
+
6
+Also provide a simpler way to request SSL certificate over certbot.
7
+
8
+Installation
9
+------------
10
+
11
+```
12
+#Install from pip
13
+pip2 install sitegencli
14
+#Install from sources
15
+python2 setup.py install
16
+```
17
+
18
+Configuration
19
+-------------
20
+
21
+Configuration must be copied from `/usr/local/etc/sitegen` to `/etc/sitegen`:
22
+
23
+sitegen.json looks like:
24
+```
25
+{
26
+  "siteConfDir": "/etc/apache2/sites-available/",
27
+  "siteDir": "/var/",
28
+  "confDir": "/etc/sitegen/",
29
+  "certRenewTime": 5356800,
30
+  "letsencryptCommands": [
31
+    {
32
+      "patterns": [
33
+        "example.com",
34
+        "*.example.com"
35
+      ],
36
+      "command": {
37
+        "letsencryptCommand": "certbot",
38
+        "letsencryptArgs": [
39
+          "--agree-tos",
40
+          "--text",
41
+          "--renew-by-default",
42
+          "--webroot",
43
+          "--webroot-path",
44
+          "/tmp/acme-challenge/",
45
+          "certonly"
46
+        ]
47
+      }
48
+    },
49
+    {
50
+      "patterns": "*",
51
+      "command": {
52
+        "letsencryptCommand": "certbot",
53
+        "letsencryptArgs": [
54
+          "--agree-tos",
55
+          "--text",
56
+          "--renew-by-default",
57
+          "--authenticator",
58
+          "certbot-pdns:auth",
59
+          "certonly"
60
+        ]
61
+      }
62
+    }
63
+  ],
64
+  "letsencryptDir": "/etc/letsencrypt/live/",
65
+  "certDir": "/etc/ssl/private/"
66
+}
67
+
68
+```
69
+
70
+Configuration keys:
71
+
72
+ - siteConfDir: Apache available sites folder.
73
+ - siteDir: Where to put new site document root folder.
74
+ - confDir: Sitegen configuration folder
75
+ - certRenewTime: Number of seconds before SSL certificate expiration
76
+ - letsencryptCommands: Commands to be used to generate SSL certificates
77
+    - patterns: Fnmatch patterns to select command from domain name
78
+    - command: The command to be executed to generate the certificate
79
+        - letsencryptCommand: Command name
80
+        - letsencryptArgs: Command arguments
81
+ - letsencryptDir: The root directory used by letsencrypt (certbot)
82
+ - certDir: Where to put symlink to certificate files
83
+
84
+Usage
85
+-----
86
+
87
+Generate a site with SSL:
88
+```
89
+sitegen --site-create example.com:default.https
90
+```
91
+
92
+Request a SSL certificate:
93
+```
94
+sitegen --cert-request example.com
95
+```
96
+
97
+See `sitegen --help` for more.

sitegen/sitegen.py → sitegencli/sitegen.py 파일 보기


Loading…
취소
저장