You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@liminal.apache.org by av...@apache.org on 2021/10/26 09:04:56 UTC

[incubator-liminal] branch master updated: [LIMINAL-84] create volume in liminal build

This is an automated email from the ASF dual-hosted git repository.

aviemzur pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-liminal.git


The following commit(s) were added to refs/heads/master by this push:
     new 5a4a060  [LIMINAL-84] create volume in liminal build
5a4a060 is described below

commit 5a4a0605b9e1094faa00f7044817d349d8f06674
Author: Lidor Ettinger <li...@gmail.com>
AuthorDate: Tue Oct 26 12:04:48 2021 +0300

    [LIMINAL-84] create volume in liminal build
---
 scripts/liminal | 22 +++++++---------------
 1 file changed, 7 insertions(+), 15 deletions(-)

diff --git a/scripts/liminal b/scripts/liminal
index c886592..a1c1760 100755
--- a/scripts/liminal
+++ b/scripts/liminal
@@ -65,7 +65,13 @@ def build(path):
     click.echo(f'Building liminal apps in {path}')
     if docker_is_running():
         liminal_apps_builder.build_liminal_apps(path)
-
+    configs = ConfigUtil(path).safe_load(is_render_variables=True,
+                                                      soft_merge=True)
+    for config in configs:
+        if config.get('volumes'):
+            logging.info(f'local volume is being created')
+            volume_util.create_local_volumes(config, os.path.dirname(
+                files_util.resolve_pipeline_source_file(config['name'])))
 
 def deploy_liminal_core_internal(liminal_home, clean):
     # noinspection PyTypeChecker
@@ -136,7 +142,6 @@ def deploy_liminal_apps(path, clean):
         pathlib.Path(target_yml_name).parent.mkdir(parents=True, exist_ok=True)
         shutil.copyfile(config_file, target_yml_name)
 
-
 def liminal_is_running():
     stdout, stderr = docker_compose_command('ps', [])
     return "liminal" in stdout
@@ -164,19 +169,6 @@ def logs(follow, tail):
             stdout, stderr = docker_compose_command('logs', [f'--tail={tail}'])
             logging.info(stdout)
 
-
-@cli.command("create", short_help="create a kubernetes local volume")
-@click.option('--local-volume-path', default=os.getcwd(),
-              help="folder containing liminal.yaml files")
-def create(local_volume_path):
-    click.echo("creating a kubernetes local volume")
-    configs = ConfigUtil(local_volume_path).safe_load(is_render_variables=True,
-                                                      soft_merge=True)
-    for config in configs:
-        volume_util.create_local_volumes(config, os.path.dirname(
-            files_util.resolve_pipeline_source_file(config['name'])))
-
-
 @cli.command("start",
              short_help="starts a local airflow in docker compose. should be run after deploy. " +
                         "Make sure docker is running on your machine")