the-zoo

所属分类:前端开发
开发工具:Python
文件大小:2872KB
下载次数:0
上传日期:2021-11-03 13:49:11
上 传 者sh-1993
说明:  人类服务注册中心
(A service registry for humans)

文件列表:
.adr-dir (4, 2021-11-03)
.bentoignore (1059, 2021-11-03)
.coveragerc (93, 2021-11-03)
.dockerignore (242, 2021-11-03)
.editorconfig (235, 2021-11-03)
.markdownlint.yml (112, 2021-11-03)
.misc (0, 2021-11-03)
.misc\gunicorn_config.py (736, 2021-11-03)
.pre-commit-config.yaml (1363, 2021-11-03)
.pydocstyle (214, 2021-11-03)
.relint.yml (510, 2021-11-03)
.yamllint (52, 2021-11-03)
Dockerfile (1354, 2021-11-03)
LICENSE (1065, 2021-11-03)
MANIFEST.in (23, 2021-11-03)
Makefile (793, 2021-11-03)
adr (0, 2021-11-03)
adr\0001-record-architecture-decisions.md (498, 2021-11-03)
adr\0002-use-black-code-formatter.md (406, 2021-11-03)
adr\0003-save-adrs-into-adr-dir.md (416, 2021-11-03)
adr\0004-graphql-api.md (563, 2021-11-03)
adr\0005-semantic-ui.md (1300, 2021-11-03)
adr\0006-fomantic-ui.md (1166, 2021-11-03)
adr\0007-conventional-commits.md (1328, 2021-11-03)
base.nix (1163, 2021-11-03)
docker-compose.yml (2748, 2021-11-03)
docs (0, 2021-11-03)
docs\CODEOWNERS (63, 2021-11-03)
docs\Makefile (604, 2021-11-03)
docs\conf.py (4748, 2021-11-03)
docs\gitlab_auth_local.rst (491, 2021-11-03)
docs\index.rst (5189, 2021-11-03)
... ...

# zoo A smart service catalogue providing an overview of your services' development and operations. [![Python: 3.8](https://img.shields.io/badge/python-3.8-blue.svg)](https://python.org) [![Code style: black](https://img.shields.io/badge/code%20style-black-black.svg)](https://github.com/ambv/black) ![Release](https://github.com/kiwicom/the-zoo/workflows/Release/badge.svg) ![Service Detail](docs/screenshot-service-details.png) | What | Where | | ---------- | ------------------------------------------------- | | Discussion | [#the-zoo on Discord](https://discord.gg/Tx9FkEz) | | Maintainer | [Alex Viscreanu](https://github.com/aexvir/) | ## What is The Zoo A microservice catalogue that allows performing static code checks and integrates with third party services like Sentry, Datadog or Pingdom. On top of that we have built a configurable static code analysis module that allows writing your own code checks and The Zoo will keep track of the evolution of those issues. The checks can also be integrated in CI so it can show how the Pull Request affects the status of the issues. The Zoo also provides analytics about how dependency usage and its versions evolve. ## Development ### Initial setup - Create a database: `$ make migrate` - Create a superuser and fake data: `$ make fake` - Create `.env` file as documented below ### How to run - Run in debug mode: `$ make run` - Stop: `$ make stop` - Stop and/or delete data: `$ make destroy` - Django shell: `$ make shell` - Containers logs: `$ docker-compose logs` - Generate fake data + superuser `$ make fake` Access web locally: - Web is running on port `20966` - Login at with your superuser account - Access zoo at ### Database changes - Generate database migrations: `$ make makemigrations` - Update the database when needed: `$ make migrate` ### Notes Check `Makefile` for shell commands if you want to run them with modified parameters. ### Local .env file Creating a local `.env` file (see [Docker docs](https://docs.docker.com/compose/env-file/) on `.env` files) is necessary for some components in the app to work correctly, a basic example of such file contains the following: ``` ZOO_DEBUG=1 ZOO_GITHUB_TOKEN=... ZOO_GITLAB_TOKEN=... ZOO_GITLAB_URL=https://gitlab.com ``` Version control tokens only need read access to repositories. For local setup of gitlab auth check [here](docs/gitlab_auth_local.rst) ## Testing Run all tests: `$ make test` Tests are run by `tox`. In order to run only unit tests or a specific test file you need to use the `pytest` binary from the `.tox/tests/bin/` folder. This folder will be created after running tests for the first time. ### Testing requirements PostgreSQL is needed for running the integration tests, you can install it by running `brew install postgres` Note that this includes running `dockerfile_lint` and `remark`, which you can get with `npm install -g dockerfile_lint remark-cli`. Also note that tox doesn't know when you change the `requirements.txt` and won't automatically install new dependencies for test runs. Run `pip install tox-battery` to install a plugin which fixes this silliness. If you want to pass some env vars to environment, you can list them in env var `TOX_TESTENV_PASSENV`. For example if you want to use custom database for tests, you can run: `TEST_DATABASE_URL=postgres://... TOX_TESTENV_PASSENV=TEST_DATABASE_URL tox` ## Configuration for repositories Repositories scanned by the Zoo may contain the `.zoo.yml` file. This file contains additional information about the scanned repository and how and where it's used in production. If the Zoo finds this file in the root of the project, it will read it and create a Service or a Library within the Zoo with the provided information based on the collected data automatically. Otherwise the data have to be added to the Zoo manually. Here is an example of this file: ```yaml type: service name: hello-world-service owner: booking impact: profit status: beta docs_url: 'https://example.com/hello-world-service' slack_channel: 'http://example.com/slack/channel' sentry_project: 'http://example.com/sentry/hello-world-service' sonarqube_project: hello-world-service pagerduty_url: 'https://example.com/pager/hello-world-service' tags: - tag1 - tag2 - tag3 environments: - name: staging dashboard_url: 'https://staging.example.com/dashboard' service_urls: - 'https://staging.example.com/service' health_check_url: 'https://staging.example.com/health_check' - name: production dashboard_url: 'https://production.example.com/dashboard' service_urls: - 'https://production.example.com/service' health_check_url: 'https://production.example.com/health_check' ``` Full schema for this file can be found in [zoo_yml.py](zoo/repos/zoo_yml.py) ## Documentation ### Architecture Decision Records We document architecture decisions like it's described in [this article](http://thinkrelevance.com/blog/2011/11/15/documenting-architecture-decisions). Records are in dir `adr`. We are using [ADR Tools](https://github.com/npryce/adr-tools) for working with them. ### Documentation for users We use [Sphinx](http://www.sphinx-doc.org/) for generating documentation. Docs are in dir `docs`. Setup virtual enviroment and install there `docs-requirements.txt`. Then you can use shortcuts: - Build docs: `$ make build-docs` - Open docs: `$ make open-docs`

近期下载者

相关文件


收藏者