Managing provisioning scripts
You can use provisioning scripts to specify a URL to a script that runs on a newly provisioned device. Provisioning scripts can be any file that the operating system can run, including combined binary files or any OS-supported language. You have no restrictions for the script name; however, using a similar naming convention for each script makes it easier to identify. Provisioning scripts must be associated with a fully qualified domain name and accessible using the HTTP or HTTPS protocols. The type of protocol that you use impacts the system's automated response when the provisioning script is downloaded to the device.
- Using the HTTP protocol requires an administrator to run the script manually after it is downloaded.
- Using the HTTPS protocol downloads and runs the script automatically, if possible. If the URL is not associated to a valid script, the script is downloaded and no further action must be taken.
Before you begin
First, go to the device menu and make sure that you have the correct account permissions to complete the tasks.
- Go to your console's device menu. For more information, see Navigating to devices.
- Make sure that you have any necessary account permissions and device access. Only the account owner, or a user with the Manage users classic infrastructure permission, can adjust the permissions.
For more information about permissions, see Managing device access.
Adding a provisioning script
- From the Devices menu, select Manage > Provisioning scripts.
- Select Add Provisioning script.
- Enter an identifying name for the provisioning script in the Name field.
- Enter the fully qualified domain name that is associated with the script in the URL field.
- Click Add to add the provisioning script to the account.
Editing provisioning script details
- From the Devices menu, select Manage > Provisioning scripts.
- Click anywhere in the Name or URL column for the provisioning script to open the script for edits.
- Update the name or URL. When you update a URL, you must use a fully qualified domain name or the change is not saved.]
- Click anywhere on the screen to save the edit.
Next steps
Provisioning scripts that are associated with an account can be modified or removed at any time. Provisioning scripts are saved in the IBM Cloud console until they are removed and can be associated to any new device ordered through the IBM Cloud console. If the script is associated with an HTTP URL, the script downloads to the new device during provisioning and the administrator must log in to the device and run the script manually. Scripts that are associated with HTTPS URLs are downloaded and, when applicable, run on the new device without extra interaction required.
If you edit a script, valid updates are displayed on the screen immediately. Changes made to existing provisioning scripts do not impact devices already provisioned.