pcluster createami
(Linux/macOS) Creates a custom AMI to use with Amazon ParallelCluster.
pcluster createami [ -h ] -aiBASE_AMI_ID-osBASE_AMI_OS[ -iINSTANCE_TYPE] [ -apCUSTOM_AMI_NAME_PREFIX] [ -ccCUSTOM_AMI_COOKBOOK] [--no-public-ip] [ -post-installPOST_INSTALL_SCRIPT] [ -cCONFIG_FILE] [-tCLUSTER_TEMPLATE] [--vpc-idVPC_ID] [--subnet-idSUBNET_ID] [ -rREGION]
Required dependencies
In addition to the Amazon ParallelCluster CLI, the following dependency is required to run pcluster
createami:
-
Packer: Download the latest version from https://developer.hashicorp.com/packer/downloads
.
Note
Before Amazon ParallelCluster version 2.8.0, Berkshelfgem install berkshelf) was required to use pcluster createami.
Named arguments
-h, --help-
Shows the help text for
pcluster createami. -aiBASE_AMI_ID, --ami-idBASE_AMI_ID-
Specifies the base AMI to use for building the Amazon ParallelCluster AMI.
-osBASE_AMI_OS, --osBASE_AMI_OS-
Specifies the OS of the base AMI. Valid options are:
alinux2,ubuntu1804,ubuntu2004, andcentos7.Note
OS support changes in different Amazon ParallelCluster versions:
-
Support for
centos8was removed in Amazon ParallelCluster version 2.10.4. -
Support for
centos8was added, and support forcentos6was removed in Amazon ParallelCluster version 2.10.0. -
Support for alinux2 was added in Amazon ParallelCluster version 2.6.0.
-
Support for ubuntu1804 was added in Amazon ParallelCluster version 2.5.0.
-
-iINSTANCE_TYPE, --instance-typeINSTANCE_TYPE-
Specifies the instance type to use to create the AMI.
Defaults to
t2.xlarge.Note
Support for the
--instance-typeargument was added in Amazon ParallelCluster version 2.4.1. -apCUSTOM_AMI_NAME_PREFIX, --ami-name-prefixCUSTOM_AMI_NAME_PREFIX-
Specifies the prefix name of the resulting Amazon ParallelCluster AMI.
Defaults to
custom-ami-. -ccCUSTOM_AMI_COOKBOOK, --custom-cookbookCUSTOM_AMI_COOKBOOK-
Specifies the cookbook to use to build the Amazon ParallelCluster AMI.
--post-installPOST_INSTALL_SCRIPT-
Specifies the path to the post-install script. Paths must use a
s3://,https://, orfile://URL scheme. Examples include the following:-
https://bucket-name.s3.region.amazonaws.com/path/post_install.sh -
s3://bucket-name/post_install.sh -
file:///opt/project/post_install.sh
Note
Support for the
--post-installargument was added in Amazon ParallelCluster version 2.10.0. -
--no-public-ip-
Do not associate a public IP address to the instance used to create the AMI. By default, a public IP address is associated with the instance.
Note
Support for the
--no-public-ipargument was added in Amazon ParallelCluster version 2.5.0. -cCONFIG_FILE, --configCONFIG_FILE-
Specifies the alternative configuration file to use.
Defaults to
~/.parallelcluster/config. -tCLUSTER_TEMPLATE, --cluster-templateCLUSTER_TEMPLATE-
Specifies the [cluster] section of the
CONFIG_FILEto use to retrieve the VPC and subnet settings.Note
Support for the
--cluster-templateargument was added in Amazon ParallelCluster version 2.4.0. --vpc-idVPC_ID-
Specifies the ID of the VPC to use to build the Amazon ParallelCluster AMI.
Note
Support for the
--vpc-idargument was added in Amazon ParallelCluster version 2.5.0. --subnet-idSUBNET_ID-
Specifies the ID of the subnet to use to build the Amazon ParallelCluster AMI.
Note
Support for the
--vpc-idargument was added in Amazon ParallelCluster version 2.5.0. -rREGION, --regionREGION-
Specifies the Amazon Web Services Region to use. Defaults to the Amazon Web Services Region specified by using the pcluster configure command.