3

How can I install s3cmd on a AMI that is used in the pipeline? This should be a fairly basic thing to do but I can't seem to get it done: Here's what I've tried:

  • Started a Pipeline without the Image-id option => Everything works fine
  • Navigated to EC2 and created an Image of the running Instance to make sure all the needed stuff to run in the pipeline is installed on my custom AMI
  • Started this AMI manually as an Instance
  • SSH'd into the machine and installed S3cmd
  • Created another Image of the machine, this time with s3cmd installed
  • Shut down the Instance
  • Started the Pipeline again, this time with the newly created AMI as Image-id and S3cmd installed

Now the Resource starts "RUNNING" but my Activity (ShellCommandActivity) is stuck in the WAITING_FOR_RUNNER state and the script never gets executed.

What do I have to do to get the pipeline running with a custom image? Or is there even an easier way to use s3cmd in a pipeline?

Thank you!

Biffy
  • 871
  • 2
  • 10
  • 21

1 Answers1

2

I figured it out now, by using a "clean" Amazon Linux AMI (from the marketplace for example) and installing S3cmd, rather than creating an AMI out of a running Pipeline Resource. I saw that this AMI has a different Kernel version, so this could have been the problem.

Biffy
  • 871
  • 2
  • 10
  • 21
  • For other things creating AMI might be inevitable, because you can't "sudo" in ShellCommandAcitivity, which limits the things you can install locally through shell script. – piggybox Nov 04 '14 at 18:23
  • You certainly can `sudo`: `{ "id" : "ActivityId_Tf7hc", "schedule" : { "ref" : "ScheduleId_F94pd" }, "name" : "InstallDocker", "command" : "sudo /bin/bash -c 'yum install -y docker && sed -i \"/hugetlb/d\" /etc/cgconfig.conf && sed -i \"/memory/d\" /etc/cgconfig.conf && service docker start'", "runsOn" : { "ref" : "ResourceId_sQCNM" }, "type" : "ShellCommandActivity" }` – dty Jan 06 '15 at 13:38