* There is embeded tools coming with ChefDK named Berkshelf. This is resolving dependencies automatically. We are gonna use that tool for vagrant deployments



## Deployment to Vagrant:

```
#Install vagrant-berkshelf plugin;
vagrant plugin install vagrant-berkshelf

export PATH=/opt/chefdk/bin:$PATH
export LANG=en_US.UTF-8 # might be needed.

sudo chmod -R 1777 ~/.berkshelf/ # might be needed sometimes

#first time
vagrant up --provision
```


After vagrant is initialized once, and if you want to provision it again, run;
```
vagrant provision
```




## Deployment to server:

```


cd ~/workspace/lol/lolpy-webapp/etc/deployment/chef-berks/

#this will create updated cookboks on your local which is in not gonna be pushed to git.(It is in .gitignore)
berks vendor


export LANG=en_US.UTF-8

#To add or update (new) role
knife role from file roles/lolpy-celery.rb

knife cookbook upload -a


knife ssh 'name:ttloggerweb1 or name:ttloggerweb2' 'chef-client' -x root -P

```


