Hi All, I am new in Puppet.I am using github for manifest store.I created following these three manifest for installing our web based application in ubuntu systems.I am not using any variables in these. 1. how to implement variables for dbname, document root folder path etc... in nods.pp file. 2. right now i am using sed command for editing /etc/apache2/sites-available/default file. is there any other option for editing this? 3. for installing our application i run puppet -v nodes.pp. this will call everything. I am using these three manifests.Some time mysql database restore starts with gitclone database backup from git hub. I set required with it. I got timeout error on that time. 4.
*A.* nodes.pp class web-server { import 'common/consolidated-common-manifests.pp' import 'xxx/consolidated-xxx-manifests.pp' } node "default" { include web-server } *B.* consolidated-xxx-manifests.pp' # This will execute git clone exec { "gitclone-drupal-db": command => "git clone g...@github.com:XXX/drupal-db.git /xx/drupal-db/", } # This will execute exec { "gitclone-drupal": command => "git clone g...@github.com:netspective/xxx-drupal.git /var/www/html/xxx.com/xxx-drupal", require => Exec['gitclone-drupal-db'] } # This will create exec { "xxx-devl-db-create": command =>"/home/ubuntu/operations/configuration/server/puppet/manifests/xxx/create-xxx-devl-database.sh", require => Package ["mysql-server"], } # This will restore xxx database exec { "restore-xxx-devl-db": command => "/home/ubuntu/operations/configuration/server/puppet/manifests/xxx/restore-xxx-master-branch-db-into-mysql.sh", require => Exec['xxx-devl-db-create'] } # This will create sym link for files folder exec { "symlink-for-files-folder": command => "ln -s /xxx/xxx-drupal-db/files /var/www/html/. xxx.com/xxx-drupal/public_site/sites/default/files", require => Exec['gitclone-xxx-drupal'], } *C:* consolidated-common-manifests.pp' # CentOS v.5 only case $operatingsystem { "CentOS": { $wantedpackages = [ "httpd","php","php-mysql","php-mcrypt","php-mhash","php-mbstring" ] package { $wantedpackages: ensure => installed } service { "httpd": ensure => running, hasstatus => true, hasrestart => true, require => Package["httpd"], restart => true; } } # Ubuntu servers #assume Ubuntu/Debian base.. "Ubuntu": { $wantedpackages = [ "apache2","php5","libapache2-mod-php5","php5-cli","php5-mysql","mysql-server","mysql-client" ] package { $wantedpackages: ensure => installed } service { "apache2": hasstatus => true, hasrestart => true, ensure => running, require => Package["apache2"] } } } # end case # put this somewhere global, Exec { path => [ "/bin/", "/sbin/" , "/usr/bin/", "/usr/sbin/" ] } # This will edit default apache2 conf file exec { "edit-apache2-conf-file": command => "sed -i 's/AllowOverride None/AllowOverride All/' /etc/apache2/sites-available/default", require => Package["apache2"] } # This will increase php memory limit exec { "increase-php-memory-limit": command => "sed -i 's/memory_limit = .*/memory_limit = 384M/' /etc/php5/apache2/php.ini", require => Package["php5"] } exec { "edit-documentRoot-folder-path": command => "/home/ubuntu/operations/configuration/server/puppet/manifests/common/edit-documentRoot-folder-path.sh", require => Package["apache2"] } On Thu, Jul 14, 2011 at 11:37 AM, Rony KB <roni...@gmail.com> wrote: > Thanks Nigel. > > Right now i am using two shell scripts for Mysql Database creation and > database restore. These shell scripts are calling from puppet manifest > through exec.Can we do these from pure puppet manifest, without shell > scripts. > > Roni > > > On Wed, Jul 13, 2011 at 7:32 PM, Nigel Kersten <ni...@puppetlabs.com>wrote: > >> >> >> On Tue, Jul 12, 2011 at 11:51 PM, Roni <roni...@gmail.com> wrote: >> >>> I created manifest for our webserver. manifest included git clone, >>> database creation and restore database etc.... How to order the >>> installation and exec exactly >>> >>> >> Roni, you really should have a run through our Learning Puppet series. >> >> http://docs.puppetlabs.com/learning/ordering.html >> >> >> >> >> -- >> Nigel Kersten >> Product Manager, Puppet Labs >> Twitter: @nigelkersten >> >> *Join us for **PuppetConf *<http://www.bit.ly/puppetconfsig> >> September 22nd and 23rd in Portland, Oregon, USA. >> * >> * >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Puppet Users" group. >> To post to this group, send email to puppet-users@googlegroups.com. >> To unsubscribe from this group, send email to >> puppet-users+unsubscr...@googlegroups.com. >> For more options, visit this group at >> http://groups.google.com/group/puppet-users?hl=en. >> > > -- You received this message because you are subscribed to the Google Groups "Puppet Users" group. To post to this group, send email to puppet-users@googlegroups.com. To unsubscribe from this group, send email to puppet-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.