Skip to content

Commit 38f6b35

Browse files
committed
Initial commit
0 parents  commit 38f6b35

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+16560
-0
lines changed

.gitignore

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
*~
2+
.*.swp
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
env/
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
.hypothesis/
50+
.pytest_cache/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
60+
# Flask stuff:
61+
instance/
62+
.webassets-cache
63+
64+
# Scrapy stuff:
65+
.scrapy
66+
67+
# Sphinx documentation
68+
docs/_build/
69+
70+
# PyBuilder
71+
target/
72+
73+
# Jupyter Notebook
74+
.ipynb_checkpoints
75+
76+
# pyenv
77+
.python-version
78+
79+
# celery beat schedule file
80+
celerybeat-schedule
81+
82+
# SageMath parsed files
83+
*.sage.py
84+
85+
# dotenv
86+
.env
87+
88+
# virtualenv
89+
.venv
90+
venv/
91+
ENV/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Simple Service Registry Demo
2+
3+
This repo stands up a simple service registry, extended with cohorts
4+
information.
5+
6+
Services are added to the registry by giving them a name and a URL;
7+
the service registry queries their `service-info` endpoint. If no
8+
cohort information is provided there, it queries a `cohorts` endpoint.
9+
Querying the service-
10+
11+
## Running
12+
13+
The stack can be run with:
14+
15+
```
16+
docker-compose up --build
17+
```
18+
19+
The UI will then be available at `http://localhost:2000`; the service
20+
registry can be queried directly at `http://localhost:2001`.
21+
22+
Services can be added to the service registry as follows:
23+
24+
```
25+
cd backend
26+
./add_service.py --database=data/services.sqlite [name] [base-url]
27+
```

backend/.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# http://editorconfig.org
2+
3+
root = true
4+
5+
[*]
6+
indent_style = space
7+
indent_size = 4
8+
trim_trailing_whitespace = true
9+
insert_final_newline = true
10+
charset = utf-8
11+
end_of_line = lf
12+
13+
[*.bat]
14+
indent_style = tab
15+
end_of_line = crlf
16+
17+
[LICENSE]
18+
insert_final_newline = false
19+
20+
[Makefile]
21+
indent_style = tab

backend/.gitignore

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
*~
2+
.*.swp
3+
# Byte-compiled / optimized / DLL files
4+
__pycache__/
5+
*.py[cod]
6+
*$py.class
7+
8+
# C extensions
9+
*.so
10+
11+
# Distribution / packaging
12+
.Python
13+
env/
14+
build/
15+
develop-eggs/
16+
dist/
17+
downloads/
18+
eggs/
19+
.eggs/
20+
lib/
21+
lib64/
22+
parts/
23+
sdist/
24+
var/
25+
wheels/
26+
*.egg-info/
27+
.installed.cfg
28+
*.egg
29+
30+
# PyInstaller
31+
# Usually these files are written by a python script from a template
32+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
33+
*.manifest
34+
*.spec
35+
36+
# Installer logs
37+
pip-log.txt
38+
pip-delete-this-directory.txt
39+
40+
# Unit test / coverage reports
41+
htmlcov/
42+
.tox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
.hypothesis/
50+
.pytest_cache/
51+
52+
# Translations
53+
*.mo
54+
*.pot
55+
56+
# Django stuff:
57+
*.log
58+
local_settings.py
59+
60+
# Flask stuff:
61+
instance/
62+
.webassets-cache
63+
64+
# Scrapy stuff:
65+
.scrapy
66+
67+
# Sphinx documentation
68+
docs/_build/
69+
70+
# PyBuilder
71+
target/
72+
73+
# Jupyter Notebook
74+
.ipynb_checkpoints
75+
76+
# pyenv
77+
.python-version
78+
79+
# celery beat schedule file
80+
celerybeat-schedule
81+
82+
# SageMath parsed files
83+
*.sage.py
84+
85+
# dotenv
86+
.env
87+
88+
# virtualenv
89+
.venv
90+
venv/
91+
ENV/
92+
93+
# Spyder project settings
94+
.spyderproject
95+
.spyproject
96+
97+
# Rope project settings
98+
.ropeproject
99+
100+
# mkdocs documentation
101+
/site
102+
103+
# mypy
104+
.mypy_cache/

backend/.nojekyll

Whitespace-only changes.

backend/.pyup.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# configure updates globally
2+
# default: all
3+
# allowed: all, insecure, False
4+
update: all
5+
6+
# configure dependency pinning globally
7+
# default: True
8+
# allowed: True, False
9+
pin: True
10+
11+
# set the default branch
12+
# default: empty, the default branch on GitHub
13+
branch: trunk
14+
15+
# update schedule
16+
# default: empty
17+
# allowed: "every day", "every week", ..
18+
# schedule: "every day"
19+
20+
# search for requirement files
21+
# default: True
22+
# allowed: True, False
23+
search: True
24+
25+
# add a label to pull requests, default is not set
26+
# requires private repo permissions, even on public repos
27+
# default: empty
28+
label_prs: update
29+
30+
# assign users to pull requests, default is not set
31+
# requires private repo permissions, even on public repos
32+
# default: empty
33+
assignees:
34+
- ljdursi
35+
36+
# configure the branch prefix the bot is using
37+
# default: pyup-
38+
branch_prefix: pyup-
39+
40+
# set a global prefix for PRs
41+
# default: empty
42+
# pr_prefix: "Bug #12345"
43+
44+
# allow to close stale PRs
45+
# default: True
46+
close_prs: True

backend/.travis.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Config file for automatic testing at travis-ci.org
2+
3+
4+
language: python
5+
python:
6+
- 3.7
7+
- 3.8
8+
9+
# packages for dredd
10+
addons:
11+
apt:
12+
packages:
13+
- nodejs
14+
- npm
15+
16+
branches:
17+
only:
18+
- trunk
19+
20+
# cache the node stuff for dredd, otherwise everything takes forever:
21+
cache:
22+
directories:
23+
- ~/node_modules
24+
- ~/.nvm
25+
26+
# Command to install dependencies, e.g. pip install -r requirements.txt --use-mirrors
27+
install:
28+
- pip install -r requirements.txt
29+
- pip install -r requirements_dev.txt
30+
- pip install -U tox-travis
31+
- npm install -g dredd
32+
33+
# Command to run tests, e.g. python setup.py test
34+
script: tox

backend/.vscode/settings.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"python.pythonPath": "/usr/local/opt/python/bin/python3.7"
3+
}

0 commit comments

Comments
 (0)