-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4 from gzchen008/develop
add bin file to gitignore
- Loading branch information
Showing
6 changed files
with
118 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
{ | ||
"signing": { | ||
"default": { | ||
"expiry": "87600h" | ||
}, | ||
"profiles": { | ||
"server": { | ||
"expiry": "87600h", | ||
"usages": [ | ||
"signing", | ||
"key encipherment", | ||
"server auth" | ||
] | ||
}, | ||
"client": { | ||
"expiry": "87600h", | ||
"usages": [ | ||
"signing", | ||
"key encipherment", | ||
"client auth" | ||
] | ||
}, | ||
"peer": { | ||
"expiry": "87600h", | ||
"usages": [ | ||
"signing", | ||
"key encipherment", | ||
"server auth", | ||
"client auth" | ||
] | ||
} | ||
} | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"CN": "WAE Etcd CA", | ||
"key": { | ||
"algo": "rsa", | ||
"size": 2048 | ||
}, | ||
"names": [ | ||
{ | ||
"C": "CN", | ||
"L": "GD", | ||
"ST": "Shen Zhen" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{ | ||
"CN": "client", | ||
"hosts": [""], | ||
"key": { | ||
"algo": "rsa", | ||
"size": 2048 | ||
}, | ||
"names": [ | ||
{ | ||
"C": "CN", | ||
"L": "GD", | ||
"ST": "Shen Zhen" | ||
} | ||
] | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
#!/bin/bash | ||
# | ||
# Copyright (C) @2020 Webank Group Holding Limited | ||
# <p> | ||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except | ||
# in compliance with the License. You may obtain a copy of the License at | ||
# <p> | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# <p> | ||
# Unless required by applicable law or agreed to in writing, software distributed under the License | ||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express | ||
# or implied. See the License for the specific language governing permissions and limitations under | ||
# the License. | ||
# | ||
|
||
################################ | ||
# add etcd node | ||
################################ | ||
set -e | ||
APP_BIN="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" | ||
APP_HOME="$(dirname $APP_BIN)"; [ -d "$APP_HOME" ] || { echo "ERROR dockin-etcd failed to detect APP_HOME."; exit 1;} | ||
APP_NAME=$(basename "$APP_HOME") | ||
rm -rf *.pem | ||
./cfssl gencert -initca ca-csr.json | ./cfssljson -bare ca | ||
./cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=server server.json | ./cfssljson -bare server | ||
cp server.json member.json | ||
./cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=peer member.json | ./cfssljson -bare member | ||
./cfssl gencert -ca=ca.pem -ca-key=ca-key.pem -config=ca-config.json -profile=client client.json | ./cfssljson -bare client | ||
|
||
time=$(date "+%m%d%H%M") | ||
tar -czvf cers_$time.tar.gz *.pem |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
{ | ||
"CN": "WAE Etcd Server", | ||
"hosts": [ | ||
ssl_server_list | ||
], | ||
"key": { | ||
"algo": "rsa", | ||
"size": 2048 | ||
}, | ||
"names": [ | ||
{ | ||
"C": "CN", | ||
"L": "GD", | ||
"ST": "Shen Zhen" | ||
} | ||
] | ||
} |