Itamae codes for provisioning rbenv
minimum environment
- assumed on Vagrant environment
- sample Vagrantfile is here
- rewrite and rename below files as your environment
sabaku.sh.sample
tosabaku.sh
user_01
anduser_02
need to be changeduser_01
will be Vagrant default useruser_02
will be general user you wanna add
cookbooks\secret\username_and_password.rb.sample
tocookbooks\secret\username_and_password.rb
USERNAME
is very aboveuser_02
PASSWORD
isUSERNAME
's password
cookbooks\secret\root_password.rb.sample
tocookbooks\secret\root_password.rb
ROOT_PASSWORD
is root user's password- note that root login with password is prohibited
cookbooks\secret\authorized_keys.sample
toauthorized_keys.sample
- you must prepare pair of public key and secret key
- add exec permission
sabaku.sh
- exec
sabaku.sh
as below
$ ./sabaku.sh
- you need to input password three times
sudo
password- first user's ssh password
first user
is Vagrant default user
- second user's ssh password
second user
is general user you wanna add
- please wait a minute
- provisioning is complete, it's ready to use!
- these recipes are useful FOR ME so you should modify them you like.
- some recipes aren't used
- I cannot use
git
such as below...why?
git "/usr/local/rbenv" do
repository "git://github.com/rbenv/rbenv.git"
end
stdout | fatal: Not a git repository (or any of the parent directories): .git
- should use not relative pathname but absolute pathname
- doesn't work well when relative pathname
- absolute pathname is idempotent and easy to understand
- not
adduser
command butuseradd
commandadduser
command is recommended on Ubuntu- but unwritable only one-linear with
adduser
command - so add
CREATE_HOME yes
inlogin.defs
and useduseradd
command
- Itamae has Vagrant option as default...
sabaku
ofsabaku.sh
is Japanese verb word捌く(Sa-Ba-Ku)
, which meansto deal with foodstuff well