Add Scripts

<p class="shortdesc">You can add some common scripts and commands to OSP for convenient management and call. </p> <section class="section context" id="addscript__context_bml_nw3_dkb"><div class="tasklabel"><h2 class="doc-tairway">About this task</h2></div> <p class="p">With the script execution function, you can execute certain operations in batch, including changing the configuration of the host (such as the host name and IP address). The function of adding scripts enables you to add some common configuration scripts to the system. </p> </section> <section><div class="tasklabel"><h2 class="doc-tairway">Procedure</h2></div><ol class="ol steps"><li class="li step stepexpand"> <span class="ph cmd">Log in to the <a class="xref" href="https://pinganyun.com/console/osp" target="_blank">Operation System Platform Console</a>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">In the left navigation pane, click <span class="ph menucascade"><span class="ph uicontrol">Basic Configuration</span><abbr title="and then"> > </abbr><span class="ph uicontrol">Host Instance</span></span>.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="keyword wintitle">User Script</span> page, click <span class="ph uicontrol">Create</span> in the upper-right corner.</span> </li><li class="li step stepexpand"> <span class="ph cmd">On the <span class="keyword wintitle">Add script</span> page, complete the following configuration. </span> <div class="itemgroup info"> <img class="image" id="addscript__image_q3p_bhr_bkb" src="https://obs-cn-shanghai.yun.pingan.com/pcp-portal/20201407174753-1283ba1b9eae.png" width="600"> <table class="table frame-all" id="addscript__table_ucs_chr_bkb"><caption></caption><colgroup><col style="width:24.87562189054727%"><col style="width:75.12437810945275%"></colgroup><thead class="thead"> <tr class="row"> <th class="entry" id="addscript__table_ucs_chr_bkb__entry__1">Configuration Item</th> <th class="entry" id="addscript__table_ucs_chr_bkb__entry__2">Description</th> </tr> </thead><tbody class="tbody"> <tr class="row"> <td class="entry" headers="addscript__table_ucs_chr_bkb__entry__1 "> <p class="p"><span class="ph uicontrol">Name </span></p> </td> <td class="entry" headers="addscript__table_ucs_chr_bkb__entry__2 "><p class="p">About the script execution task name.</p></td> </tr> <tr class="row"> <td class="entry" headers="addscript__table_ucs_chr_bkb__entry__1 "> <p class="p"><span class="ph uicontrol">Description </span></p> </td> <td class="entry" headers="addscript__table_ucs_chr_bkb__entry__2 "><p class="p">About the script execution task description.</p></td> </tr> <tr class="row"> <td class="entry" headers="addscript__table_ucs_chr_bkb__entry__1 "> <p class="p"><span class="ph uicontrol">Type</span></p> </td> <td class="entry" headers="addscript__table_ucs_chr_bkb__entry__2 "><p class="p">Select the script type according to the host type: </p><ul class="ul" id="addscript__ul_ixy_5kr_dkb"> <li class="li">If the host is of <strong class="ph b">Linux</strong> system, select <span class="ph uicontrol">Shell</span> as the script type. </li> <li class="li">If the host is of <strong class="ph b">Windows</strong> system, select <span class="ph uicontrol">PowerShell</span> as the script type. </li> </ul></td> </tr> <tr class="row"> <td class="entry" headers="addscript__table_ucs_chr_bkb__entry__1 "> <p class="p"><span class="ph uicontrol">Content</span></p> </td> <td class="entry" headers="addscript__table_ucs_chr_bkb__entry__2 "><p class="p">The specific content of the script executed on the host. </p><div class="note note note_note"><span class="note__title">Note:</span> The content cannot exceed 30000 characters. </div></td> </tr> </tbody></table> </div> </li><li class="li step stepexpand"> <span class="ph cmd">After that, click <span class="ph uicontrol">Save</span>.</span> </li></ol></section>
Did the above content solve your problem? Yes No
Please complete information!

Call us

400-151-8800

Email us

cloud@pingan.com

Online customer service

Instant reply

Technical Support

cloud products