mirror of
https://github.com/puppetlabs/infinitory.git
synced 2026-01-26 02:08:41 -05:00
Add Docker file and generate wrapper
This commit is contained in:
parent
e1c051df54
commit
854daa0d46
3 changed files with 31 additions and 0 deletions
8
CODEOWNERS
Normal file
8
CODEOWNERS
Normal file
|
|
@ -0,0 +1,8 @@
|
|||
# This will cause InfraCore to be assigned review of any opened PRs against
|
||||
# the branches containing this file.
|
||||
# See https://help.github.com/en/articles/about-code-owners for info on how to
|
||||
# take ownership of parts of the code base that should be reviewed by another
|
||||
# team.
|
||||
|
||||
* @puppetlabs/infracore
|
||||
|
||||
6
Dockerfile
Normal file
6
Dockerfile
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
FROM python:3
|
||||
ADD generate.py /
|
||||
RUN pip install --upgrade pip
|
||||
#RUN pip install --upgrade --extra-index-url https://artifactory.delivery.puppetlabs.net/artifactory/api/pypi/pypi/simple infinitory
|
||||
RUN pip install git+git://github.com/puppetlabs/infinitory.git@setup_fixup
|
||||
CMD [ "python", "generate.py", "pe-master-infranext-prod-1.infc-aws.puppet.net" ]
|
||||
17
generate.py
Executable file
17
generate.py
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import sys
|
||||
import subprocess
|
||||
|
||||
if len(sys.argv) == 1:
|
||||
puppetdb = 'localhost'
|
||||
elif len(sys.argv) == 2:
|
||||
puppetdb = sys.argv[1]
|
||||
else:
|
||||
sys.exit("Expected 1 or 0 arguments. Got {}.".format(len(sys.argv) - 1))
|
||||
|
||||
# Generate the report
|
||||
subprocess.check_call(
|
||||
["infinitory", "--host", "{}".format(puppetdb),
|
||||
"--output", "/srv/infinitory/output"],
|
||||
timeout=120)
|
||||
Loading…
Add table
Add a link
Reference in a new issue