Merge pull request #12766 from mrajashree/master

Update cert generation Makefile to include configurable cert file names
This commit is contained in:
Piotr Tabor 2021-03-30 12:59:41 +02:00 committed by GitHub
commit d18ac20080
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 7 deletions

View File

@ -19,32 +19,32 @@ req:
-ca certs/ca.pem \
-ca-key certs/ca-key.pem \
-config config/ca-config.json \
config/req-csr.json | $(JSON) -bare certs/9.145.89.120
config/req-csr.json | $(JSON) -bare certs/${infra0}
$(CFSSL) gencert \
-ca certs/ca.pem \
-ca-key certs/ca-key.pem \
-config config/ca-config.json \
config/req-csr.json | $(JSON) -bare certs/9.145.89.173
config/req-csr.json | $(JSON) -bare certs/${infra1}
$(CFSSL) gencert \
-ca certs/ca.pem \
-ca-key certs/ca-key.pem \
-config config/ca-config.json \
config/req-csr.json | $(JSON) -bare certs/9.145.89.225
config/req-csr.json | $(JSON) -bare certs/${infra2}
$(CFSSL) gencert \
-ca certs/ca.pem \
-ca-key certs/ca-key.pem \
-config config/ca-config.json \
config/req-csr.json | $(JSON) -bare certs/peer-9.145.89.120
config/req-csr.json | $(JSON) -bare certs/peer-${infra0}
$(CFSSL) gencert \
-ca certs/ca.pem \
-ca-key certs/ca-key.pem \
-config config/ca-config.json \
config/req-csr.json | $(JSON) -bare certs/peer-9.145.89.173
config/req-csr.json | $(JSON) -bare certs/peer-${infra1}
$(CFSSL) gencert \
-ca certs/ca.pem \
-ca-key certs/ca-key.pem \
-config config/ca-config.json \
config/req-csr.json | $(JSON) -bare certs/peer-9.145.89.225
config/req-csr.json | $(JSON) -bare certs/peer-${infra2}
clean:
rm -rf certs

View File

@ -28,4 +28,10 @@ Example:
]
}
```
3. Run `make` to generate the certs
3. Set the following environment variables subsituting your IP address:
```bash
export infra0={IP-0}
export infra1={IP-1}
export infra2={IP-2}
```
4. Run `make` to generate the certs