Automic Workload Automation

  • 1.  Créer un job de manière automatqiue

    Posted Nov 17, 2017 09:09 AM
    Bonjour,

    je cherche une solution pour pouvoir créer un job de manière automatique avec un script par exemple.
    est ce que vous avez des idées sur ce sujet? 

    Merci la communauté !


  • 2.  Créer un job de manière automatqiue

    Posted Nov 20, 2017 02:50 AM
    Bonjour,

    il existe un pack avec divers exécutable java qui permettent d'effectuer énormément d'actions sur l'AE

    https://github.com/brendanSapience/UC4-Automic-AE-CLI-Binary-Repository

    il faudrait utiliser OBJECT_Create.jar

     java -jar /opt/Automic/Spec_Tools/AE_CLI/OBJECTS_Create.jar -h
    Program: Create Objects - Create Objects
    Version: 1.0.1_20170929212516

    usage: java -jar Command.jar [-check] [-commit] [-d_templates] [-folder <arg>] [-h] [-multi <arg>] [-name <arg>] [-template <arg>]

    ++ Parameters Are:

     -check            [OPTIONAL] - Check for preexisting Objects with same name

     -commit           [OPTIONAL] - Commit (Only Simulations run by default)

     -d_templates      [OPTIONAL] - Display all Templates available on Target System.

     -folder <arg>     [MANDATORY] (Text Value) - Existing folder where to create the Objects.

     -h                display help & Available Parameters.

     -multi <arg>      [OPTIONAL] (Integer Value) - Create X Instances of an Object.
     -name <arg>       [MANDATORY] (Text Value) - Filter by Name Of Object To Create.
     -template <arg>   [MANDATORY] (Text Value) - Template for Object (use -d_templates option to retrieve the list of templates available on your system.)

    Puis, JOBS_Update.jar pour créer le contenu du JOBS
    java -jar /opt/Automic/Spec_Tools/AE_CLI/JOBS_Update.jar  -h
     -- Error: Missing Mandatory Parameter: -name. Use -h for help.
    Program: JOBS - Update JOBS
    Version: 1.0.1_20170929212521

    usage: java -jar Command.jar [-commit] [-d_attr] [-d_docu] [-d_header] [-d_postprocess] [-d_preprocess] [-d_process] [-d_runtime] [-d_spec] [-d_stats] [-d_vars] [-f_active] [-f_arch1 <arg>] [-f_arch2 <arg>] [-f_genatruntime <arg>] [-f_host <arg>] [-f_login <arg>] [-f_mdataname <arg>] [-f_mdatavalue
           <arg>] [-f_name <arg>] [-f_postprocess <arg>] [-f_preprocess <arg>] [-f_process <arg>] [-f_queue <arg>] [-f_title <arg>] [-f_varname <arg>] [-f_varvalue <arg>] [-h] [-name <arg>] [-u_active <arg>] [-u_addmdata <arg>] [-u_addvar <arg>] [-u_arch1 <arg>] [-u_arch2 <arg>] [-u_cmd <arg>]
           [-u_deadelay <arg>] [-u_deamode <arg>] [-u_deastatus <arg>] [-u_delmdata <arg>] [-u_delvar <arg>] [-u_genatruntime <arg>] [-u_host <arg>] [-u_intaccount <arg>] [-u_login <arg>] [-u_maxruns <arg>] [-u_postprocess <arg>] [-u_postprocess_from_file <arg>] [-u_preprocess <arg>]
           [-u_preprocess_from_file <arg>] [-u_priority <arg>] [-u_process <arg>] [-u_process_from_file <arg>] [-u_queue <arg>] [-u_restore <arg>] [-u_restore_previous] [-u_timezone <arg>] [-u_title <arg>] [-u_updvar <arg>] [-u_ux_shell <arg>] [-u_ux_shell_options <arg>] [-u_win_workdir <arg>]

    ++ Parameters Are:

     -commit                          [OPTIONAL] - Commit (Only Simulations run by default)

     -d_attr                          [OPTIONAL] - Show Content of Attributes Tab.
     -d_docu                          [OPTIONAL] - Show Content of Documentation Tab.
     -d_header                        [OPTIONAL] - Show Content of Header Tab.
     -d_postprocess                   [OPTIONAL] - Show Content of PostProcess Tab.
     -d_preprocess                    [OPTIONAL] - Show Content of PreProcess Tab.
     -d_process                       [OPTIONAL] - Show Content of Process Tab.
     -d_runtime                       [OPTIONAL] - Show Content of Runtime Tab.
     -d_spec                          [OPTIONAL] - Show Content of Specific Tab.
     -d_stats                         [OPTIONAL] - Show Statistics.
     -d_vars                          [OPTIONAL] - Show Content of Variables & prompts Tab.

     -f_active                        [OPTIONAL] ("Y" or "N") - Filter by Active or Inactive State.
     -f_arch1 <arg>                   [OPTIONAL] (RegEx supported) - Filter by Archive key 1.
     -f_arch2 <arg>                   [OPTIONAL] (RegEx supported) - Filter by Archive Key 2.
     -f_genatruntime <arg>            [OPTIONAL] ("Y" or "N") - Filter by Generate at runtime.
     -f_host <arg>                    [OPTIONAL] (RegEx supported) - Filter by HOST.
     -f_login <arg>                   [OPTIONAL] (RegEx supported) - Filter by LOGIN.
     -f_mdataname <arg>               [OPTIONAL] (RegEx supported) - Filter by Metadata Name.
     -f_mdatavalue <arg>              [OPTIONAL] (RegEx supported) - Filter by Metadata Value.
     -f_name <arg>                    [OPTIONAL] (RegEx supported) - Filter by Name.
     -f_postprocess <arg>             [OPTIONAL] (RegEx supported) - Filter by keyword in PostProcess.
     -f_preprocess <arg>              [OPTIONAL] (RegEx supported) - Filter by keyword in PreProcess.
     -f_process <arg>                 [OPTIONAL] (RegEx supported) - Filter by keyword in Process.
     -f_queue <arg>                   [OPTIONAL] (RegEx supported) - Filter by QUEUE.
     -f_title <arg>                   [OPTIONAL] (RegEx supported) - Filter by TITLE.
     -f_varname <arg>                 [OPTIONAL] (RegEx supported) - Filter by Variable Name.
     -f_varvalue <arg>                [OPTIONAL] (RegEx supported) - Filter by Variable Value.

     -h                               display help & Available Parameters.

     -name <arg>                      [MANDATORY] ("*" and "?" supported) - Filter by Name.

     -u_active <arg>                  [OPTIONAL] ("Y" or "N") - Activate / Deactivate.
     -u_addmdata <arg>                [OPTIONAL] ("['Variable Name','Variable Value']") - Add Metadata Tag.
     -u_addvar <arg>                  [OPTIONAL] ("['Variable Name','Variable Value']") - Add Variable.
     -u_arch1 <arg>                   [OPTIONAL] ("['Old Pattern','New Pattern']") - Update Archive Key 1 value.
     -u_arch2 <arg>                   [OPTIONAL] ("['Old Pattern','New Pattern']") - Update Archive Key 2 value.
     -u_cmd <arg>                     [OPTIONAL] ("['Old Pattern','New Pattern']") - Update Command (Windows and Unix jobs only).
     -u_deadelay <arg>                [OPTIONAL] (Integer Value) - Set Deactivation Delay.
     -u_deamode <arg>                 [OPTIONAL] - EFEXEC or EFRESTART or NEVER or ALWAYS - Set Deactivation Mode.
     -u_deastatus <arg>               [OPTIONAL] (Text Value) - Set Deactivation Expected Status.
     -u_delmdata <arg>                [OPTIONAL] (Text Value) - Delete Metadata Tag.
     -u_delvar <arg>                  [OPTIONAL] (Text Value) - Delete Variable.
     -u_genatruntime <arg>            [OPTIONAL] ("Y" or "N") - Generate At Runtime.
     -u_host <arg>                    [OPTIONAL] ("['Old Pattern','New Pattern']") - Update HOST value.
     -u_intaccount <arg>              [OPTIONAL] ("['Old Pattern','New Pattern']") - Update Internal Account value.
     -u_login <arg>                   [OPTIONAL] ("['Old Pattern','New Pattern']") - Update LOGIN value.
     -u_maxruns <arg>                 [OPTIONAL] (Integer Value) - Max Parallel Runs.
     -u_postprocess <arg>             [OPTIONAL] ("['Old Pattern','New Pattern']") - Update PostProcess.
     -u_postprocess_from_file <arg>   [OPTIONAL] (File Name) - Update POSTPROCESS with content of file in parameter.
     -u_preprocess <arg>              [OPTIONAL] ("['Old Pattern','New Pattern']") - Update PreProcess.
     -u_preprocess_from_file <arg>    [OPTIONAL] (File Name) - Update PREPROCESS with content of file in parameter.
     -u_priority <arg>                [OPTIONAL] (Integer Value) - Update Priority.
     -u_process <arg>                 [OPTIONAL] ("['Old Pattern','New Pattern']") - Update PROCESS.
     -u_process_from_file <arg>       [OPTIONAL] (File Name) - Update PROCESS with content of file in parameter.
     -u_queue <arg>                   [OPTIONAL] ("['Old Pattern','New Pattern']") - Update QUEUE value.
     -u_restore <arg>                 [OPTIONAL] (Integer Value) - Restore a given Version.
     -u_restore_previous              [OPTIONAL] - Restore Previous Version.
     -u_timezone <arg>                [OPTIONAL] ("['Old Pattern','New Pattern']") - Update TIMEZONE value.
     -u_title <arg>                   [OPTIONAL] ("['Old Pattern','New Pattern']") - Update TITLE value.
     -u_updvar <arg>                  [OPTIONAL] ("['Variable Name','Variable Value']") - Update Variable Value.
     -u_ux_shell <arg>                [OPTIONAL] ("['Old Pattern','New Pattern']") - Update Shell (Unix jobs only).
     -u_ux_shell_options <arg>        [OPTIONAL] ("['Old Pattern','New Pattern']") - Update Shell Options (Unix jobs only).
     -u_win_workdir <arg>             [OPTIONAL] ("['Old Pattern','New Pattern']") - Update Work Directory (Windows jobs only).

    Il y à beaucoup d'option et de paramètre, c'est assez touffu et pour le moment, il n'y à pas de documentation officielle...

    Une autre option est de créer un jobs qui te serve de base et de l'exporter en format xml.
    Après il te faudra écrire des scripts dans un langage qui te convient ( python, perl, ksh, etc) pour le manipuler et éditier les différents champs.
    c'est aussi un gros boulot de cette manière...

    Cordialement,
    Didier


  • 3.  Créer un job de manière automatqiue

    Posted Nov 20, 2017 05:39 AM
    Bonjour Mohamed_Braim_8643,

    Une autre possibilité est d'utiliser l'API java - plus spécifiquement la classe "CreateObject":
    https://docs.automic.com/documentation/webhelp/english/ALL/components/AE/latest/API/index.html

    La CLI dont Didier parle a été développée par brendan_sapience_automic. Elle s'appuie sur cette API java.

    Cordialement,
    Antoine