@@ -492,6 +492,14 @@ def create_vm(self, args) -> None:
492492
493493 envs = parse_env_file (args .env_file )
494494
495+ # Read user config file if provided
496+ user_config = ""
497+ if args .user_config :
498+ if not os .path .exists (args .user_config ):
499+ raise Exception (f"User config file not found: { args .user_config } " )
500+ with open (args .user_config , 'r' ) as f :
501+ user_config = f .read ()
502+
495503 # Create VM request
496504 params = {
497505 "name" : args .name ,
@@ -501,6 +509,7 @@ def create_vm(self, args) -> None:
501509 "memory" : args .memory ,
502510 "disk_size" : args .disk ,
503511 "app_id" : args .app_id ,
512+ "user_config" : user_config ,
504513 "ports" : [parse_port_mapping (port ) for port in args .port or []],
505514 "hugepages" : args .hugepages ,
506515 "pin_numa" : args .pin_numa ,
@@ -885,6 +894,8 @@ def main():
885894 '--disk' , type = parse_disk_size , default = 20 , help = 'Disk size (e.g. 1G, 100M)' )
886895 deploy_parser .add_argument (
887896 '--env-file' , help = 'File with environment variables to encrypt' , default = None )
897+ deploy_parser .add_argument (
898+ '--user-config' , help = 'Path to user config file' , default = None )
888899 deploy_parser .add_argument ('--app-id' , help = 'Application ID' , default = None )
889900 deploy_parser .add_argument ('--port' , action = 'append' , type = str ,
890901 help = 'Port mapping in format: protocol[:address]:from:to' )
0 commit comments