Skip to content
Snippets Groups Projects
Commit 19c89256 authored by Nico Vermaas's avatar Nico Vermaas
Browse files

Merge branch 'SDC-743-add-workflow-parameters' into 'master'

added 2 fields to workflow

See merge request !262
parents eeab4d7e 1155ef3e
No related branches found
No related tags found
1 merge request!262added 2 fields to workflow
Pipeline #39454 passed
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<content url="file://$MODULE_DIR$"> <content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" /> <excludeFolder url="file://$MODULE_DIR$/venv" />
</content> </content>
<orderEntry type="jdk" jdkName="Python 3.7 (atdb-ldv) (2)" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="Python 3.10 (atdb-ldv) (2)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" /> <orderEntry type="sourceFolder" forTests="false" />
</component> </component>
<component name="PyDocumentationSettings"> <component name="PyDocumentationSettings">
......
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (atdb-ldv) (2)" project-jdk-type="Python SDK" /> <component name="ProjectRootManager" version="2" project-jdk-name="Python 3.10 (atdb-ldv) (2)" project-jdk-type="Python SDK" />
<component name="PyCharmProfessionalAdvertiser"> <component name="PyCharmProfessionalAdvertiser">
<option name="shown" value="true" /> <option name="shown" value="true" />
</component> </component>
......
...@@ -39,12 +39,10 @@ These diagrams show the current implementation and are kept up-to-date. ...@@ -39,12 +39,10 @@ These diagrams show the current implementation and are kept up-to-date.
### main GUI: ### main GUI:
* test: https://sdc-dev.astron.nl:5554/atdb/ * test: https://sdc-dev.astron.nl:5554/atdb/
* acc : http://dop457.astron.nl:5554/atdb/
* prod: https://sdc.astron.nl:5554/atdb/ * prod: https://sdc.astron.nl:5554/atdb/
### admin interface: ### admin interface:
* test: https://sdc-dev.astron.nl:5554/atdb/admin/ * test: https://sdc-dev.astron.nl:5554/atdb/admin/
* acc : http://dop457.astron.nl:5554/atdb/admin/
* prod: https://sdc.astron.nl:5554/atdb/admin/ * prod: https://sdc.astron.nl:5554/atdb/admin/
### REST API (prod) ### REST API (prod)
...@@ -65,29 +63,9 @@ Return the sum the sizes of all tasks with a given list of statusses ...@@ -65,29 +63,9 @@ Return the sum the sizes of all tasks with a given list of statusses
![](atdb/docs/ATDB-LDV%20-%20Deployment%20Diagram.png) ![](atdb/docs/ATDB-LDV%20-%20Deployment%20Diagram.png)
### CI/CD (semi) automatic deploy in Docker ### CI/CD (semi) automatic deploy in Docker
A gitlab CI/CD pipeline will automatically build and semi-automatically deploy ATDB on several targets, A gitlab CI/CD pipeline will automatically build after every commit.
depending on the name of the branch. Branches can be deployed to sdc-dev (test)
Master can be deployed to sdc-dev (test) or sdc (production)
* `master` => test: https://sdc-dev.astron.nl:5554/atdb/
* `acceptance`=> acceptance: http://dop457.astron.nl:5554/atdb/
* `release` => prod: https://sdc.astron.nl:5554/atdb/
The deploy step requires pushing the 'play' button in the gitlab pipelines section.
This is done to not have a mandatory deploy for every minor commmit.
## The Procedure:
* commit changes to 'feature branch'
* gitlab: merge with `master`
* pipeline will start running: https://git.astron.nl/astron-sdc/atdb-ldv/-/pipelines
* if 'passed' then click `>>` on the 'deploy' stage, this will deploy to test on sdc-dev
* gitlab: merge with `acceptance`
* pipeline will start running: https://git.astron.nl/astron-sdc/atdb-ldv/-/pipelines
* if 'passed' then click `>>` on the 'deploy' stage, this will deploy to acceptance on dop457
* gitlab: merge with `release`
* pipeline will start running: https://git.astron.nl/astron-sdc/atdb-ldv/-/pipelines
* if 'passed' then click `>>` on the 'deploy' stage, this will deploy to production on sdc
### Manual deploy in Docker (alternative to CI/CD) ### Manual deploy in Docker (alternative to CI/CD)
......
atdb/docs/ATDB-LDV Data Model.png

91.1 KiB | W: | H:

