-
Notifications
You must be signed in to change notification settings - Fork 42
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 #11 from tvpartytonight/run_acceptance_in_travis
Run acceptance tests in travis
- Loading branch information
Showing
10 changed files
with
118 additions
and
94 deletions.
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
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
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,67 @@ | ||
FROM alpine:3.8 | ||
|
||
|
||
# Install openssl | ||
RUN apk update && apk add openssl | ||
|
||
# Setup cert infrastructure on the machine | ||
|
||
RUN mkdir /root/ca | ||
WORKDIR /root/ca | ||
COPY spec/acceptance/fixtures/root_ca_openssl.cnf /root/ca/openssl.cnf | ||
|
||
RUN mkdir certs crl newcerts private \ | ||
&& touch index.txt \ | ||
&& echo 1000 > serial | ||
RUN echo 1000 > /root/ca/crlnumber | ||
|
||
RUN openssl genrsa -out private/rootca.key.pem 4096 | ||
RUN openssl req -config openssl.cnf \ | ||
-key private/rootca.key.pem \ | ||
-new -x509 -days 7300 -sha256 -extensions v3_ca \ | ||
-subj "/CN=rootca" \ | ||
-out certs/rootca.cert.pem | ||
|
||
RUN mkdir /root/ca/intermediate | ||
COPY spec/acceptance/fixtures/intermediate_ca_openssl.cnf /root/ca/intermediate/openssl.cnf | ||
|
||
WORKDIR /root/ca/intermediate/ | ||
RUN mkdir certs crl csr newcerts private \ | ||
&& touch index.txt \ | ||
&& echo 1000 > serial | ||
RUN echo 1000 > /root/ca/intermediate/crlnumber | ||
|
||
WORKDIR /root/ca | ||
RUN openssl genrsa -out intermediate/private/intermediate.key.pem 4096 | ||
RUN openssl req -config intermediate/openssl.cnf -new -sha256 \ | ||
-key intermediate/private/intermediate.key.pem \ | ||
-subj "/CN=intermediateca" \ | ||
-out intermediate/csr/intermediate.csr.pem | ||
|
||
RUN openssl ca -config openssl.cnf -extensions v3_intermediate_ca \ | ||
-days 3650 -batch -notext -md sha256 \ | ||
-in intermediate/csr/intermediate.csr.pem \ | ||
-out intermediate/certs/intermediate.cert.pem | ||
|
||
RUN cat intermediate/certs/intermediate.cert.pem certs/rootca.cert.pem \ | ||
> intermediate/certs/ca-bundle.cert.pem | ||
|
||
RUN openssl genrsa -out intermediate/private/vault.key.pem 2048 | ||
RUN openssl req -config intermediate/openssl.cnf \ | ||
-key intermediate/private/vault.key.pem \ | ||
-subj "/CN=vault.local" \ | ||
-new -sha256 -out intermediate/csr/vault.csr.pem | ||
RUN openssl ca -config intermediate/openssl.cnf \ | ||
-extensions server_cert -days 375 -batch -notext -md sha256 \ | ||
-in intermediate/csr/vault.csr.pem \ | ||
-out intermediate/certs/vault.cert.pem | ||
|
||
RUN openssl ca -config intermediate/openssl.cnf \ | ||
-gencrl -out intermediate/crl/intermediate.crl.pem | ||
|
||
RUN openssl ca -config openssl.cnf \ | ||
-gencrl -out crl/rootca.crl.pem | ||
|
||
RUN cat intermediate/crl/intermediate.crl.pem crl/rootca.crl.pem > intermediate/crl/crlchain.pem | ||
|
||
CMD tail -f /dev/null |
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,12 @@ | ||
FROM certs:latest as certs | ||
|
||
FROM puppet/puppetserver-standalone:6.0.1 | ||
|
||
COPY --from=certs /root/ca/intermediate/private/intermediate.key.pem /root/intermediate.key.pem | ||
COPY --from=certs /root/ca/intermediate/crl/crlchain.pem /root/crlchain.pem | ||
COPY --from=certs /root/ca/intermediate/certs/ca-bundle.cert.pem /root/certbundle.pem | ||
|
||
RUN /opt/puppetlabs/bin/puppetserver ca import \ | ||
--cert-bundle /root/certbundle.pem \ | ||
--crl-chain /root/crlchain.pem \ | ||
--private-key /root/intermediate.key.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 |
---|---|---|
@@ -1,70 +1,12 @@ | ||
FROM certs:latest as certs | ||
FROM vault:0.11.0 | ||
|
||
COPY spec/acceptance/fixtures/vault_config.hcl /vault/config/vault_config.hcl | ||
|
||
# Install openssl | ||
RUN apk update && apk add openssl | ||
|
||
# Setup cert infrastructure on the machine | ||
COPY --from=certs /root/ca/intermediate/crl/crlchain.pem /vault/config/crlchain.pem | ||
COPY --from=certs /root/ca/intermediate/private/vault.key.pem /vault/config/vault.key | ||
COPY --from=certs /root/ca/intermediate/certs/vault.cert.pem /vault/config/vault.cert | ||
COPY --from=certs /root/ca/intermediate/certs/ca-bundle.cert.pem /vault/config/certbundle.pem | ||
|
||
RUN mkdir /root/ca | ||
WORKDIR /root/ca | ||
COPY spec/acceptance/fixtures/root_ca_openssl.cnf /root/ca/openssl.cnf | ||
|
||
RUN mkdir certs crl newcerts private \ | ||
&& touch index.txt \ | ||
&& echo 1000 > serial | ||
RUN echo 1000 > /root/ca/crlnumber | ||
|
||
RUN openssl genrsa -out private/rootca.key.pem 4096 | ||
RUN openssl req -config openssl.cnf \ | ||
-key private/rootca.key.pem \ | ||
-new -x509 -days 7300 -sha256 -extensions v3_ca \ | ||
-subj "/CN=rootca" \ | ||
-out certs/rootca.cert.pem | ||
|
||
RUN mkdir /root/ca/intermediate | ||
COPY spec/acceptance/fixtures/intermediate_ca_openssl.cnf /root/ca/intermediate/openssl.cnf | ||
|
||
WORKDIR /root/ca/intermediate/ | ||
RUN mkdir certs crl csr newcerts private \ | ||
&& touch index.txt \ | ||
&& echo 1000 > serial | ||
RUN echo 1000 > /root/ca/intermediate/crlnumber | ||
|
||
WORKDIR /root/ca | ||
RUN openssl genrsa -out intermediate/private/intermediate.key.pem 4096 | ||
RUN openssl req -config intermediate/openssl.cnf -new -sha256 \ | ||
-key intermediate/private/intermediate.key.pem \ | ||
-subj "/CN=intermediateca" \ | ||
-out intermediate/csr/intermediate.csr.pem | ||
|
||
RUN openssl ca -config openssl.cnf -extensions v3_intermediate_ca \ | ||
-days 3650 -batch -notext -md sha256 \ | ||
-in intermediate/csr/intermediate.csr.pem \ | ||
-out intermediate/certs/intermediate.cert.pem | ||
|
||
RUN cat intermediate/certs/intermediate.cert.pem certs/rootca.cert.pem \ | ||
> intermediate/certs/ca-bundle.cert.pem | ||
|
||
RUN openssl genrsa -out intermediate/private/vault.key.pem 2048 | ||
RUN openssl req -config intermediate/openssl.cnf \ | ||
-key intermediate/private/vault.key.pem \ | ||
-subj "/CN=vault.local" \ | ||
-new -sha256 -out intermediate/csr/vault.csr.pem | ||
RUN openssl ca -config intermediate/openssl.cnf \ | ||
-extensions server_cert -days 375 -batch -notext -md sha256 \ | ||
-in intermediate/csr/vault.csr.pem \ | ||
-out intermediate/certs/vault.cert.pem | ||
|
||
RUN openssl ca -config intermediate/openssl.cnf \ | ||
-gencrl -out intermediate/crl/intermediate.crl.pem | ||
|
||
RUN openssl ca -config openssl.cnf \ | ||
-gencrl -out crl/rootca.crl.pem | ||
|
||
RUN cat intermediate/crl/intermediate.crl.pem crl/rootca.crl.pem > /vault/config/crlchain.pem | ||
RUN cp /root/ca/intermediate/private/vault.key.pem /vault/config/vault.key | ||
RUN cp /root/ca/intermediate/certs/vault.cert.pem /vault/config/vault.cert | ||
RUN cp /root/ca/intermediate/certs/ca-bundle.cert.pem /vault/config/certbundle.pem | ||
CMD ["server"] |
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