From 52022a3013e2bce6dc5b7e5fceacebe6051c9951 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thorsten=20M=C3=BCller?= Date: Mon, 5 Jul 2021 18:52:41 +0200 Subject: [PATCH] WIP: cobald tardis config --- roles/cobald/files/cobald-config/config.yaml | 31 +++++++++++++++ roles/cobald/files/cobald-config/tardis.yaml | 41 ++++++++++++++++++++ roles/cobald/tasks/main.yml | 10 +++-- 3 files changed, 78 insertions(+), 4 deletions(-) create mode 100644 roles/cobald/files/cobald-config/config.yaml create mode 100644 roles/cobald/files/cobald-config/tardis.yaml diff --git a/roles/cobald/files/cobald-config/config.yaml b/roles/cobald/files/cobald-config/config.yaml new file mode 100644 index 0000000..d210947 --- /dev/null +++ b/roles/cobald/files/cobald-config/config.yaml @@ -0,0 +1,31 @@ +--- +pipeline: +- __type__: cobald.controller.linear.LinearController + low_utilisation: 0.9 + high_allocation: 0.9 + rate: 0.10 +- !Limiter + minimum: 3 +- !TelegrafPipelineMonitor + poll: True +- !TardisPoolFactory + configuration: /etc/cobald/tardis.yaml +logging: + version: 1 + root: + level: DEBUG + handlers: [console, file] + handlers: + console: + class: logging.StreamHandler + formatter: test + level: DEBUG + stream: ext://sys.stderr + file: + class: logging.handlers.RotatingFileHandler + formatter: test + level: WARNING + filename: /var/log/cobald/cobald-tardis.log + formatters: + test: + format: " %(name)s %(message)s" diff --git a/roles/cobald/files/cobald-config/tardis.yaml b/roles/cobald/files/cobald-config/tardis.yaml new file mode 100644 index 0000000..ca313e6 --- /dev/null +++ b/roles/cobald/files/cobald-config/tardis.yaml @@ -0,0 +1,41 @@ +Plugins: + SqliteRegistry: + db_file: /tmp/drone_registry.db + TelegrafMonitoring: + host: ed-telegraf + port: 8094 +#BatchSystem: +# adapter: FakeBatchSystem +# allocation: 1.0 +# utilisation: !PeriodicValue +# period: 60 +# amplitude: 0.15 +# offset: 0.80 +## phase: 1. +# phase: 1.6 +# machine_status: Available +BatchSystem: + adapter: Slurm + max_age: 0.1 + options: + partition: cobald +Sites: +- name: slurmtest + adapter: Slurm + quota: 20 +slurmtest: + # executor: ... + StatusUpdate: 0.1 + MachineTypes: + - m1.a + MachineTypeConfiguration: + m1.a: + Walltime: 5 + Partition: container + StartupCommand: /usr/local/bin/start-drone + # SubmitOptions: ... + MachineMetaData: + m1.a: + Cores: 3 # cores + Memory: 1 # GB + Disk: 4 # not passed diff --git a/roles/cobald/tasks/main.yml b/roles/cobald/tasks/main.yml index fec950d..33fc7e5 100644 --- a/roles/cobald/tasks/main.yml +++ b/roles/cobald/tasks/main.yml @@ -32,13 +32,14 @@ owner: "{{unpriv_user}}" group: docker -- name: copy cobald config (does nothing yet) +- name: copy cobald config copy: src: cobald-config/ - dest: /container/volumes/cobald + dest: "~{{unpriv_user}}/cobald/" + force: False owner: "{{unpriv_user}}" group: docker - when: False + mode: "0644" - name: ensure network for cobald container exists docker_network: @@ -68,7 +69,7 @@ repo: https://github.com/thoto/cobald dest: "~{{unpriv_user}}/cobald-src" version: bugfix/mixed_construction_methods - update: no + update: no # FIXME become: yes become_user: "{{unpriv_user}}" register: cobald_git_pull @@ -78,6 +79,7 @@ repo: https://github.com/MatterMiners/tardis dest: "~{{unpriv_user}}/tardis-src" version: master + update: no # FIXME become: yes become_user: "{{unpriv_user}}" register: tardis_git_pull