https://github.com/geolffreym/vagrant-chef
A simple example of Vagrant and Chef environment
https://github.com/geolffreym/vagrant-chef
Last synced: 3 months ago
JSON representation
A simple example of Vagrant and Chef environment
- Host: GitHub
- URL: https://github.com/geolffreym/vagrant-chef
- Owner: geolffreym
- Created: 2015-02-12T19:16:56.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-18T17:06:14.000Z (over 10 years ago)
- Last Synced: 2025-02-02T09:27:54.885Z (4 months ago)
- Language: Shell
- Size: 809 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# vagrant-chef
A simple example of Vagrant and Chef environmentRun to install dependencies
```ruby
startup.sh
```Run to execute cookbook dependency manager
```ruby
librarian-chef init
```Append your cookbooks to Cheffile then
```ruby
librarian-chef install
```View the Chef Community cookbooks resources or [create it] (https://docs.chef.io/knife_cookbook.html)
Nodes
-----
Create the nodes list in /config/nodes.json
```ruby
"nodes": {
"web01": {
":node": "WebServer-01",
":ip": "192.168.33.21",
":host": "web01",
"ports": [
{
":host": 2201,
":guest": 22,
":id": "ssh"
},
{
":host": 8000,
":guest": 8000,
":id": "wls-listen"
}
],
":memory": 2048
}
}
```Roles
-----
Configure Chef and create your roles[Configure knife init](https://docs.chef.io/knife_configure.html)
[Read how](https://www.digitalocean.com/community/tutorials/how-to-use-roles-and-environments-in-chef-to-control-server-configurations)
```ruby
knife configure initial
knife role create myrole
```**Give life to the roles in nodes/ create your own nodes**
Example web01.json
```ruby
{
"run_list": [
"role[web]"
]
}
```At Work
-------Up your boxes
```ruby
vagrant up
```Help links
---------Librarian-Chef plugin
https://github.com/applicationsonline/librarian-chefVagrant
https://www.vagrantup.com/Chef Community resources
https://supermarket.chef.io/