clusterinthecloud / support

If you need help with Cluster in the Cloud, this is the right place
2 stars 0 forks source link

aarch64 compute_image_extra.sh errors #14

Closed tomdeakin closed 3 years ago

tomdeakin commented 4 years ago

I'm seeing issues adding new default packages to the aarch64 images.

$ cat compute_image_extra.sh 
#! /bin/bash
# Add any commands you wish to run in the compute image to this file
# and rerun `run-packer`
yum install gcc gcc-c++ environment-modules

$ sudo /usr/local/bin/run-packer aarch64
...
==> amazon-ebs.aws: Provisioning with shell script: /home/citc/compute_image_extra.sh
==> amazon-ebs.aws: Error: This command has to be run under the root user.
==> amazon-ebs.aws: Provisioning step had errors: Running the cleanup provisioner, if present...
==> amazon-ebs.aws: Terminating the source AWS instance...
==> amazon-ebs.aws: Cleaning up any extra volumes...
==> amazon-ebs.aws: No volumes to clean up, skipping
==> amazon-ebs.aws: Deleting temporary security group...
==> amazon-ebs.aws: Deleting temporary keypair...
Build 'amazon-ebs.aws' errored: Script exited with non-zero exit status: 1.Allowed exit codes are: [0]
tomdeakin commented 4 years ago

OK, it's because the stuff in the compute_image_extra.sh needs to be run as root. Can I request that the comment in that file reminds the user about that.

$ cat compute_image_extra.sh 
#! /bin/bash
# Add any commands you wish to run in the compute image to this file
# and rerun `run-packer`
# Remember the commands might need to run as root! (e.g. sudo yum -y install gcc)
sudo yum -y install gcc gcc-c++ environment-modules
milliams commented 3 years ago

I have added these, along with an example yum install line.