atdb/docs/ATDB-LDV Data Model.png

95.3 KiB | W: | H:

atdb/docs/ATDB-LDV Data Model.png
atdb/docs/ATDB-LDV Data Model.png
atdb/docs/ATDB-LDV Data Model.png
atdb/docs/ATDB-LDV Data Model.png
  • 2-up
  • Swipe
  • Onion skin
python manage.py makemigrations --settings=atdb.settings.dev
REM don't forget to add the new migration file to the repo (right click on the migration file, choose git -> add).
\ No newline at end of file
python manage.py migrate --settings=atdb.settings.dev
\ No newline at end of file
# Generated by Django 3.1.4 on 2022-10-21 09:09
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('taskdatabase', '0017_auto_20220412_1944'),
]
operations = [
migrations.AddField(
model_name='workflow',
name='default_parameters',
field=models.JSONField(blank=True, null=True),
),
migrations.AddField(
model_name='workflow',
name='description',
field=models.CharField(blank=True, max_length=500, null=True),
),
]
...@@ -8,12 +8,14 @@ from django.conf import settings ...@@ -8,12 +8,14 @@ from django.conf import settings
datetime_format_string = '%Y-%m-%dT%H:%M:%SZ' datetime_format_string = '%Y-%m-%dT%H:%M:%SZ'
class Workflow(models.Model): class Workflow(models.Model):
description = models.CharField(max_length=500, blank=True, null=True)
workflow_uri = models.CharField(unique=True, max_length=30, blank=True, null=True) workflow_uri = models.CharField(unique=True, max_length=30, blank=True, null=True)
repository = models.CharField(max_length=100, blank=True, null=True) repository = models.CharField(max_length=100, blank=True, null=True)
commit_id = models.CharField(max_length=15, blank=True, null=True) commit_id = models.CharField(max_length=15, blank=True, null=True)
path = models.CharField(max_length=100, blank=True, null=True) path = models.CharField(max_length=100, blank=True, null=True)
oi_size_fraction = models.FloatField(blank=True, null=True) oi_size_fraction = models.FloatField(blank=True, null=True)
meta_scheduling = models.JSONField(null=True, blank=True) meta_scheduling = models.JSONField(null=True, blank=True)
default_parameters = models.JSONField(null=True, blank=True)
def __str__(self): def __str__(self):
return str(self.id) return str(self.id)
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<table class="table table-striped"> <table class="table table-striped">
<tbody> <tbody>
<tr><td><b>id</b></td><td><a href="{% url 'workflow-detail-view-api' workflow.pk %}" target="_blank">{{ workflow.id }} </a></td></tr> <tr><td><b>id</b></td><td><a href="{% url 'workflow-detail-view-api' workflow.pk %}" target="_blank">{{ workflow.id }} </a></td></tr>
<tr><td><b>description</b></td><td>{{ workflow.description }}</td></tr>
<tr><td><b>uri</b></td><td>{{ workflow.workflow_uri }}</td></tr> <tr><td><b>uri</b></td><td>{{ workflow.workflow_uri }}</td></tr>
<tr><td><b>repository</b></td><td><a href="{{ workflow.repository }}" target="_blank">{{ workflow.repository }} </a></td></tr> <tr><td><b>repository</b></td><td><a href="{{ workflow.repository }}" target="_blank">{{ workflow.repository }} </a></td></tr>
<tr><td><b>commit_id</b></td><td>{{ workflow.commit_id }}</td></tr> <tr><td><b>commit_id</b></td><td>{{ workflow.commit_id }}</td></tr>
......
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
{% include 'taskdatabase/pagination.html' %} {% include 'taskdatabase/pagination.html' %}
</div> </div>
</div> </div>
<p class="footer"> Version 1.0.0 (20 oct 2022 - 14:00) <p class="footer"> Version 1.0.0 (21 oct 2022 - 11:00)
</div> </div>
......
...@@ -97,6 +97,7 @@ class WorkflowFilter(filters.FilterSet): ...@@ -97,6 +97,7 @@ class WorkflowFilter(filters.FilterSet):
model = Workflow model = Workflow
fields = { fields = {
'description': ['icontains'],
'repository': ['exact', 'icontains'], 'repository': ['exact', 'icontains'],
'commit_id': ['exact', 'icontains'], 'commit_id': ['exact', 'icontains'],
'path': ['exact', 'icontains'], 'path': ['exact', 'icontains'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment