forked from krysopath/vaultify
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
187 additions
and
52 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# test files | ||
tests/new* | ||
|
||
# security | ||
secring.* | ||
|
||
|
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,20 +1,39 @@ | ||
FROM python:3.6.4-alpine3.7 as production | ||
ARG BASE_IMAGE | ||
|
||
FROM python:$BASE_IMAGE as developement | ||
WORKDIR /code | ||
COPY requirements.txt . | ||
|
||
RUN mkdir secrets \ | ||
RUN mkdir secrets assets\ | ||
&& apk add --no-cache \ | ||
gnupg\ | ||
openssl\ | ||
make\ | ||
&& pip3 install -r requirements.txt\ | ||
&& adduser -D vaultify\ | ||
&& chown vaultify . | ||
|
||
COPY ./Makefile Makefile | ||
COPY ./vaultify vaultify | ||
COPY ./entry.py entry.py | ||
|
||
COPY ./setup.py setup.py | ||
COPY ./tests tests | ||
COPY ./runtests.py runtests.py | ||
RUN make run/tests | ||
RUN make artifact/pkg | ||
USER vaultify | ||
|
||
ENTRYPOINT ["python3"] | ||
CMD ["/code/entry.py"] | ||
CMD ["/code/entry.py", "{*}"] | ||
|
||
FROM python:$BASE_IMAGE as production | ||
WORKDIR /code | ||
COPY --from=0 /code/dist/vaultify*.whl /code/ | ||
COPY --from=0 /code/requirements.txt . | ||
RUN mkdir secrets assets\ | ||
&& apk add --no-cache \ | ||
gnupg\ | ||
openssl\ | ||
&& pip3 install -r requirements.txt\ | ||
&& pip3 install vaultify*.whl\ | ||
&& adduser -D vaultify\ | ||
&& chown vaultify . | ||
USER vaultify | ||
ENTRYPOINT ["vaultify"] |
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,20 +1,56 @@ | ||
TARGET := production | ||
BASE_IMAGE := 3.7-alpine3.7 | ||
|
||
run/test: | ||
ci: run/tests\ | ||
artifact/pkg\ | ||
artifact/docker\ | ||
artifact/tag | ||
|
||
dev/ci: | ||
ls vaultify/*py Dockerfile .vaultify.yml | entr -s 'make ci' | ||
|
||
artifact/pkg: | ||
python3 setup.py sdist bdist_wheel | ||
|
||
artifact/docker: Dockerfile | ||
docker build \ | ||
--build-arg BASE_IMAGE=$(BASE_IMAGE)\ | ||
-t vaultify:$(shell git rev-parse --short HEAD)\ | ||
--target $(TARGET)\ | ||
. | ||
docker tag\ | ||
vaultify:$(shell git rev-parse --short HEAD)\ | ||
vaultify:$(shell git describe --abbrev=0 --tags)-py$(BASE_IMAGE) | ||
|
||
artifact/tag: | ||
docker tag\ | ||
vaultify:$(shell git rev-parse --short HEAD)\ | ||
vaultify:$(shell git describe --abbrev=0 --tags) | ||
|
||
run/tests: | ||
rm -rf tests/new* assets/* | ||
gpg \ | ||
--symmetric\ | ||
--batch\ | ||
--passphrase=abc\ | ||
-o assets/test.gpg\ | ||
tests/secrets.env | ||
|
||
openssl enc \ | ||
-k abc \ | ||
-aes-256-cbc \ | ||
-salt \ | ||
-a \ | ||
-in tests/secrets.env \ | ||
-out assets/test.enc | ||
|
||
VAULTIFY_LOG_LEVEL=WARNING python3 runtests.py | ||
|
||
manual: | ||
@groff -man -Tascii man/vaultify.1 | ||
|
||
dev/install/packaging: | ||
python3 -m pip install --user --upgrade pip setuptools wheel | ||
|
||
dev/install/os: | ||
sudo apt-get install gnupg openssl |
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 |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
import sys | ||
from vaultify import main | ||
|
||
if __name__ == "__main__": | ||
|
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,2 @@ | ||
[metadata] | ||
description-file = README.md |
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,23 @@ | ||
#!/usr/bin/env python3 | ||
""" | ||
run setup for vaultify | ||
""" | ||
from setuptools import setup | ||
|
||
setup( | ||
name='vaultify', | ||
packages=['vaultify'], | ||
version='2.0.0', | ||
description='A hexagon of secret provisoning', | ||
author='Georg vom Endt', | ||
author_email='[email protected]', | ||
url='https://github.com/krysopath/vaultify', | ||
download_url='https://github.com/author/repo/tarball/2.0.0', | ||
keywords=['vault', 'gpg', 'secrets', 'docker', 'cli'], | ||
entry_points={ | ||
'console_scripts': [ | ||
'vaultify=vaultify.vaultify:main', | ||
], | ||
}, | ||
classifiers=[], | ||
) |
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
Oops, something went wrong.