drupal-6


switch chef-client user during bootstrap


I've written a recipe to install Aegir. I would like to bootstrap a new instance on aws with aegir recipe, The installation goes well but fails to execute "drush hostmaster-install" as it throws "Drupal installation not found" error.
It installs smoothly When i manually go into machine and have a chef-client run with aegir user.
ssh to ec2 with ubuntu user
sudo su - aegir
sudo chef-client
But the installation is getting failed when i bootstrap new instance with ubuntu user. I appreciate any idea's of switching users to run chef client.
execute "apt-get-update" do
command "sudo apt-get update"
end
%w{curl apache2 php5 libapache2-mod-php5 openssl php-pear php5-cli php5-common php5-curl php5-dev php5-gd php5-imagick
php5-imap php5-intl php5-mcrypt php5-memcache php5-ming php5-mysql php5-ps php5-pspell php5-recode php5-tidy php5-gd
php5-xmlrpc php5-xsl apache2-utils postfix rsync sudo libcurl3 libcurl3-gnutls mysql-client mysql-common}.each do |x|
package x do
action :install
end
end
user "aegir" do
action :create
supports :manage_home => true
comment "aegir User"
home "#{node[:aegir][:dir]}"
shell "/bin/bash"
password "VenEucAf1"
end
group "www-data" do
action :modify
members "aegir"
append true
end
bash "install_mysql" do
user "root"
code /etc/sudoers.d/aegir
chmod 440 /etc/sudoers.d/aegir
EOH
not_if { ::File.exists?("/etc/sudoers.d/aegir") }
end
bash "Install_drush" do
user "root"
cwd "/var/aegir"
code '/var/aegir', 'USER' => 'aegir' })
cwd "#{node[:aegir][:dir]}"
command true, :restart => true, :reload => true
action :start
end
Updated my complete recipe.
Error: User aegir does not exists
Sounds like you might need to set the HOME environment variable. You can add it to the execute resource:
execute 'drush hostmaster-install' do
user 'aegir'
environment 'HOME' => '/home/whatever'
end

Related Links

drupal module development
How to make multilanguage views (Views-module)
Limit the contents shared by the author
How to theme exposed filter items in views - drupal 6
How to validate the input of views exposed form in drupal-6
Is it possible to use a story's title as a pager in views slideshow?
Force password change on email activation
Drupal 6 next tid value
subscription to news letter in drupal
IP to country in counter report in drupal
Image and video gallery on drupal website
How to add php files in drupal modules
Drupal - Computed Fields - Taxonomy Term Weight?
Automatically update drupal nodes at submit time
Privatemsg & send email notify on new message drupal6
How to create template file for skinr module in drupal?

Categories

HOME
ms-access
ionic-framework
jdo
proxy
oracle11g
google-api-php-client
filtering
windows-server
fancybox
synchronization
gitpitch
vault
node-pdfkit
kentor-authservices
etl
correlation
remote-access
flask-wtforms
msp430
apache-metamodel
jqwidget
django-cms
textfield
one-hot-encoding
wkwebview
core-text
wpfdatagrid
maxmind
typo3-6.2.x
google-cloud-nl
directx-10
contact-form
karaf
http-digest
jquery-bootgrid
qwerty
azure-ml
preconditions
dynamic-reports
core-plot
estimote
convertapi
dotcover
chain-builder
pubmed
yii2-extension
svmlight
recursive-datastructures
blacklist
ableton-live
url-pattern
grails-tomcat-plugin
httplistener
bonobo
py2app
markojs
spim
xna-4.0
qtableview
prerequisites
jms2
lemon
eclipse-clp
tableau-online
service-accounts
fluid-dynamics
angular-local-storage
c++03
fscommand
cctv
comexception
xceed-datagrid
ember-charts
viadeo
gridfs
tidy
eventual-consistency
comaddin
wsdl-2.0
pvrtc
trusted
nsnetservice
multipage
getmessage
ticoredatasync
regsvr32
qtkit
bigcouch
doh
data-loss
gcj
f#-powerpack
javax.script
gdlib
android-sdk-2.1
suppress
routedevent
preference
mirah

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App