pcluster createami
(Linux/macOS) Creates a custom AMI to use with AWS ParallelCluster.
pcluster createami [ -h ] -ai
BASE_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 AWS 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 AWS 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
. -ai
BASE_AMI_ID
, --ami-idBASE_AMI_ID
-
Specifies the base AMI to use for building the AWS ParallelCluster AMI.
-os
BASE_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 AWS ParallelCluster versions:
-
Support for
centos8
was removed in AWS ParallelCluster version 2.10.4. -
Support for
centos8
was added, and support forcentos6
was removed in AWS ParallelCluster version 2.10.0. -
Support for alinux2 was added in AWS ParallelCluster version 2.6.0.
-
Support for ubuntu1804 was added in AWS ParallelCluster version 2.5.0.
-
-i
INSTANCE_TYPE
, --instance-typeINSTANCE_TYPE
-
Specifies the instance type to use to create the AMI.
Defaults to
t2.xlarge
.Note
Support for the
--instance-type
argument was added in AWS ParallelCluster version 2.4.1. -ap
CUSTOM_AMI_NAME_PREFIX
, --ami-name-prefixCUSTOM_AMI_NAME_PREFIX
-
Specifies the prefix name of the resulting AWS ParallelCluster AMI.
Defaults to
custom-ami-
. -cc
CUSTOM_AMI_COOKBOOK
, --custom-cookbookCUSTOM_AMI_COOKBOOK
-
Specifies the cookbook to use to build the AWS ParallelCluster AMI.
--post-install
POST_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-install
argument was added in AWS 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-ip
argument was added in AWS ParallelCluster version 2.5.0. -c
CONFIG_FILE
, --configCONFIG_FILE
-
Specifies the alternative configuration file to use.
Defaults to
~/.parallelcluster/config
. -t
CLUSTER_TEMPLATE
, --cluster-templateCLUSTER_TEMPLATE
-
Specifies the [cluster] section of the
CONFIG_FILE
to use to retrieve the VPC and subnet settings.Note
Support for the
--cluster-template
argument was added in AWS ParallelCluster version 2.4.0. --vpc-id
VPC_ID
-
Specifies the ID of the VPC to use to build the AWS ParallelCluster AMI.
Note
Support for the
--vpc-id
argument was added in AWS ParallelCluster version 2.5.0. --subnet-id
SUBNET_ID
-
Specifies the ID of the subnet to use to build the AWS ParallelCluster AMI.
Note
Support for the
--vpc-id
argument was added in AWS ParallelCluster version 2.5.0. -r
REGION
, --regionREGION
-
Specifies the AWS Region to use. Defaults to the AWS Region specified by using the pcluster configure command.