-
You will need to install aws cli and configure your AWS account using the
aws configure
command.$ aws configure AWS Access Key ID [********************]: AWS Secret Access Key [*******************]: Default region name [us-east-1]: Default output format [json]:
-
Download the IBM Spectrum Scale Data Management Edition install package (from Fix Central) and upload gpfs_rpms to s3 bucket.
Example (Contents of the bucket should look like below for rhel8 AMI):
$ aws s3 ls s3://scalebucket 2021-07-02 15:22:59 907 SpectrumScale_public_key.pgp 2021-07-02 15:22:27 38080 gpfs.adv-5.1.1-0.x86_64.rpm 2021-07-02 15:22:24 22115584 gpfs.base-5.1.1-0.x86_64.rpm 2021-07-02 15:22:34 41864 gpfs.compression-5.1.1-0.x86_64.rpm 2021-07-02 15:22:35 271500 gpfs.crypto-5.1.1-0.x86_64.rpm 2021-07-02 15:22:37 505356 gpfs.docs-5.1.1-0.noarch.rpm 2021-07-02 15:22:39 595904 gpfs.gpl-5.1.1-0.noarch.rpm 2021-07-02 15:22:47 9468992 gpfs.gskit-8.0.55-19.x86_64.rpm 2021-07-02 15:22:51 458688 gpfs.gss.pmcollector-5.1.1-0.el8.x86_64.rpm 2021-07-02 15:22:54 440664 gpfs.gss.pmsensors-5.1.1-0.el8.x86_64.rpm 2021-07-02 15:22:25 92688689 gpfs.gui-5.1.1-0.noarch.rpm 2021-07-02 15:22:25 41686244 gpfs.java-5.1.1-0.x86_64.rpm 2021-07-02 15:22:55 4252 gpfs.license.dm-5.1.1-0.x86_64.rpm 2021-07-02 15:22:57 178376 gpfs.msg.en_US-5.1.1-0.noarch.rpm
-
Download a pre-built Packer binary for your operating system.
The below steps will provision AWS EC2 instance, install IBM Spectrum Scale rpm's and creates a new AMI.
-
Change working directory to
packer_templates/aws/
.cd ibm-spectrum-scale-cloud-install/packer_templates/aws/
-
Create packer variable definitions file (
inputs.auto.pkrvars.hcl
) and provide infrastructure inputs.Minimal Example:
cat <<EOF > inputs.auto.pkrvars.hcl vpc_id = "vpc-0df33b2a861b63118" // An existing vpc id vpc_subnet_id = "subnet-0992d8e9ce397dac3" // Existing subnet id vpc_region = "us-east-1" vpc_security_group_id = "sg-0cbcfe43d939c6069" // Existing security group (make sure it has inbound port 22 opened ami_name = "spectrumscale" ami_description = "IBM Spectrum Scale AMI" instance_type = "t2.medium" source_ami_id = "ami-0b0af3577fe5e3532" // Soure AMI-ID (for stock rhel image id's, refer to https://access.redhat.com/solutions/15356). s3_spectrumscale_bucket = "scalebucket" // S3 bucket that contains gpfs/scale rpm's. volume_size = "200" volume_type = "gp2" EOF
-
Run
packer init .; packer build .
to create AMI.
Name | Description | Type | Default | Required |
---|---|---|---|---|
ami_description | The description to set for the resulting AMI. | string |
"IBM Spectrum Scale AMI" |
no |
ami_name | The name of the resulting AMI. To make this unique, timestamp will be appended. | string |
n/a | yes |
instance_type | The EC2 instance type to use while building the AMI. | string |
n/a | yes |
s3_spectrumscale_bucket | S3 bucket which contains IBM Spectrum Scale rpm(s). | string |
n/a | yes |
source_ami_id | The source AMI id whose root volume will be copied and provisioned on the currently running instance. | string |
n/a | yes |
volume_size | The size of the volume, in GiB. | string |
"200" |
no |
volume_type | The volume type. gp2 & gp3 for General Purpose (SSD) volumes. | string |
"gp2" |
no |
vpc_id | The VPC id you want to use for building AMI. | string |
n/a | yes |
vpc_region | The region where AWS operations will take place. Examples are us-east-1, us-west-2, etc. | string |
n/a | yes |
vpc_security_group_id | The security group id to assign to the instance, you must be sure the security group allows access to the ssh port. | string |
n/a | yes |
vpc_subnet_id | The subnet ID to use for the instance. | string |
n/a | yes |