Let's start with your journey on pull model Chef !!
How to create a server on aws cloud?
Instance = server
SSH = LInux to linux
HTTP = we can access web server from internet
1) Create an Aws account and login
2) Install git on your laptop
3) Create ec2 server( instance) on AWS
After create aws account and login
Choose Ec2 service
Choose launch instance ( server)
Choose instance count and name
Choose Ubuntu Linux AMI, it just like OS
Choose instance type as T2.micro , it has 1 core CPU and 1 Gb ram
Choose pem file, it just like passwd
Choose default network and Security Group as SSH and HTTP
Choose EBS Volume same as Hard disk
We can create a server on cloud
Install git on your laptop
Try getting into the cloud server by using git bash where we have a pem file in your laptop
$ sudo -i
# apt-get update
# apt-get install apache2 -y
Install vagrant:
1) Install virtualBox on your laptop
2) Install git on your laptop
3) Install vagrant on your laptop
I want to create a VM by using vagrant:
1) Create a folder on your laptop
2) On folder , open git bash
3) Vagrant init ubuntu/trusty64
4) Vagrant up
5) Vagrant ssh
**6) Vagrant destroy
**
VM
OS
Provision tool
**What is CM?
**
CHEF : PULL
For Setup Chef:
1) Workstation( your laptop)
2) Chef server( hosted or Install)
3) Chef Nodes( aws ec2 servers)
chef-repo>
knife bootstrap < public ip of aws server> --ssh-user <user name> --sudo --identity-file <aws server pem file location> -N <chef node name>
knife bootstrap 18.222.149.109 --ssh-user ubuntu --sudo --identity-file "C:\Users\Admin\Desktop\myOhiokey.pem" -N mychefnode0011
chef-repo\cookbook>
chef generate cookbook <cookbook name>
chef generate cookbook my1stcookbook
chef-repo\cookbook\my1scookbook>
berks install
berks upload