Creating Custom Images
About this task
mapr-setup.sh
script allows you to build custom Amazon Machine
Images (AMIs) or Azure VM images. You can use these images to create more instances of
the original image. With a couple of exceptions, the steps for creating custom images
are the same for AWS and Azure.To create a custom image:
Procedure
- Create the instance from which you want to build the image.
-
Download or copy
mapr-setup.sh
to the instance. For more information, see MapR Installer. -
Prep the image. This step adds MapR software to the image. For example:
./mapr-setup.sh image prep --version 5.2.2
- Respond to the questions in the script.
- (Optional): Install other software as needed on the image.
-
(Azure only): Finalize the image:
./mapr-setup.sh image finalize azure
-
Create the image by using the
image create
command:NOTE (Azure only): The image create command must be run off the VM that you want to make an image out of. The command can be run anywhere the Azure CLI is installed or anywhere the MapR Installer 1.6 setup script is installed.- AWS
example
./mapr-setup.sh image create
- Azure example
In this example, the script looks in the
MapRImageCreateRG
resource group for a machine calledMyVirtualMachine
and creates an image calledMapRImage2
:./mapr-setup.sh image create azure -u user@mapr.com -g MapRImageCreateRG -n MyVirtualMachine -i MapRImage2
- AWS
example
- (AWS only): Once the image is created, you can see the image ID in the EC2 console.
-
(Azure only): Once the image is created, you can see the image in the list of
resource groups. You can copy the image ID from the script:
NOTE Another way to obtain the Azure image ID is to navigate to the Azure console and check the resource ID for the new image:
-
(AWS only): Update the AMI ID in the
RegionMap
of your CloudFormation template. -
(Azure only): Update the resource ID in the
maprimageName
field in the ARM template.
- (AWS only): Run the CloudFormation template using the steps in Running the MapR AWS Templates.
- (Azure only): Run the ARM template using the steps in Running the MapR Azure Templates.