This repository has been archived by the owner on Oct 10, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
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
Matthew Wilson
committed
Feb 26, 2019
1 parent
db78c6f
commit fefc397
Showing
18 changed files
with
622 additions
and
95 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
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,75 @@ | ||
SIP: Simple Intel Platform | ||
========================== | ||
|
||
Run the included setup script to begin configuration. | ||
|
||
:: | ||
|
||
./setup.py | ||
|
||
The setup script will walk you through: | ||
|
||
- Creating dev/test/production Docker environments | ||
- Setting the MySQL root user password | ||
- Creating a non-root MySQL user and password | ||
- Creating an optional self-signed HTTPS certificate | ||
|
||
Once you answer the setup script's questions, it will generate files | ||
containing the environment variables for the MySQL and Flask Docker | ||
containers. | ||
|
||
**MAKE SURE TO NOTE THE ADMIN PASSWORD REPORTED BY THE SETUP SCRIPT!** | ||
|
||
If you created a dev or a production environment, their containers will | ||
be built and initialized with the default database values specified in | ||
the setup.ini file: | ||
|
||
:: | ||
|
||
services/web/etc/setup.ini | ||
|
||
To run the unit/integration tests: | ||
---------------------------------- | ||
|
||
NOTE: A separate test Docker environment will be automatically built if | ||
you chose to build either a dev or production environment. | ||
|
||
:: | ||
|
||
bin/test.sh | ||
|
||
To initialize DB migrations (Flask-Migrate): | ||
-------------------------------------------- | ||
|
||
Note: This should only be performed for the DEV environment. | ||
|
||
:: | ||
|
||
bin/db-init-DEV.sh | ||
|
||
To generate DB migrations (Flask-Migrate): | ||
------------------------------------------ | ||
|
||
Note: This should only be performed for the DEV environment. | ||
|
||
:: | ||
|
||
bin/db-migrate-DEV.sh | ||
|
||
To upgrade the DB (Flask-Migrate): | ||
---------------------------------- | ||
|
||
Note: This can be performed on either the DEV or PROD environment. | ||
|
||
:: | ||
|
||
bin/db-upgrade-DEV.sh | ||
bin/db-upgrade-PROD.sh | ||
|
||
To enter a shell into one of the docker containers: | ||
--------------------------------------------------- | ||
|
||
:: | ||
|
||
docker exec -i -t sip_web-dev_1 /bin/sh | ||
docker exec -i -t <container_name> /bin/sh |
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,19 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line. | ||
SPHINXOPTS = | ||
SPHINXBUILD = sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
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,8 @@ | ||
API | ||
*** | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
:caption: Contents: | ||
|
||
Alert <api/alert> |
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,58 @@ | ||
Alerts | ||
****** | ||
|
||
.. contents:: | ||
:backlinks: none | ||
|
||
Summary | ||
------- | ||
|
||
.. qrefflask:: project:create_app() | ||
:endpoints: api.create_alert, api.read_alert, api.read_alerts, api.update_alert, api.delete_alert | ||
:order: path | ||
|
||
Create | ||
------ | ||
|
||
**JSON Schema** | ||
|
||
Required parameters are in **bold**. | ||
|
||
.. jsonschema:: ../../project/api/schemas/alert_create.json | ||
|
||
| | ||
.. autoflask:: project:create_app() | ||
:endpoints: api.create_alert | ||
|
||
Read Single | ||
----------- | ||
|
||
.. autoflask:: project:create_app() | ||
:endpoints: api.read_alert | ||
|
||
Read Multiple | ||
------------- | ||
|
||
.. autoflask:: project:create_app() | ||
:endpoints: api.read_alerts | ||
|
||
Update | ||
------ | ||
|
||
**JSON Schema** | ||
|
||
Required parameters are in **bold**. | ||
|
||
.. jsonschema:: ../../project/api/schemas/alert_update.json | ||
|
||
| | ||
.. autoflask:: project:create_app() | ||
:endpoints: api.update_alert | ||
|
||
Delete | ||
------ | ||
|
||
.. autoflask:: project:create_app() | ||
:endpoints: api.delete_alert |
Oops, something went wrong.