https://github.com/chatsecure/chef-chatsecure
Chef Repo for chatsecure.org
https://github.com/chatsecure/chef-chatsecure
Last synced: 11 months ago
JSON representation
Chef Repo for chatsecure.org
- Host: GitHub
- URL: https://github.com/chatsecure/chef-chatsecure
- Owner: ChatSecure
- Created: 2013-11-12T00:16:23.000Z (over 12 years ago)
- Default Branch: master
- Last Pushed: 2017-07-18T16:52:25.000Z (over 8 years ago)
- Last Synced: 2023-03-23T21:40:08.855Z (almost 3 years ago)
- Language: Ruby
- Size: 33.2 KB
- Stars: 4
- Watchers: 5
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# chatsecure.org chef repo
Chef is way better than provisioning servers by hand.
## Vagrant
Install [Vagrant](http://www.vagrantup.com), [VirtualBox](https://www.virtualbox.org), and then install these plugins.
$ vagrant plugin install vagrant-omnibus
$ vagrant plugin install vagrant-berkshelf
Then you should be able to bring up the VM:
$ vagrant up
Provision the current roles/recipes defined in the `Vagrantfile`:
$ vagrant provision
Other useful commands are `vagrant destroy` to destroy the VM, `vagrant ssh` to ssh into the VM, `vagrant halt` and `vagrant suspend` to halt/suspend. Sometimes you have to do `vagrant reload` as well when changing VM configuration.
## Deploying
Install the latest version of Chef, knife-solo, and berkshelf for your operating system.
$ gem install chef knife-solo berkshelf
Install chef-solo on the remote server with knife-solo:
$ knife solo prepare user@example.com
Provision the server with the latest cookbooks (similar to `vagrant provision`):
$ knife solo cook user@example.com
Clean it up
$ knife solo clean user@example.com
## Data Bags
The `data_bags` directory should look like this:
groups
groups.json
secrets
secrets.json
ssl
certs.json
keys.json
user-passwords
passwords.json
users
user1.json
user2.json
user3.json
## Nodes
For some reason chef-solo breaks if you include too much stuff in your json file. In the `nodes` directory include a node `example.com.json`:
{
"name": "example.com",
"postgresql": {
"password": {
"postgres": "example_password"
}
},
"run_list": [
"role[nginx]",
"role[base]",
"role[security]",
"role[users]",
"role[web]"
]
}
## Git Deploys
Now you can deploy application code with git:
$ git remote add vagrant ssh://git@127.0.0.1:2222/var/git/chatsecure-web.git
$ git remote add production git@beta.chatsecure.org:/var/git/chatsecure-web.git
$ git push production master