Unable to install Ansible in ECS optimized AMI - amazon-web-services

shell script I ran on ECS AMI
sudo yum -y install git
git clone git://github.com/ansible/ansible.git --recursive
cd ./ansible
git submodule update --init --recursive
sudo yum -y install python
sudo yum update
sudo make install
Above installation works with normal AMI, with ECS optimized AMI , I get error with make install
RuntimeError: autoconf error
make: *** [install] Error 1

Create your own AMI. Install what you need. Add docker and the ecs agent so it can participate in the ecs cluster. We happen to use packer to create our amis.

Related

stress package not available on aws EC2 instance

I am getting the package not available if I try to install stress package.
sudo yum install stress
Instance is connected to internet as I can run updates successfully. As I am trying out auto-scaling , is there any other way to do it. I have setup instance using Terraform.
You need amazon extra repository first. Use the following
sudo amazon-linux-extras install epel -y
sudo yum install stress -y

Docker compose commands are not working from user data?

I'm trying to install drupal on AWS ec2 instance by using terraform. I have created a script file in that I have defined docker installation and the s3 location of docker-compose.yml after that I run the docker-compose up -d command in the script. I called the script file in the user data everything is working fine on the new AWS ec2 instance except docker containers are not starting up.docker-compose file has downloaded to the instance but they were no containers actively running. If again I login into the instance and run the command then both drupal MySQL containers are starting and the drupal website is in an active state but the same command from the script is not working.
#! /bin/bash
sudo yum update -y
sudo yum install -y docker
sudo usermod -a -G docker ec2-user
sudo curl -L https://github.com/docker/compose/releases/download/1.21.0/docker-compose-`uname -s`-`uname -m` | sudo tee /usr/local/bin/docker-compose > /dev/null
sudo chmod +x /usr/local/bin/docker-compose
sudo service docker start
sudo chkconfig docker on
aws s3 cp s3://xxxxxx/docker-compose.yml /home/ec2-user/
docker-compose up -d
I had the same issue. Solved it with:
ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose

wget not available on AWS EC2 (Bitnami)

I'm currently running a Bitnami Wordpress AMI on an EC2 instance (micro). When I connect to the machine via SSH and I try to execute wget I get the message command not found.
I tried to install it using apt-get but it's not available either. How can I install it?
For Amazon Linux the command is:
sudo yum install wget

Unable to install Webgoat on AWS. I get error about Dockerfile and Dockerrun.aws.json

I am trying to install webgoat on AWS. I am following the instructions given on https://github.com/WebGoat/WebGoat
I can get it up and running on my local box. But when I try to deploy it on AWS it gives error and complains about Dockerfile and Dockerrun.aws.json.
I go to elastic beanstalk. Then I create an application (of docker type). It asks me for the code and I give it the zip file from github. After several minutes it gives errors about Dockerfile and Dockerrun.aws.json.
Webgoat has several Dockerfiles, but no Dockerrun.aws.json. I am not sure how to resolve this.
What is the best way to deploy webgoat in aws?
Will appreciate any help I can get.
Finally I was able to install it using the info provided on these two sources.
https://docs.aws.amazon.com/AmazonECS/latest/developerguide/docker-basics.html
and https://github.com/WebGoat/WebGoat
Here are the steps:
sudo yum update -y
sudo yum install -y docker
sudo service docker start
sudo usermod -a -G docker ec2-user (Restart the server)
sudo docker pull webgoat/webgoat-8.0
sudo docker run -p 80:8080 -it webgoat/webgoat-8.0 /home/webgoat/start.sh
Make sure to modify the security group associated with the aws instance to allow http traffic. After that you should be able to access the app with this url:
http://:80/WebGoat/login

AWS code deploy agent not able to install?

Hi i am trying to install code deploy agent in my ec2 agent but not able to succeed
I m following below steps
sudo apt-get update
sudo apt-get install awscli
sudo apt-get install ruby2.0
cd /home/ubuntu
sudo aws s3 cp s3://bucket-name/latest/install . --region region-name
sudo chmod +x ./install
sudo ./install auto
but ./install file is missing for me .
But I dont think its a problem with AMI as I used same steps with same AMI in different ec2 instance. Any one has any idea. please help me.
You need to fill in the bucket name and region name in sudo aws s3 cp s3://bucket-name/latest/install . --region region-name. If you are in us-east-1 you would use: aws-codedeploy-us-east-1 and us-east-1.
All the buckets follow that pattern so you can fill in another region if you are there instead.
See http://docs.aws.amazon.com/codedeploy/latest/userguide/how-to-set-up-new-instance.html for a complete list of buckets for each region.