My Assigment
My Assigment
Create an application and demo how we can deploy the application using ElasticBeanStalk
or demo the ElasticBeanStalk steps to deploy the application.
Solution: Please find the below URL of PHP Application which has been deployed successfully through
Elastic Bean Stalk.
CLICK http://vizitechkkebs-env.eba-2c3whimr.eu-central-1.elasticbeanstalk.com
4. In Software Tab Keep everything as default, unless and until you want to add Environmental
variables.
5. Instances Tab Keep everything as default, and select your appropriate Security Groups which you
want to apply.
6. Capacity Tab Keep everything as default.
7. Load BalancerDepends on the requirement.
8. Rolling Updates & DeploymentsSelect Deployments All at Once, Rolling, Rolling with Batch,
Immutable. Rolling Updates typeDisable or Immutable and select your health check True or
False.
9. Security TabAttach your Service Role and also your EC2 Key Pair.
10. Monitoring Tab Select as required.
11. Managed Updates Keep everything as default.
12. Notifications TabKeep everything as default.
13. Network TabSelect your Custom VPC
14. Database Tab Select as required.
Review and Create your EnvironmentIt will take couple of minutes to launch your application.
If everything goes will without any code issue or infra issue, then your application will be up and running
with the HEALTH: OK
Below you can see EBS has created a running instance backend in which your PHP app is running on.
QUESTION-2
Ansible automation Demo - Showcase any use case that you want that shows Ansible in
action.
Firstly I have created 3 instances on AWS and named as Master-Node, Node-1 and Node-2
Configuration PART:
I have added a useradd named test in all the machines, and in the vi sshd_config. – I have given access
to PasswordAuthentication: YES and PermitRootLogin: YES
Now from MASTER Node you can login into Node-1 and Node-2
NOW root user can able to switch to newly created user which is test by entering the command ‘su - test’,
by from test user we can’t able to switch to root user, So we need to generate the key and share the key to
all Nodes1 and Node2.
vi /etc/sudoers —> ## Read drop-in files from /etc/sudoers.d (the # here does not mean a comment)
#includedir /etc/sudoers.d
ec2-user ALL=(ALL) NOPASSWD: ALL
test ALL=(ALL) NOPASSWD: ALL
ssh-copy-id 172.31.33.191
ssh-copy-id 172.31.34.180
ansible --version
Installing python
sudo yum list installed|grep -i python
python
cd etc/
cd ansible/
sudo vi hosts
[local]
localhost
[webserver]
172.31.33.191
[appserver]
172.31.34.180
cat hosts
cd home/
ll
cd test
ls -l
mkdir -p Playbook
cd Playbook/
ls -l
cat /etc/ansible/hosts
You can see Apache web server has been successfully running on the Node-1 and Node-2.
Like-wise you can run your playbooks from MASTER NODE.
QUESTION-3
Showcase the architecture diagram for the site like Flipkart or Facebook.