Skip to content
This repository has been archived by the owner on Feb 21, 2022. It is now read-only.

Infrastructure mapping (Amazon, Rancher) #104

Merged
merged 3 commits into from
Sep 23, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ services:
worker:
environment:
DATABASE_URL: 'postgres://postgres:postgres@postgres/postgres'
GCP_SERVICE_KEY:
ZOO_AUDITING_CHECKS: dummy_standards
ZOO_DEBUG: '1'
ZOO_DATADOG_API_KEY:
Expand Down
2 changes: 2 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ services:
build: .
environment:
- DATABASE_URL
- GCP_SERVICE_KEY
- SECRET_KEY
- SENTRY_DSN
- SENTRY_PUBLIC_DSN
Expand Down Expand Up @@ -42,6 +43,7 @@ services:
command: [celery, worker, -A, zoo]
environment:
- DATABASE_URL
- GCP_SERVICE_KEY
- SECRET_KEY
- SENTRY_DSN
- SENTRY_PUBLIC_DSN
Expand Down
3 changes: 3 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
arrow
attrs
boto3
celery
celery-redbeat
colorama
Expand All @@ -14,11 +15,13 @@ django-extensions
django-silk
django-stronghold
dockerfile-parse
google-api-python-client
graphene
graphene-django
gunicorn[gevent]
hiredis
ipython
kubernetes
markdown
psycopg2
pygerduty
Expand Down
32 changes: 25 additions & 7 deletions requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,19 +2,21 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file requirements.txt requirements.in
# pip-compile requirements.in
#
amqp==2.5.1 # via kombu
aniso8601==7.0.0 # via graphene
appnope==0.1.0 # via ipython
arrow==0.15.1
attrs==19.1.0
autopep8==1.4.4 # via django-silk
backcall==0.1.0 # via ipython
billiard==3.6.1.0 # via celery
boto3==1.9.150
botocore==1.12.150 # via boto3, s3transfer
cachetools==3.1.1 # via google-auth
celery-redbeat==0.13.0
celery==4.3.0
certifi==2019.9.11 # via requests
certifi==2019.9.11 # via kubernetes, requests
chardet==3.0.4 # via requests
colorama==0.4.1
datadog==0.30.0
Expand All @@ -31,7 +33,11 @@ django-stronghold==0.3.0
django==2.2.5
djangoql==0.13.0
dockerfile-parse==0.0.15
docutils==0.14 # via botocore
gevent==1.4.0 # via gunicorn
google-api-python-client==1.7.10
google-auth-httplib2==0.0.3 # via google-api-python-client
google-auth==1.6.3 # via google-api-python-client, google-auth-httplib2, kubernetes
gprof2dot==2017.9.19 # via django-silk
graphene-django==2.5.0
graphene==2.1.8
Expand All @@ -40,13 +46,16 @@ graphql-relay==2.0.0 # via graphene
greenlet==0.4.15 # via gevent
gunicorn[gevent]==19.9.0
hiredis==1.0.0
httplib2==0.13.0 # via google-api-python-client, google-auth-httplib2
idna==2.8 # via requests
importlib-metadata==0.22 # via kombu
ipython-genutils==0.2.0 # via traitlets
ipython==7.8.0
jedi==0.15.1 # via ipython
jinja2==2.10.1 # via django-silk
jmespath==0.9.4 # via boto3, botocore
kombu==4.6.4 # via celery
kubernetes==10.0.0
markdown==3.1.1
markupsafe==1.1.1 # via jinja2
more-itertools==7.2.0 # via zipp
Expand All @@ -60,31 +69,40 @@ promise==2.2.1 # via graphene-django, graphql-core, graphql-relay
prompt-toolkit==2.0.9 # via ipython
psycopg2==2.8.3
ptyprocess==0.6.0 # via pexpect
pyasn1-modules==0.2.5 # via google-auth
pyasn1==0.4.5 # via pyasn1-modules, rsa
pycodestyle==2.5.0 # via autopep8
pygerduty==0.38.2
pygithub==1.43.8
pygments==2.4.2 # via django-silk, ipython
pyjwt==1.7.1 # via pygithub
python-dateutil==2.8.0 # via arrow, celery-redbeat, django-silk
python-dateutil==2.8.0 # via arrow, botocore, celery-redbeat, django-silk, kubernetes
python-gitlab==1.11.0
python3-openid==3.1.0 # via django-allauth
pytz==2019.2 # via celery, django, django-silk
pyyaml==5.1.2
raven==6.10.0
redis==3.3.8
requests-oauthlib==1.2.0 # via django-allauth
requests-oauthlib==1.2.0 # via django-allauth, kubernetes
requests==2.22.0
requirements-parser==0.2.0
rsa==4.0 # via google-auth
rx==1.6.1 # via graphql-core
s3transfer==0.2.0 # via boto3
singledispatch==3.4.0.3 # via graphene-django
six==1.12.0 # via django-extensions, dockerfile-parse, graphene, graphene-django, graphql-core, graphql-relay, promise, prompt-toolkit, pygerduty, python-dateutil, python-gitlab, singledispatch, structlog, tenacity, traitlets
six==1.12.0 # via django-extensions, dockerfile-parse, google-api-python-client, google-auth, graphene, graphene-django, graphql-core, graphql-relay, kubernetes, promise, prompt-toolkit, pygerduty, python-dateutil, python-gitlab, singledispatch, structlog, tenacity, traitlets, websocket-client
sqlparse==0.3.0 # via django, django-debug-toolbar, django-silk
structlog==19.1.0
tenacity==5.1.1 # via celery-redbeat
traitlets==4.3.2 # via ipython
urllib3==1.25.3 # via requests
uritemplate==3.0.0 # via google-api-python-client
urllib3==1.24.3 # via botocore, kubernetes, requests
vine==1.3.0 # via amqp, celery
wcwidth==0.1.7 # via prompt-toolkit
websocket-client==0.56.0 # via kubernetes
whitenoise==4.1.3
wrapt==1.11.2 # via deprecated
zipp==0.6.0 # via importlib-metadata

