Currently, bootstrap actions support Linux shell scripts only. Script files must end with .sh.
Before compiling a script, you need to upload all required installation packages, configuration packages, and relevant files to the OBS bucket in the same region. Because networks of different regions are isolated from each other, MRS VMs cannot download OBS files from other regions.
You can specify the file to be downloaded from OBS in the script. If you upload files to a private bucket, you need to run the hadoop fs command to download the files. The following example shows that the s3a://yourbucket/myfile.tar.gz file will be downloaded to the local host and decompressed to the /your-dir directory.
#!/bin/bash source /opt/client/bigdata_env;hadoop fs -Dfs.s3a.endpoint=<obs-endpoint> -Dfs.s3a.access.key=<your-ak> -Dfs.s3a.secret.key=<your-sk> -copyToLocal s3a://yourbucket/myfile.tar.gz ./ mkdir -p /<your-dir> tar -zxvf myfile.tar.gz -C /<your-dir>
After script compilation, upload the script to the OBS bucket in the same region. At the time you specify, each node in the cluster downloads the script from OBS and executes the script as user root.