-
Notifications
You must be signed in to change notification settings - Fork 42
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Run acceptance tests in travis #11
Merged
bastelfreak
merged 4 commits into
voxpupuli:master
from
tvpartytonight:run_acceptance_in_travis
Nov 30, 2018
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
95ad575
Run acceptance tests in travis
tvpartytonight a38e521
Refactor acceptance tests to use separate image for certs
tvpartytonight 61ee6c7
Allow for insecure (http) connections to vault
tvpartytonight 7cab293
Remove deprecated travis setting
tvpartytonight File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We normally try to generate the dokerfiles on the fly by using https://github.com/puppetlabs/beaker-hostgenerator, but this one looks pretty specific, so a custom file is fine. |
||
|
||
|
||
# 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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all the changes in this file need to go in the sync yaml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I manually just synced the added cell without using
pdk update
...is that ok?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't yet use pdk, we currently use https://github.com/voxpupuli/modulesync_config/ as template for our modules.