# The following packages are considered to be unsafe in a requirements file:
# setuptools==41.2.0 # via ipython, kubernetes, markdown
2 changes: 1 addition & 1 deletion test-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# This file is autogenerated by pip-compile
# To update, run:
#
# pip-compile --output-file test-requirements.txt test-requirements.in
# pip-compile test-requirements.in
#
apipkg==1.5 # via execnet
astroid==2.2.5 # via pylint
Expand Down
10 changes: 0 additions & 10 deletions test/api/query/snapshots/snap_test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,6 @@
}
}

snapshots['test_datacenter 1'] = {
'data': {
'node': {
'id': 'RGF0YUNlbnRlcjoxMA==',
'provider': 'kiwi',
'region': 'Oklahoma'
}
}
}

snapshots['test_service 1'] = {
'data': {
'node': {
Expand Down
111 changes: 0 additions & 111 deletions test/api/query/snapshots/snap_test_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,117 +103,6 @@
}
}

snapshots['test_with_datacenter 1'] = {
'data': {
'allServices': {
'edges': [
{
'node': {
'dashboardUrl': 'https://dashboard',
'datacenter': {
'id': 'RGF0YUNlbnRlcjoxOA==',
'provider': 'kiwi',
'region': 'Alaska'
},
'docsUrl': 'https://docsurl',
'healthCheckUrl': 'https://healtcheck',
'id': 'U2VydmljZTox',
'impact': 'profit',
'name': 'martinez',
'owner': 'michaelbennett',
'pagerdutyUrl': 'https://pagerduty',
'slackChannel': 'https://slackchannel',
'status': 'fixed'
}
},
{
'node': {
'dashboardUrl': 'https://dashboard',
'datacenter': {
'id': 'RGF0YUNlbnRlcjoxOQ==',
'provider': 'kiwi',
'region': 'Texas'
},
'docsUrl': 'https://docsurl',
'healthCheckUrl': 'https://healtcheck',
'id': 'U2VydmljZToy',
'impact': 'profit',
'name': 'alex',
'owner': 'amstrong',
'pagerdutyUrl': 'https://pagerduty',
'slackChannel': 'https://slackchannel',
'status': 'fixed'
}
},
{
'node': {
'dashboardUrl': 'https://dashboard',
'datacenter': {
'id': 'RGF0YUNlbnRlcjoyMA==',
'provider': 'kiwi',
'region': 'Kansas'
},
'docsUrl': 'https://docsurl',
'healthCheckUrl': 'https://healtcheck',
'id': 'U2VydmljZToz',
'impact': 'profit',
'name': 'artinez',
'owner': 'bennett',
'pagerdutyUrl': 'https://pagerduty',
'slackChannel': 'https://slackchannel',
'status': 'fixed'
}
},
{
'node': {
'dashboardUrl': 'https://dashboard',
'datacenter': {
'id': 'RGF0YUNlbnRlcjoyMQ==',
'provider': 'kiwi',
'region': 'Ohio'
},
'docsUrl': 'https://docsurl',
'healthCheckUrl': 'https://healtcheck',
'id': 'U2VydmljZTo0',
'impact': 'profit',
'name': 'john',
'owner': 'benneto',
'pagerdutyUrl': 'https://pagerduty',
'slackChannel': 'https://slackchannel',
'status': 'fixed'
}
},
{
'node': {
'dashboardUrl': 'https://dashboard',
'datacenter': {
'id': 'RGF0YUNlbnRlcjoyMzQyMw==',
'provider': 'kiwi',
'region': 'Arizona'
},
'docsUrl': 'https://docsurl',
'healthCheckUrl': 'https://healtcheck',
'id': 'U2VydmljZToxMg==',
'impact': 'profit',
'name': 'simmons-mitchell',
'owner': 'dedward',
'pagerdutyUrl': 'https://pagerduty',
'slackChannel': 'https://slackchannel',
'status': 'fixed'
}
}
],
'pageInfo': {
'endCursor': 'NQ==',
'hasNextPage': False,
'hasPreviousPage': False,
'startCursor': 'MQ=='
},
'totalCount': 5
}
}
}

snapshots['test_with_repository 1'] = {
'data': {
'allServices': {
Expand Down
18 changes: 0 additions & 18 deletions test/api/query/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,24 +95,6 @@ def test_repository(snapshot, call_api, repository_factory):
snapshot.assert_match(response)


def test_datacenter(snapshot, call_api, data_center_factory):
data_center_factory(id=10, provider="kiwi", region="Oklahoma")
id = to_global_id("DataCenter", 10)
query = f"""
query {{
node (id: "{id}") {{
... on DataCenter {{
id
provider
region
}}
}}
}}
"""
response = call_api(query)
snapshot.assert_match(response)


def test_dependency(snapshot, call_api, dependency_factory):
dependency_factory(id=10, name="Python", type="Language")
id = to_global_id("Dependency", 10)
Expand Down
Loading