Create a database and a database user on MySQL for yohoushi, and install yohoushi.
Yohoushi requires followings, but this cookbook does not install them. Please install them by other recipes or manually.
- Ruby (>=2.0.0)
- MySQL or Sqlite3 (>=3.6.16)
- GrowthForecast (>=0.62)
Assume (You can configure at attributes/default.rb)
- Your username is
vagrant
and yohoushi will be installed to/home/vagrant/yohoushi
- Ruby is already installed on
/home/vagrant/.rbenv/versions/2.1.0/bin/ruby
with rbenv - Mysql is already working on localhost:3306 with empty root password
Then, install yohoushi by
git clone https://github.com/yohoushi/chef-yohoushi ~/chef-yohoushi
cd ~/chef-yohoushi
bundle install
bundle exec knife solo cook localhost
and start yohoushi as
cd ~/yohoushi
rbenv local 2.1.0
bin/yohoushi
See Yohoushi manual page for further details.
Assume (You can configure at attributes/default.rb)
- Your username at remote host is
vagrant
and yohoushi will be installed to/home/vagrant/yohoushi
- Ruby is already installed on
/home/vagrant/.rbenv/versions/2.1.0/bin/ruby
with rbenv - Mysql is already working on port 3306 with empty root password
Then, install by
HOSTNAME="YOUR_REMOTE_HOSTNAME"
git clone https://github.com/yohoushi/chef-yohoushi ~/chef-yohoushi
cd ~/chef-yohoushi
bundle install
# bundle exec berks install --path cookbooks
cp nodes/localhost.json nodes/$HOSTNAME.json
bundle exec knife solo prepare $HOSTNAME
bundle exec knife solo cook $HOSTNAME
and start yohoushi as
ssh $HOSTNAME
ssh> cd ~/yohoushi
ssh> rbenv local 2.1.0
ssh> bin/yohoushi
See Yohoushi manual page for further details.
Use Berkshelf, and append below to your Berksfile
cookbook 'yohoushi', git: 'https://github.com/yohoushi/chef-yohoushi'
To run yohoushi recipe; add a run_list to your node.json
"run_list": [
"yohoushi"
]
Key | Type | Description | Default |
---|---|---|---|
yohoushi/app/owner | String | user name to own files | vagrant |
yohoushi/app/group | String | group name to own files | vagrant |
yohoushi/app/path | String | where the application is deployed to | /home/vagrant/yohoushi |
yohoushi/ruby/ruby_path | String | path to ruby command (is required >= 2.0.0) | /home/vagrant/.rbenv/versions/2.1.0/bin/ruby |
yohoushi/ruby/gem_path | String | path to gem command | /home/vagrant/.rbenv/versions/2.1.0/bin/gem |
yohoushi/database/name | String | Database name | yohoushi |
yohoushi/database/root_password | String | MySQL root user's password. This is required to create yohoushi database | nil (This param is required!) |
yohoushi/database/username | String | MySQL username to run yohoushi | yohoushi |
yohoushi/database/password | String | MySQL user's password to run yohoushi | yohoushi |
yohoushi/database/host | String | hostname of MySQL server | localhost |
yohoushi/database/port | Integer | port number of MySQL server | 3306 |
- Enable to install ruby, mysql, and GrowthForecast if users set
integration
option
- Fork the repository on Github
- Create a named feature branch (like
add_component_x
) - Write your change
- Write tests for your change (if applicable)
- Run the tests, ensuring they all pass
- Submit a Pull Request using Github
License: MIT Authors: Nobuhiro Nikushi, Naotoshi Seo