Created
September 26, 2018 18:47
-
-
Save srpomeroy/3f80587321ea23f06edc5d6702199e63 to your computer and use it in GitHub Desktop.
RightScale: Shell commands that use RSC to create an MCI, tag it, and add an image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create the MCI and capture the HREF via '--xh=location' flag | |
mciHref=$(rsc --account=XXXX --refreshToken=XXXX --host=us-X.rightscale.com --xh=Location cm15 create /api/multi_cloud_images \ | |
"multi_cloud_image[description]=RHEL 7.5 GA" \ | |
"multi_cloud_image[name]=RS Example RHEL MCI") | |
# Tag the MCI | |
rsc --account=XXXX --refreshToken=XXXX --host=us-X.rightscale.com cm15 multi_add /api/tags/multi_add \ | |
"resource_hrefs[]=$mciHref" \ | |
"tags[]=rs_agent:mime_include_url=https://rightlink.rightscale.com/rll/10.6.0/rightlink.boot.sh" \ | |
"tags[]=rs_agent:type=right_link_lite" | |
"tags[]=rs_agent:userdata=liquid" | |
# Create image settings in the MCI | |
rsc --account=XXXX --refreshToken=XXXX --host=us-X.rightscale.com cm15 create $mciHref/settings \ | |
"multi_cloud_image_setting[cloud_href]=/api/clouds/1" \ | |
"multi_cloud_image_setting[image_href]=/api/clouds/1/images/7VJSV56L5B64U" \ | |
"multi_cloud_image_setting[instance_type_href]=/api/clouds/1/instance_types/8O2U509O6690G" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment