@@ -349,53 +349,7 @@ def get_crash_diagnostics(cloud_path, local_path, download_datasets):
349349
350350@octue_cli .group ()
351351def deploy ():
352- """Deploy a python app to the cloud as an Octue service or digital twin."""
353-
354-
355- @deploy .command ()
356- @click .option (
357- "-c" ,
358- "--service-config" ,
359- type = click .Path (exists = True , dir_okay = False ),
360- default = "octue.yaml" ,
361- show_default = True ,
362- help = "The path to an `octue.yaml` file defining the service to deploy." ,
363- )
364- @click .option ("--no-cache" , is_flag = True , help = "If provided, don't use the Docker cache when building the image." )
365- @click .option ("--update" , is_flag = True , help = "If provided, allow updates to an existing service." )
366- @click .option (
367- "--dataflow-job-only" ,
368- is_flag = True ,
369- help = "If provided, skip creating and running the build trigger and just deploy a pre-built image to Dataflow" ,
370- )
371- @click .option ("--image-uri" , type = str , default = None , help = "The actual image URI to use when creating the Dataflow job." )
372- @click .option (
373- "--revision-tag" ,
374- type = str ,
375- default = None ,
376- help = "A tag to use for this revision of the service (e.g. 1.3.7). This overrides the `OCTUE_SERVICE_REVISION_TAG` "
377- "environment variable if it's present. If this option isn't given and the environment variable isn't present, a "
378- "random 'cool name' tag is generated e.g 'curious-capybara'." ,
379- )
380- def dataflow (service_config , no_cache , update , dataflow_job_only , image_uri , revision_tag ):
381- """Deploy a python app to Google Dataflow as an Octue service or digital twin."""
382- if bool (importlib .util .find_spec ("apache_beam" )):
383- # Import the Dataflow deployer only if the `apache-beam` package is available (due to installing `octue` with
384- # the `dataflow` extras option).
385- from octue .cloud .deployment .google .dataflow .deployer import DataflowDeployer
386- else :
387- raise ImportWarning (
388- "To use this CLI command, you must install `octue` with the `dataflow` option e.g. "
389- "`pip install octue[dataflow]`"
390- )
391-
392- deployer = DataflowDeployer (service_config , revision_tag = revision_tag )
393-
394- if dataflow_job_only :
395- deployer .create_streaming_dataflow_job (image_uri = image_uri , update = update )
396- return
397-
398- deployer .deploy (no_cache = no_cache , update = update )
352+ """A collection of commands to aid deploying a python app to the cloud as an Octue service or digital twin."""
399353
400354
401355@deploy .command ()
0 commit comments