From 8cc3b9e6c1e41a7a13a889d0d27b05704d684d46 Mon Sep 17 00:00:00 2001
From: Stefano Alberto Russo <stefano.russo@gmail.com>
Date: Fri, 1 Jul 2022 13:27:11 +0200
Subject: [PATCH] Bugfixes in the populate.

---
 rosetta/populate                              |  2 +-
 .../management/commands/core_app_populate.py  | 28 ++++++++++---------
 2 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/rosetta/populate b/rosetta/populate
index 04b42bb..53228f9 100755
--- a/rosetta/populate
+++ b/rosetta/populate
@@ -6,4 +6,4 @@ if [ ! -d ./services ]; then
     exit 1
 fi
 
-rosetta/shell webapp "cd /opt/code && source /env.sh && source /db_conf.sh && BACKEND_LOG_LEVEL=ERROR python3 manage.py core_app_populate"
+rosetta/shell webapp "cd /opt/code && source /env.sh && BACKEND_LOG_LEVEL=ERROR python3 manage.py core_app_populate"
diff --git a/services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py b/services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py
index 731ba0b..6f5ae70 100644
--- a/services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py
+++ b/services/webapp/code/rosetta/core_app/management/commands/core_app_populate.py
@@ -272,7 +272,7 @@ to provide help, news and informations on your deployment. Or you can just ignor
 
             
             # Demo standalone computing plus conf
-            demo_singlenode_computing = Computing.objects.create(name = 'Demo Standalone',
+            demo_standalone_computing = Computing.objects.create(name = 'Demo Standalone',
                                                                  description = 'A demo standalone computing resource.',
                                                                  type = 'standalone',
                                                                  arch = 'amd64',
@@ -283,20 +283,22 @@ to provide help, news and informations on your deployment. Or you can just ignor
                                                                  conf = {'host': 'standaloneworker'},
                                                                  container_engines = ['podman','singularity'])
 
+            # Add testuser extra conf for this computing resource
+            testuser.profile.add_extra_conf(conf_type = 'computing_user', object=demo_standalone_computing, value= 'testuser')
+
+
             # Demo standalone platform computing plus conf
-            demo_singlenode_computing = Computing.objects.create(name = 'Demo Standalone Platform',
-                                                                 description = 'A demo standalone computing resource access as platform.',
-                                                                 type = 'standalone',
-                                                                 arch = 'amd64',
-                                                                 supported_archs = ['386'],
-                                                                 access_mode = 'ssh+cli',
-                                                                 auth_mode = 'platform_keys',
-                                                                 wms = None,
-                                                                 conf = {'host': 'standaloneworker', 'user': 'rosetta'},
-                                                                 container_engines = ['podman','singularity'])
+            demo_standalone_computing_platform = Computing.objects.create(name = 'Demo Standalone Platform',
+                                                                          description = 'A demo standalone computing resource access as platform.',
+                                                                          type = 'standalone',
+                                                                          arch = 'amd64',
+                                                                          supported_archs = ['386'],
+                                                                          access_mode = 'ssh+cli',
+                                                                          auth_mode = 'platform_keys',
+                                                                          wms = None,
+                                                                          conf = {'host': 'standaloneworker', 'user': 'rosetta'},
+                                                                          container_engines = ['podman','singularity'])
 
-            # Add testuser extra conf for this computing resource
-            testuser.profile.add_extra_conf(conf_type = 'computing_user', object=demo_singlenode_computing, value= 'testuser')
 
             #  Demo cluster computing plus conf
             demo_slurm_computing = Computing.objects.create(name = 'Demo Cluster',
-- 
GitLab