-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
46992bb
commit 9638768
Showing
8 changed files
with
121 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
name: Tests | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: 3.12.3 | ||
|
||
- name: Install dependencies | ||
# https://docs.github.com/en/free-pro-team@latest/actions/guides/building-and-testing-python#installing-dependencies | ||
# If installing a development version of constellation, use: | ||
# - pip3 install git+https://github.com/reside-ic/constellation@reside-62#egg=constellation | ||
run: | | ||
python -m pip install --upgrade setuptools pip wheel | ||
pip3 install pytest-cov pycodestyle codecov | ||
pip3 install -r requirements.txt | ||
- name: Tests | ||
run: | | ||
pytest --cov=src | ||
- name: Lint | ||
run: | | ||
pycodestyle . | ||
- name: Upload coverage to Codecov | ||
uses: codecov/codecov-action@v4 | ||
|
||
# TODO: build and push proxy (same model as packit) |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
.idea | ||
|
||
# Default Python .gitignore | ||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
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 |
---|---|---|
@@ -1,2 +1,35 @@ | ||
# daedalus-deploy | ||
Deploy tool for the Daedalus app | ||
|
||
## Installation | ||
Clone this repo and install dependencies with: | ||
``` | ||
pip3 install --user -r requirements.txt | ||
``` | ||
|
||
## Usage | ||
|
||
``` | ||
Usage: | ||
./daedalus start [--pull] [<configname>] | ||
./daedalus stop [--volumes] [--network] [--kill] [--force] | ||
./daedalus destroy | ||
./daedalus status | ||
./daedalus upgrade | ||
Options: | ||
--pull Pull images before starting | ||
--volumes Remove volumes (WARNING: irreversible data loss) | ||
--network Remove network | ||
--kill Kill the containers (faster, but possible db corruption) | ||
``` | ||
|
||
Once a configuration is set during `start`, it will be reused by subsequent commands | ||
(`stop`, `status`, `upgrade`, `user`, etc) and removed during destroy. | ||
The configuration usage information is stored in `config/.last_deploy.` | ||
|
||
## Deployment configurations | ||
There are three configurations | ||
- noproxy: for local testing | ||
- staging: for deployment onto our staging server at `daedalus.dev.dide.ic.ac.uk` | ||
- prod: tbd! |
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,22 @@ | ||
docker: | ||
network: daedalus | ||
api: | ||
image: | ||
repo: mrcide | ||
name: daedalus-api | ||
tag: latest | ||
port: 8001 | ||
db: | ||
image: | ||
repo: ghcr.io/jameel-institute | ||
name: daedalus-web-app-db | ||
# TODO: update to main when merged | ||
tag: jidea-59-dockerise-web-app | ||
port: 5432 | ||
web_app: | ||
image: | ||
repo: ghcr/jameel-institute | ||
name: daedalus-web-app | ||
# TODO: update to main when merged | ||
tag: jidea-59-dockerise-web-app | ||
port: 3000 |
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 @@ | ||
# Default config only for now |
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,10 @@ | ||
proxy: | ||
image: | ||
repo: ghcr.io/jameel-institute | ||
name: daedalus-proxy | ||
# TODO: update to main when merged | ||
tag: jidea-50 | ||
host: beebop-dev.dide.ic.ac.uk | ||
ssl: | ||
certificate: VAULT:secret/daedalus/ssl/staging:cert | ||
key: VAULT:secret/beebop/daedalus/ssl/staging:key |
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,5 @@ | ||
#!/usr/bin/env python3 | ||
from src.daedalus_cli import main | ||
|
||
if __name__ == "__main__": | ||
main() |
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,5 @@ | ||
constellation==1.0.0 | ||
docopt | ||
pytest | ||
timeago | ||
requests |