Commit 3efa2d97 authored by Stefano Alberto Russo's avatar Stefano Alberto Russo
Browse files

Finalized architecutre support including in the computing resources and new tasks.

parent 8a5b8e6f
Loading
Loading
Loading
Loading
+7 −7
Original line number Diff line number Diff line
@@ -134,7 +134,7 @@ to provide help, news and informations on your deployment. Or you can just ignor
                                     registry = 'docker.io',
                                     image    = 'sarusso/minimaldesktop',
                                     tag      = 'v0.2.0',
                                     arch = 'x86_64',
                                     arch = 'amd64',
                                     os = 'linux',
                                     interface_port     = '8590',
                                     interface_protocol = 'http',
@@ -149,7 +149,7 @@ to provide help, news and informations on your deployment. Or you can just ignor
                                     registry = 'docker.io',
                                     image    = 'sarusso/basicdesktop',
                                     tag      = 'v0.2.0',
                                     arch = 'x86_64',
                                     arch = 'amd64',
                                     os = 'linux',
                                     interface_port     = '8590',
                                     interface_protocol = 'http',
@@ -166,7 +166,7 @@ to provide help, news and informations on your deployment. Or you can just ignor
                                     registry = 'docker.io',
                                     image    = 'sarusso/jupyternotebook',
                                     tag      = 'v0.2.0',
                                     arch = 'x86_64',
                                     arch = 'amd64',
                                     os = 'linux',
                                     interface_port     = '8888',
                                     interface_protocol = 'http',
@@ -213,7 +213,7 @@ to provide help, news and informations on your deployment. Or you can just ignor
                                     registry = 'docker.io',
                                     image    = 'sarusso/ssh',
                                     tag      = 'v0.2.0',
                                     arch = 'x86_64',
                                     arch = 'amd64',
                                     os = 'linux',
                                     interface_port     = '22',
                                     interface_protocol = 'ssh',
@@ -263,7 +263,7 @@ to provide help, news and informations on your deployment. Or you can just ignor
                                     access_mode = 'internal',
                                     auth_mode = 'internal',
                                     wms = None,
                                     container_runtimes = 'docker')
                                     container_runtimes = ['docker'])

            
            # Demo standalone computing plus conf
@@ -274,7 +274,7 @@ to provide help, news and informations on your deployment. Or you can just ignor
                                                                 auth_mode = 'user_keys',
                                                                 wms = None,
                                                                 conf = {'host': 'slurmclusterworker-one'},
                                                                 container_runtimes = 'singularity')
                                                                 container_runtimes = ['singularity'])
    
            # Add testuser extra conf for this computing resource
            testuser.profile.add_extra_conf(conf_type = 'computing_user', object=demo_singlenode_computing, value= 'slurmtestuser')
@@ -287,7 +287,7 @@ to provide help, news and informations on your deployment. Or you can just ignor
                                                            auth_mode = 'user_keys',
                                                            wms = 'slurm',
                                                            conf = {'host': 'slurmclustermaster-main', 'default_partition': 'partition1'},
                                                            container_runtimes = 'singularity')
                                                            container_runtimes = ['singularity'])
           
            # Add testuser extra conf for this computing resource
            testuser.profile.add_extra_conf(conf_type = 'computing_user', object=demo_slurm_computing, value= 'slurmtestuser')
+18 −0
Original line number Diff line number Diff line
# Generated by Django 2.2.1 on 2021-11-21 13:41

from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('core_app', '0021_container_interface_auth_user'),
    ]

    operations = [
        migrations.RenameField(
            model_name='computing',
            old_name='container_runtimes',
            new_name='container_runtime',
        ),
    ]
+24 −0
Original line number Diff line number Diff line
# Generated by Django 2.2.1 on 2021-11-21 13:42

import django.contrib.postgres.fields.jsonb
from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('core_app', '0022_auto_20211121_1341'),
    ]

    operations = [
        migrations.RemoveField(
            model_name='computing',
            name='container_runtime',
        ),
        migrations.AddField(
            model_name='computing',
            name='container_runtimes',
            field=django.contrib.postgres.fields.jsonb.JSONField(default=['docker'], verbose_name='Container runtimes'),
            preserve_default=False,
        ),
    ]
+19 −0
Original line number Diff line number Diff line
# Generated by Django 2.2.1 on 2021-11-21 13:42

import django.contrib.postgres.fields.jsonb
from django.db import migrations


class Migration(migrations.Migration):

    dependencies = [
        ('core_app', '0023_auto_20211121_1342'),
    ]

    operations = [
        migrations.AddField(
            model_name='computing',
            name='emulated_archs',
            field=django.contrib.postgres.fields.jsonb.JSONField(blank=True, null=True, verbose_name='Emulated architectures'),
        ),
    ]
+13 −3
Original line number Diff line number Diff line
@@ -164,16 +164,21 @@ class Computing(models.Model):
    name        = models.CharField('Name', max_length=255, blank=False, null=False)
    description = models.TextField('Description', blank=True, null=True)

    # Tye (standalone / cluster)
    # Type (standalone / cluster) and arch
    type = models.CharField('Type', max_length=255, blank=False, null=False)
    arch = models.CharField('Architecture', max_length=255, blank=False, null=False)

    # Interfce and interaction definition
    access_mode = models.CharField('Access (control) mode', max_length=36, blank=False, null=False)
    auth_mode   = models.CharField('Auth mode', max_length=36, blank=False, null=False)
    wms         = models.CharField('Workload management system', max_length=36, blank=True, null=True)
    
    # Supported container runtimes
    container_runtimes = models.CharField('Container runtimes', max_length=256, blank=False, null=False) 
    # Supported container runtimes ['docker', 'singularity']
    container_runtimes = JSONField('Container runtimes', blank=False, null=False)
    #container_runtime = models.CharField('Container runtimes', max_length=256, blank=False, null=False)
 
    # Emulated architectures, by container runtime {'docker': ['arm64', 'amd']    
    emulated_archs = JSONField('Emulated architectures', blank=True, null=True) 

    # Conf
    conf = JSONField(blank=True, null=True)
@@ -203,6 +208,11 @@ class Computing(models.Model):
    def default_container_runtime(self):
        return str(self.container_runtimes).split(',')[0]
    
    @property
    def arch(self):
        return 'amd64'
    


    #=======================
    # Computing manager
Loading