Changeset 1094
- Timestamp:
- 06/15/11 14:56:32 (11 months ago)
- Location:
- trunk
- Files:
-
- 103 removed
- 80 modified
- 116 copied
-
. (modified) (1 prop)
-
CHANGE (modified) (1 diff)
-
doc/templates.txt (copied) (copied from branches/1.x/doc/templates.txt)
-
doc/unwind_init_platform.txt (copied) (copied from branches/1.x/doc/unwind_init_platform.txt)
-
etc/default-dist/bdd.defines (modified) (2 diffs)
-
etc/default-dist/global.defines (modified) (2 diffs)
-
etc/default-dist/ldap.defines (modified) (1 diff)
-
etc/default-dist/lists.defines (modified) (1 diff)
-
etc/default-dist/proxy.defines (modified) (1 diff)
-
etc/default-dist/svn.defines (modified) (2 diffs)
-
etc/default-dist/web.defines (modified) (2 diffs)
-
etc/default-dist/webconf.defines (modified) (1 diff)
-
etc/default.defines-dist (modified) (1 diff)
-
etc/localhost.defines-dist (modified) (6 diffs)
-
install.sh (modified) (8 diffs)
-
lib/etc/deb.defines (deleted)
-
lib/etc/rpm.defines (deleted)
-
lib/etc/vm.defines (modified) (1 diff)
-
lib/middleware/config_bridges.sh (copied) (copied from branches/1.x/lib/middleware/config_bridges.sh)
-
lib/middleware/config_http_reverse_proxy.sh (modified) (1 diff)
-
lib/middleware/config_http_web_hosting.sh (modified) (1 diff)
-
lib/middleware/config_iptables.sh (modified) (1 diff)
-
lib/middleware/config_lists.sh (modified) (1 diff)
-
lib/middleware/config_log_host.sh (modified) (1 diff)
-
lib/middleware/config_ntpd.sh (modified) (1 diff)
-
lib/middleware/config_smtpd.sh (modified) (1 diff)
-
lib/middleware/config_svn.sh (modified) (1 diff)
-
lib/middleware/create_vm.sh (modified) (1 diff)
-
lib/middleware/create_vmbase.sh (modified) (1 diff)
-
lib/middleware/delete_vm.sh (modified) (1 diff)
-
lib/middleware/init_vh_4_web_hosting.sh (modified) (1 diff)
-
lib/middleware/install_apache_host.sh (modified) (1 diff)
-
lib/middleware/install_hobbit_host.sh (modified) (1 diff)
-
lib/middleware/install_ldap.sh (modified) (1 diff)
-
lib/middleware/install_list.sh (modified) (1 diff)
-
lib/middleware/install_munin_host.sh (modified) (1 diff)
-
lib/middleware/install_mysql.sh (modified) (1 diff)
-
lib/middleware/install_ntpd.sh (modified) (1 diff)
-
lib/middleware/install_platform.sh (deleted)
-
lib/middleware/install_reverse_proxy.sh (modified) (1 diff)
-
lib/middleware/install_smtpd.sh (modified) (1 diff)
-
lib/middleware/install_svn.sh (modified) (1 diff)
-
lib/middleware/install_web_hosting.sh (modified) (1 diff)
-
lib/middleware/install_webconf.sh (modified) (1 diff)
-
lib/middleware/monitoring_vm.sh (modified) (1 diff)
-
lib/middleware/repository.sh (copied) (copied from branches/1.x/lib/middleware/repository.sh)
-
lib/middleware/save_data_user.sh (modified) (1 diff)
-
lib/middleware/save_machine.sh (modified) (1 diff)
-
lib/middleware/update_system.sh (modified) (1 diff)
-
lib/placomgr (modified) (70 diffs)
-
lib/template/apache_mirror.conf (copied) (copied from branches/1.x/lib/template/apache_mirror.conf)
-
lib/template/apache_status.conf (modified) (1 diff)
-
lib/template/auth_ldap_sympa (modified) (4 diffs)
-
lib/template/base.ks (copied) (copied from branches/1.x/lib/template/base.ks)
-
lib/template/conf_sympa (modified) (2 diffs)
-
lib/template/config_hostname.sh (deleted)
-
lib/template/config_initialtree_slapd (copied) (copied from branches/1.x/lib/template/config_initialtree_slapd)
-
lib/template/config_lists_topics.sh (deleted)
-
lib/template/config_log_host (deleted)
-
lib/template/config_mysql_4_vh.ex (copied) (copied from branches/1.x/lib/template/config_mysql_4_vh.ex)
-
lib/template/config_mysql_4_vh.sh (deleted)
-
lib/template/config_postfix_list (modified) (2 diffs)
-
lib/template/config_slapd (copied) (copied from branches/1.x/lib/template/config_slapd)
-
lib/template/config_spip_web.ex (copied) (copied from branches/1.x/lib/template/config_spip_web.ex)
-
lib/template/config_spip_web.pl (deleted)
-
lib/template/create_vm.ex (copied) (copied from branches/1.x/lib/template/create_vm.ex)
-
lib/template/deb/add_extra_repository.ex (copied) (copied from branches/1.x/lib/template/deb/add_extra_repository.ex)
-
lib/template/deb/config_debconf_sympa (modified) (1 diff)
-
lib/template/deb/config_initialtree_slapd (deleted)
-
lib/template/deb/config_iptables.sh (deleted)
-
lib/template/deb/config_log_host (copied) (copied from branches/1.x/lib/template/deb/config_log_host)
-
lib/template/deb/config_log_vm.ex (copied) (copied from branches/1.x/lib/template/deb/config_log_vm.ex)
-
lib/template/deb/config_log_vm.sh (deleted)
-
lib/template/deb/config_network.sh (deleted)
-
lib/template/deb/config_save.ex (copied) (copied from branches/1.x/lib/template/deb/config_save.ex)
-
lib/template/deb/config_save.sh (deleted)
-
lib/template/deb/config_svn_repositories.ex (copied) (copied from branches/1.x/lib/template/deb/config_svn_repositories.ex)
-
lib/template/deb/config_svn_repositories.sh (deleted)
-
lib/template/deb/create_external_bridge.ex (copied) (copied from branches/1.x/lib/template/deb/create_external_bridge.ex)
-
lib/template/deb/create_external_bridge.sh (deleted)
-
lib/template/deb/create_internal_bridge.ex (copied) (copied from branches/1.x/lib/template/deb/create_internal_bridge.ex)
-
lib/template/deb/create_internal_bridge.sh (deleted)
-
lib/template/deb/create_vm.sh (deleted)
-
lib/template/deb/create_vmbase.sh (deleted)
-
lib/template/deb/debian/lenny/install_openmeetings.ex (copied) (copied from branches/1.x/lib/template/deb/debian/lenny/install_openmeetings.ex)
-
lib/template/deb/debian/lenny/install_openmeetings.sh (deleted)
-
lib/template/deb/init_auth.sh (deleted)
-
lib/template/deb/init_config.sh (deleted)
-
lib/template/deb/init_pkg.sh (deleted)
-
lib/template/deb/init_post.sh (deleted)
-
lib/template/deb/init_pre.sh (deleted)
-
lib/template/deb/init_vm.ex (copied) (copied from branches/1.x/lib/template/deb/init_vm.ex)
-
lib/template/deb/install_apache_hobbit.sh (modified) (1 diff)
-
lib/template/deb/install_apache_list.ex (copied) (copied from branches/1.x/lib/template/deb/install_apache_list.ex)
-
lib/template/deb/install_apache_list.sh (deleted)
-
lib/template/deb/install_apache_monitoring.ex (copied) (copied from branches/1.x/lib/template/deb/install_apache_monitoring.ex)
-
lib/template/deb/install_apache_monitoring.sh (deleted)
-
lib/template/deb/install_apache_proxy.ex (copied) (copied from branches/1.x/lib/template/deb/install_apache_proxy.ex)
-
lib/template/deb/install_apache_proxy.sh (deleted)
-
lib/template/deb/install_apache_web_hosting.ex (copied) (copied from branches/1.x/lib/template/deb/install_apache_web_hosting.ex)
-
lib/template/deb/install_apache_web_hosting.sh (deleted)
-
lib/template/deb/install_debconf_debconf.sh (modified) (1 diff, 1 prop)
-
lib/template/deb/install_debconf_sympa.ex (copied) (copied from branches/1.x/lib/template/deb/install_debconf_sympa.ex)
-
lib/template/deb/install_debconf_sympa.sh (deleted)
-
lib/template/deb/install_debconf_utils.sh (modified) (1 diff, 1 prop)
-
lib/template/deb/install_hobbit_client.ex (copied) (copied from branches/1.x/lib/template/deb/install_hobbit_client.ex)
-
lib/template/deb/install_hobbit_client.sh (deleted)
-
lib/template/deb/install_hobbit_server.ex (copied) (copied from branches/1.x/lib/template/deb/install_hobbit_server.ex)
-
lib/template/deb/install_hobbit_server.sh (deleted)
-
lib/template/deb/install_horde.sh-disabled (modified) (2 diffs)
-
lib/template/deb/install_munin_monitoring.ex (copied) (copied from branches/1.x/lib/template/deb/install_munin_monitoring.ex)
-
lib/template/deb/install_munin_monitoring.sh (deleted)
-
lib/template/deb/install_munin_node.ex (copied) (copied from branches/1.x/lib/template/deb/install_munin_node.ex)
-
lib/template/deb/install_munin_node.sh (deleted)
-
lib/template/deb/install_mysql.ex (copied) (copied from branches/1.x/lib/template/deb/install_mysql.ex)
-
lib/template/deb/install_mysql.sh (deleted)
-
lib/template/deb/install_ntpd.ex (copied) (copied from branches/1.x/lib/template/deb/install_ntpd.ex)
-
lib/template/deb/install_ntpd.sh (deleted)
-
lib/template/deb/install_php5.ex (copied) (copied from branches/1.x/lib/template/deb/install_php5.ex)
-
lib/template/deb/install_php5.sh (deleted)
-
lib/template/deb/install_pkg.sh (modified) (1 diff)
-
lib/template/deb/install_postfix.ex (copied) (copied from branches/1.x/lib/template/deb/install_postfix.ex)
-
lib/template/deb/install_postfix.sh (deleted)
-
lib/template/deb/install_proftpd.sh (modified) (1 diff)
-
lib/template/deb/install_slapd.ex (copied) (copied from branches/1.x/lib/template/deb/install_slapd.ex)
-
lib/template/deb/install_slapd.sh (deleted)
-
lib/template/deb/install_svn.ex (copied) (copied from branches/1.x/lib/template/deb/install_svn.ex)
-
lib/template/deb/install_svn.sh (deleted)
-
lib/template/deb/install_sympa.ex (copied) (copied from branches/1.x/lib/template/deb/install_sympa.ex)
-
lib/template/deb/install_sympa.sh (deleted)
-
lib/template/deb/install_unzip.ex (copied) (copied from branches/1.x/lib/template/deb/install_unzip.ex)
-
lib/template/deb/install_unzip.sh (deleted)
-
lib/template/deb/iptables (modified) (2 diffs)
-
lib/template/deb/kvm (copied) (copied from branches/1.x/lib/template/deb/kvm)
-
lib/template/deb/os.defines (copied) (copied from branches/1.x/lib/template/deb/os.defines)
-
lib/template/deb/ports_monitoring (copied) (copied from branches/1.x/lib/template/deb/ports_monitoring)
-
lib/template/deb/ports_reverse_proxy (copied) (copied from branches/1.x/lib/template/deb/ports_reverse_proxy)
-
lib/template/deb/restart_iptables.ex (copied) (copied from branches/1.x/lib/template/deb/restart_iptables.ex)
-
lib/template/deb/start_vm.sh (deleted)
-
lib/template/deb/stop_vm.ex (copied) (copied from branches/1.x/lib/template/deb/stop_vm.ex)
-
lib/template/deb/ubuntu/create-xen-image.sh (modified) (2 diffs)
-
lib/template/deb/update_host.ex (copied) (copied from branches/1.x/lib/template/deb/update_host.ex)
-
lib/template/deb/update_host.sh (deleted)
-
lib/template/deb/update_pkg.ex (copied) (copied from branches/1.x/lib/template/deb/update_pkg.ex)
-
lib/template/deb/update_pkg.sh (deleted)
-
lib/template/deb/xen (copied) (copied from branches/1.x/lib/template/deb/xen)
-
lib/template/deb/xen/config_vm.ex (copied) (copied from branches/1.x/lib/template/deb/xen/config_vm.ex)
-
lib/template/delete_vm.sh (deleted)
-
lib/template/file_template (deleted)
-
lib/template/hobbit_bb-hosts (modified) (2 diffs)
-
lib/template/horde_hook (modified) (1 diff)
-
lib/template/hosts (modified) (3 diffs)
-
lib/template/hosts.ex (copied) (copied from branches/1.x/lib/template/hosts.ex)
-
lib/template/hosts.sh (deleted)
-
lib/template/initialize_ldap_db.ex (copied) (copied from branches/1.x/lib/template/initialize_ldap_db.ex)
-
lib/template/install_horde.ex (copied) (copied from branches/1.x/lib/template/install_horde.ex)
-
lib/template/install_horde.sh (deleted)
-
lib/template/install_platform.sh (deleted)
-
lib/template/install_spip.ex (copied) (copied from branches/1.x/lib/template/install_spip.ex)
-
lib/template/install_spip.sh (deleted)
-
lib/template/install_spip_cnrs_kit.ex (copied) (copied from branches/1.x/lib/template/install_spip_cnrs_kit.ex)
-
lib/template/install_spip_cnrs_kit.sh (deleted)
-
lib/template/ipforward.sh (deleted)
-
lib/template/kvm (copied) (copied from branches/1.x/lib/template/kvm)
-
lib/template/kvm/create_vm.ex (copied) (copied from branches/1.x/lib/template/kvm/create_vm.ex)
-
lib/template/kvm/create_vmbase.ex (copied) (copied from branches/1.x/lib/template/kvm/create_vmbase.ex)
-
lib/template/kvm/delete_vm.ex (copied) (copied from branches/1.x/lib/template/kvm/delete_vm.ex)
-
lib/template/kvm/mountdisk_vm.ex (copied) (copied from branches/1.x/lib/template/kvm/mountdisk_vm.ex)
-
lib/template/kvm/start_vm.ex (copied) (copied from branches/1.x/lib/template/kvm/start_vm.ex)
-
lib/template/kvm/stop_vm.ex (copied) (copied from branches/1.x/lib/template/kvm/stop_vm.ex)
-
lib/template/kvm/umountdisk_vm.ex (copied) (copied from branches/1.x/lib/template/kvm/umountdisk_vm.ex)
-
lib/template/main_postfix_host (modified) (6 diffs)
-
lib/template/main_postfix_vm (copied) (copied from branches/1.x/lib/template/main_postfix_vm)
-
lib/template/maps_postfix_host.ex (copied) (copied from branches/1.x/lib/template/maps_postfix_host.ex)
-
lib/template/maps_postfix_host.sh (deleted)
-
lib/template/maps_postfix_vm.ex (copied) (copied from branches/1.x/lib/template/maps_postfix_vm.ex)
-
lib/template/maps_postfix_vm.sh (deleted)
-
lib/template/mk_ldap_group_4_svn.ex (copied) (copied from branches/1.x/lib/template/mk_ldap_group_4_svn.ex)
-
lib/template/mk_ldap_group_4_svn.sh (deleted)
-
lib/template/mk_ldap_group_4_vh.ex (copied) (copied from branches/1.x/lib/template/mk_ldap_group_4_vh.ex)
-
lib/template/mk_ldap_group_4_vh.sh (deleted)
-
lib/template/mkdir.sh (deleted)
-
lib/template/mkdir_vh_docroot.ex (copied) (copied from branches/1.x/lib/template/mkdir_vh_docroot.ex)
-
lib/template/mkdir_vh_docroot.sh (deleted)
-
lib/template/mkdir_vh_logdir.ex (copied) (copied from branches/1.x/lib/template/mkdir_vh_logdir.ex)
-
lib/template/mkdir_vh_logdir.sh (deleted)
-
lib/template/munin-node.conf (modified) (2 diffs)
-
lib/template/muninconf.ex (copied) (copied from branches/1.x/lib/template/muninconf.ex)
-
lib/template/muninconf.sh (deleted)
-
lib/template/network-placo (modified) (2 diffs)
-
lib/template/ntp_conf (modified) (2 diffs, 1 prop)
-
lib/template/ports_monitoring (deleted)
-
lib/template/ports_reverse_proxy (deleted)
-
lib/template/post_install_sympa.ex (copied) (copied from branches/1.x/lib/template/post_install_sympa.ex)
-
lib/template/post_install_sympa.sh (deleted)
-
lib/template/remove_ssh_keys.ex (copied) (copied from branches/1.x/lib/template/remove_ssh_keys.ex)
-
lib/template/restart_apache.ex (copied) (copied from branches/1.x/lib/template/restart_apache.ex)
-
lib/template/restart_apache.sh (deleted)
-
lib/template/restart_hobbit.ex (copied) (copied from branches/1.x/lib/template/restart_hobbit.ex)
-
lib/template/restart_hobbit.sh (deleted)
-
lib/template/restart_log.ex (copied) (copied from branches/1.x/lib/template/restart_log.ex)
-
lib/template/restart_log.sh (deleted)
-
lib/template/restart_munin_node.ex (copied) (copied from branches/1.x/lib/template/restart_munin_node.ex)
-
lib/template/restart_munin_node.sh (deleted)
-
lib/template/restart_mysql.ex (copied) (copied from branches/1.x/lib/template/restart_mysql.ex)
-
lib/template/restart_mysql.sh (deleted)
-
lib/template/restart_ntpd.ex (copied) (copied from branches/1.x/lib/template/restart_ntpd.ex)
-
lib/template/restart_ntpd.sh (deleted)
-
lib/template/restart_postfix.ex (copied) (copied from branches/1.x/lib/template/restart_postfix.ex)
-
lib/template/restart_postfix.sh (deleted)
-
lib/template/restart_sympa.ex (copied) (copied from branches/1.x/lib/template/restart_sympa.ex)
-
lib/template/restart_sympa.sh (deleted)
-
lib/template/rpm/centos/add_extra_repository.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/add_extra_repository.ex)
-
lib/template/rpm/centos/centos5 (deleted)
-
lib/template/rpm/centos/config_iptables.sh (deleted)
-
lib/template/rpm/centos/config_log_vm.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/config_log_vm.ex)
-
lib/template/rpm/centos/config_log_vm.sh (deleted)
-
lib/template/rpm/centos/config_network.sh (deleted)
-
lib/template/rpm/centos/config_save.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/config_save.ex)
-
lib/template/rpm/centos/config_save.sh (deleted)
-
lib/template/rpm/centos/create_external_bridge.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/create_external_bridge.ex)
-
lib/template/rpm/centos/create_external_bridge.sh (deleted)
-
lib/template/rpm/centos/create_internal_bridge.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/create_internal_bridge.ex)
-
lib/template/rpm/centos/create_internal_bridge.sh (deleted)
-
lib/template/rpm/centos/create_vm.sh (deleted)
-
lib/template/rpm/centos/create_vmbase.sh (deleted)
-
lib/template/rpm/centos/ifcfg-eth0 (modified) (1 diff)
-
lib/template/rpm/centos/init_auth.sh (deleted)
-
lib/template/rpm/centos/init_config.sh (deleted)
-
lib/template/rpm/centos/init_pkg.sh (deleted)
-
lib/template/rpm/centos/init_post.sh (deleted)
-
lib/template/rpm/centos/init_pre.sh (deleted)
-
lib/template/rpm/centos/init_vm.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/init_vm.ex)
-
lib/template/rpm/centos/install_apache_monitoring.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_apache_monitoring.ex)
-
lib/template/rpm/centos/install_apache_monitoring.sh (deleted)
-
lib/template/rpm/centos/install_apache_proxy.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_apache_proxy.ex)
-
lib/template/rpm/centos/install_hobbit_client.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_hobbit_client.ex)
-
lib/template/rpm/centos/install_hobbit_client.sh (deleted)
-
lib/template/rpm/centos/install_hobbit_server.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_hobbit_server.ex)
-
lib/template/rpm/centos/install_hobbit_server.sh (deleted)
-
lib/template/rpm/centos/install_munin_monitoring.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_munin_monitoring.ex)
-
lib/template/rpm/centos/install_munin_monitoring.sh (deleted)
-
lib/template/rpm/centos/install_munin_node.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_munin_node.ex)
-
lib/template/rpm/centos/install_munin_node.sh (deleted)
-
lib/template/rpm/centos/install_mysql.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_mysql.ex)
-
lib/template/rpm/centos/install_ntpd.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_ntpd.ex)
-
lib/template/rpm/centos/install_ntpd.sh (deleted)
-
lib/template/rpm/centos/install_postfix.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_postfix.ex)
-
lib/template/rpm/centos/install_postfix.sh (deleted)
-
lib/template/rpm/centos/install_slapd.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/install_slapd.ex)
-
lib/template/rpm/centos/iptables (modified) (4 diffs)
-
lib/template/rpm/centos/kvm (copied) (copied from branches/1.x/lib/template/rpm/centos/kvm)
-
lib/template/rpm/centos/kvm/config_vm.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/kvm/config_vm.ex)
-
lib/template/rpm/centos/ldap.conf (modified) (1 diff)
-
lib/template/rpm/centos/network (modified) (1 diff)
-
lib/template/rpm/centos/ports_monitoring (copied) (copied from branches/1.x/lib/template/rpm/centos/ports_monitoring)
-
lib/template/rpm/centos/ports_reverse_proxy (copied) (copied from branches/1.x/lib/template/rpm/centos/ports_reverse_proxy)
-
lib/template/rpm/centos/restart_iptables.ex (copied) (copied from branches/1.x/lib/template/rpm/centos/restart_iptables.ex)
-
lib/template/rpm/centos/start_vm.sh (deleted)
-
lib/template/rpm/centos/xen (copied) (copied from branches/1.x/lib/template/rpm/centos/xen)
-
lib/template/rpm/config_log_host (copied) (copied from branches/1.x/lib/template/rpm/config_log_host)
-
lib/template/rpm/install_apache.sh (deleted)
-
lib/template/rpm/install_pkg.sh (modified) (1 diff)
-
lib/template/rpm/os.defines (copied) (copied from branches/1.x/lib/template/rpm/os.defines)
-
lib/template/rpm/update_pkg.ex (copied) (copied from branches/1.x/lib/template/rpm/update_pkg.ex)
-
lib/template/rpm/update_pkg.sh (deleted)
-
lib/template/save_dir.ex (copied) (copied from branches/1.x/lib/template/save_dir.ex)
-
lib/template/save_dir.sh (deleted)
-
lib/template/save_etc_placo.ex (copied) (copied from branches/1.x/lib/template/save_etc_placo.ex)
-
lib/template/save_etc_placo.sh (deleted)
-
lib/template/save_ldap.ex (copied) (copied from branches/1.x/lib/template/save_ldap.ex)
-
lib/template/save_ldap.sh (deleted)
-
lib/template/save_mysql.ex (copied) (copied from branches/1.x/lib/template/save_mysql.ex)
-
lib/template/save_mysql.sh (deleted)
-
lib/template/save_vm.ex (copied) (copied from branches/1.x/lib/template/save_vm.ex)
-
lib/template/save_vm.sh (deleted)
-
lib/template/sh_template (deleted)
-
lib/template/stop_vm.sh (deleted)
-
lib/template/vh4http_server (modified) (2 diffs)
-
lib/template/vh4monitoring (modified) (2 diffs)
-
lib/template/vh4reverse_proxy (modified) (2 diffs)
-
lib/template/vh4svn_server (modified) (3 diffs)
-
lib/template/vh_common4reverse_proxy.pm (modified) (1 diff)
-
lib/template/vh_horde4reverse_proxy (modified) (3 diffs)
-
lib/template/vh_spip4reverse_proxy (modified) (3 diffs)
-
lib/template/vh_static4reverse_proxy (modified) (3 diffs)
-
lib/template/vh_svn4reverse_proxy (modified) (4 diffs)
-
lib/template/vh_sympa4reverse_proxy (modified) (3 diffs)
-
lib/template/xen (copied) (copied from branches/1.x/lib/template/xen)
-
lib/template/xen!create_external_interface.pl (copied) (copied from branches/1.x/lib/template/xen!create_external_interface.pl)
-
lib/template/xen/create_vmbase.ex (copied) (copied from branches/1.x/lib/template/xen/create_vmbase.ex)
-
lib/template/xen/delete_vm.ex (copied) (copied from branches/1.x/lib/template/xen/delete_vm.ex)
-
lib/template/xen/mountdisk_vm.ex (copied) (copied from branches/1.x/lib/template/xen/mountdisk_vm.ex)
-
lib/template/xen/start_vm.ex (copied) (copied from branches/1.x/lib/template/xen/start_vm.ex)
-
lib/template/xen/stop_vm.ex (copied) (copied from branches/1.x/lib/template/xen/stop_vm.ex)
-
lib/template/xen/umountdisk_vm.ex (copied) (copied from branches/1.x/lib/template/xen/umountdisk_vm.ex)
-
lib/toplevel/init_platform (modified) (2 diffs)
-
lib/toplevel/install_platform (deleted)
-
lib/toplevel/install_proxy (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property
svn:mergeinfo set
to
/branches/1.x merged eligible
-
Property
svn:mergeinfo set
to
-
trunk/CHANGE
r1018 r1094 37 37 + placomgr: [user,group,mode] can now be specified for the 38 38 destination of a 'put' directive (see placomgr --man) 39 + option to add a second disk for VM data user40 + Add iptables rules for VM41 + Change name : lib/repository to lib/template42 + New top level command : save_and_update43 + Create a user admin in ldap base (use for admin in horde and sympa)39 + option to add a second disk for VM data user 40 + Add iptables rules for VM 41 + Change name : lib/repository to lib/template 42 + New top level command : save_and_update 43 + Create a user admin in ldap base (use for admin in horde and sympa) 44 44 45 45 release-0.8 2009-12-27 46 46 47 47 + vh reorganisation for better understanding 48 + postfix for all vm49 + create a vm for mysql server50 + enable munin monitoring of apache and xen51 + add postfix on all vm for redirect root mail52 + route administrative mail (root@placohost) to the right platform administrator with a smart sender address (<user>-<vm>.<platfrom>@<hostname.fqdn>)53 + disable ipv6 module for vm54 + iptables on host system55 + possibility install placo with only one network interface56 + Now install vm and vm configuration use the same mirror that the host system57 + placocheck : Program to check placo platform configuration48 + postfix for all vm 49 + create a vm for mysql server 50 + enable munin monitoring of apache and xen 51 + add postfix on all vm for redirect root mail 52 + route administrative mail (root@placohost) to the right platform administrator with a smart sender address (<user>-<vm>.<platfrom>@<hostname.fqdn>) 53 + disable ipv6 module for vm 54 + iptables on host system 55 + possibility install placo with only one network interface 56 + Now install vm and vm configuration use the same mirror that the host system 57 + placocheck : Program to check placo platform configuration 58 58 59 59 release-0.9 2010-03-17 60 60 61 + Manage svn repository rights with ldap group (read only and read & write)61 + Manage svn repository rights with ldap group (read only and read & write) 62 62 63 63 release-0.10 2010-06-03 64 64 65 + install_debian.sh: new option -q (quiet)66 + placocheck checks now if the network public interface is up67 + new help for placosh and placocheck68 + install_debian.sh now installs only the mandatory *.defines files (global,proxy,bdd, ldap)69 + all vm log are saved on the host in /var/log/placo/year/month/day/hostname.log70 + placomgr now checks return code of each sub run, and aborts at the first non null71 + each script in toplevel and middleware now sources an error library which manage the display of execution72 + a new service of monitoring for the whole platform (hobbit)73 + rights for svn repositories access are now managed via LDAP groups65 + install_debian.sh: new option -q (quiet) 66 + placocheck checks now if the network public interface is up 67 + new help for placosh and placocheck 68 + install_debian.sh now installs only the mandatory *.defines files (global,proxy,bdd, ldap) 69 + all vm log are saved on the host in /var/log/placo/year/month/day/hostname.log 70 + placomgr now checks return code of each sub run, and aborts at the first non null 71 + each script in toplevel and middleware now sources an error library which manage the display of execution 72 + a new service of monitoring for the whole platform (hobbit) 73 + rights for svn repositories access are now managed via LDAP groups 74 74 75 75 release-0.11 2010-06-13 76 + review of the whole documentation and README77 + install_debian: stdout sent into a logfile is now the default 78 option -q (quiet) is replaced by -t (trace), 79 which send stdout into screen80 + placomgr: new option broadcast81 check of undefined variables in defines files82 trace rexec, lexec and put operations76 + review of the whole documentation and README 77 + install_debian: stdout sent into a logfile is now the default 78 option -q (quiet) is replaced by -t (trace), 79 which send stdout into screen 80 + placomgr: new option broadcast 81 check of undefined variables in defines files 82 trace rexec, lexec and put operations 83 83 84 84 trunk in progress 85 + begin of centos+kvm port 86 + new option --expand in placomgr 87 + placocheck more precise : can use tcp/udp in place of icmp 85 + begin of centos+kvm port 86 + placomgr try to prefix the name of a template with the value of the variable defined by 'prefix' 87 + new option --expand in placomgr 88 + placocheck more precise : can use tcp/udp in place of icmp 89 90 branches/1.x in progress 91 + support of kvm/centos is now in progress 92 . install will replace install_debian 93 . install generates a install.defines file which contain th os and hypervisor detected at installation 94 + placomgr defines a new variable BROADCAST 95 + placomgr search a 'defines' file on each directory along the template path 96 + declaration for put, rexec and lexec operations are suppressed 97 + new args for placomgr : 98 . --delimiters to specify begin/end of Perl code in templates 99 + new syntax for the operation : 100 . --put "template destination [u:user] [g:group] [m:mode]" 101 . --rexec "template [args]" 102 . --lexec "template [args]" 103 + --debug needs now a tag 104 + --expand replaced by --debug expand 105 + suffix of exec templates are now .ex 106 + the delimiters for code Perl in templates are now '{!' and '!}' by default -
trunk/etc/default-dist/bdd.defines
r837 r1094 5 5 6 6 <machine bdd> 7 os lenny 8 include deb.defines 7 os $host_os 9 8 memory 256 10 9 # Create a data disk with 5 Go for svn repository 11 10 size_data 10 12 11 path_data /var/lib/svn 13 14 # installation15 include init_vm.defines16 17 # destruction18 # CAUTION: uncomment the following line only if you want to be able to19 # delete this vm with delete_vm.sh20 #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh21 12 22 13 # network … … 27 18 #cron_save_vm 0 1 5 * * 28 19 29 # Mysql30 rexec install_mysql.sh31 lexec save_mysql.sh32 rexec restart_mysql.sh33 20 </machine> -
trunk/etc/default-dist/global.defines
r1016 r1094 7 7 spool_dir /tmp 8 8 thirdparty_url http://placodev.mathrice.fr/third-party 9 debian_mirror http://ftp.fr.debian.org/debian 9 debian_mirror http://ftp.fr.debian.org/debian/ 10 centos_mirror http://ftp.ciril.fr/pub/linux/centos/5.6/os/i386/ 10 11 vmbase_name base 11 12 vmbase_ip 192.168.122.253 … … 27 28 28 29 # list of variable names used to prefix templates 29 prefix hypervisor os 30 hypervisor kvm 30 prefix hypervisor 31 31 32 32 # -
trunk/etc/default-dist/ldap.defines
r705 r1094 10 10 11 11 <machine ldap> 12 os lenny 13 include deb.defines 12 os $host_os 14 13 15 # installation16 include init_vm.defines17 18 # destruction19 # CAUTION: uncomment the following line only if you want to be able to20 # delete this vm with delete_vm.sh21 #lexec delete_vm.sh22 23 14 # network 24 15 hostname ldap 25 16 nb_interface 1 26 17 27 # rexec install_apache.sh28 put config_initialtree_slapd /root/config_initialtree_slapd29 #put horde.schema /root/horde.schema30 rexec install_slapd.sh31 32 18 # Save 33 19 #cron_save_vm 0 1 2 * * 34 lexec save_ldap.sh 20 35 21 </machine> -
trunk/etc/default-dist/lists.defines
r900 r1094 10 10 11 11 <machine lists> 12 os lenny12 os $host_os 13 13 memory 256 14 include deb.defines15 16 # installation17 include init_vm.defines18 19 # destruction20 # CAUTION: uncomment the following line only if you want to be able to21 # delete this vm with delete_vm.sh22 #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh23 14 24 15 # network 25 16 hostname lists 26 17 nb_interface 1 27 28 # Postfix29 put config_postfix_list /etc/postfix/main.cf30 31 # Apache32 rexec restart_apache.sh33 rexec install_apache_list.sh34 rexec restart_apache.sh35 36 # Sympa37 put config_debconf_sympa /root/config_debconf_sympa38 rexec install_debconf_sympa.sh39 rexec install_sympa.sh40 put auth_ldap_sympa /etc/sympa/auth.conf41 put conf_sympa /etc/sympa/sympa.conf42 rexec post_install_sympa.sh43 rexec restart_sympa.sh44 put conf_topics /etc/sympa/topics.conf45 18 46 19 # Save -
trunk/etc/default-dist/proxy.defines
r1014 r1094 5 5 6 6 <machine proxy> 7 os lenny 8 include deb.defines 7 os $host_os 9 8 10 9 ip_forward 1 11 12 # installation13 include init_proxy.defines14 15 # destruction16 # CAUTION: uncomment the following line only if you want to be able to17 # delete this vm with delete_vm.sh18 #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh19 10 20 11 # network 21 12 hostname proxy 22 13 nb_interface 2 23 # iptables 24 25 # reverse proxy apache 26 rexec install_apache_proxy.sh 27 rexec active_apache_proxy.sh 28 rexec restart_apache.sh 29 rexec mkdir_vh_logdir.sh 30 put apache_status.conf $apache_server_root/mods-available/status.conf 31 put ports_reverse_proxy $apache_server_root/ports.conf 32 put vh4reverse_proxy $apache_server_root/conf.d/vh.conf 33 put vh_spip4reverse_proxy $apache_server_root/conf.d/spip.conf 34 put vh_svn4reverse_proxy $apache_server_root/conf.d/svn.conf 35 put vh_sympa4reverse_proxy $apache_server_root/conf.d/sympa.conf 36 put vh_horde4reverse_proxy $apache_server_root/conf.d/horde.conf 37 put vh_static4reverse_proxy $apache_server_root/conf.d/static.conf 38 put runcronjobs.conf /etc 39 14 40 15 # Save 41 16 #cron_save_vm 0 1 1 * * -
trunk/etc/default-dist/svn.defines
r900 r1094 7 7 8 8 <machine svn> 9 os lenny 10 include deb.defines 9 os $host_os 11 10 12 11 # Create a data disk with 5 Go for svn repository 13 12 size_data 5 14 13 path_data /var/lib/svn 15 16 # installation17 include init_vm.defines18 19 # destruction20 # CAUTION: uncomment the following line only if you want to be able to21 # delete this vm with delete_vm.sh22 #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh23 14 24 15 # network … … 30 21 repositories repo1,repo2,repo3 31 22 32 # install svn33 rexec install_svn.sh34 put apache_status.conf $apache_server_root/mods-available/status.conf35 put vh4svn_server $apache_server_root/conf.d/svn.conf36 rexec restart_apache.sh37 rexec config_svn_repositories.sh38 rexec mk_ldap_group_4_svn.sh39 40 23 # Save 41 24 #cron_save_vm 0 1 5 * * -
trunk/etc/default-dist/web.defines
r918 r1094 7 7 8 8 <machine web> 9 os lenny9 os $host_os 10 10 memory 256 11 11 size_data 5 12 12 path_data /htdocs 13 include deb.defines14 13 15 # installation16 include init_vm.defines17 18 # destruction19 # CAUTION: uncomment the following line only if you want to be able to20 # delete this vm with delete_vm.sh21 #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh22 14 # network 23 15 hostname web … … 26 18 # http 27 19 htdocs /htdocs 28 rexec install_apache_web_hosting.sh29 rexec config_mysql_4_vh.sh30 rexec install_php5.sh31 rexec restart_apache.sh32 rexec mkdir_vh_docroot.sh33 rexec mk_ldap_group_4_vh.sh34 put apache_status.conf $apache_server_root/mods-available/status.conf35 put vh4http_server $apache_server_root/conf.d/vh.conf36 20 37 # spip38 rexec install_unzip.sh39 rexec install_spip.sh40 rexec install_spip_cnrs_kit.sh41 rexec config_spip_web.pl['{{','}}']42 # horde43 put horde_hook['{{','}}'] /tmp/horde_hook44 rexec install_horde.sh45 46 21 # save 47 22 savedir /htdocs /etc/apache2 -
trunk/etc/default-dist/webconf.defines
r880 r1094 5 5 6 6 <machine webconf> 7 os lenny 8 include deb.defines 7 os $host_os 9 8 10 9 # No data disk 11 10 #size_data 2 12 11 #path_data /data 13 14 # installation15 include init_vm.defines16 17 # destruction18 # CAUTION: uncomment the following line only if you want to be able to19 # delete this vm with delete_vm.sh20 #lexec delete_vm.sh # uncomment only if you want to be able to delete this vm with delete_vm.sh21 12 22 13 # openmeetings -
trunk/etc/default.defines-dist
r1038 r1094 221 221 ## 222 222 223 include install.defines 223 224 include localhost.defines 224 225 include default/*.defines -
trunk/etc/localhost.defines-dist
r1000 r1094 5 5 6 6 <machine localhost> 7 os lenny 8 include deb.defines 9 7 os $host_os 8 10 9 #virtualisation 11 virt_soft xen10 virt_soft $hypervisor 12 11 13 12 # network … … 21 20 lexec create_vmbase.sh 22 21 nb_interface 2 23 put iptables $iptables_script22 #put iptables $iptables_script 24 23 rexec config_iptables.sh 25 24 … … 27 26 lexec install_postfix.sh 28 27 lexec maps_postfix_host.sh 29 put main_postfix_host /etc/postfix/main.cf28 #put main_postfix_host /etc/postfix/main.cf 30 29 lexec restart_postfix.sh 31 30 … … 33 32 rexec install_ntpd.sh 34 33 rexec restart_ntpd.sh 35 put ntp_conf /etc/ntp.conf34 #put ntp_conf /etc/ntp.conf 36 35 #list of ntp server 37 36 ntp_server ntp.obspm.fr ntp.univ-angers.fr … … 39 38 # monitoring 40 39 lexec install_apache_monitoring.sh 41 put ports_monitoring $apache_conf_dir/ports.conf42 put vh4monitoring $apache_autoconf_dir/hobbit43 put apache_status.conf $apache_modconf_dir/status.conf40 #put ports_monitoring $apache_conf_dir/ports.conf 41 #put vh4monitoring $apache_autoconf_dir/hobbit 42 #put apache_status.conf $apache_modconf_dir/status.conf 44 43 lexec restart_apache.sh 45 44 lexec install_munin_monitoring.sh … … 48 47 lexec install_hobbit_client.sh 49 48 lexec install_hobbit_server.sh 50 put hobbit_bb-hosts $hobbit_conf_file49 #put hobbit_bb-hosts $hobbit_conf_file 51 50 52 51 # log 53 put config_log_host $rsyslog_conf_file52 #put config_log_host $rsyslog_conf_file 54 53 rexec restart_log.sh 55 54 -
trunk/install.sh
r1001 r1094 98 98 { 99 99 true 100 } 101 102 function end_xen 103 { 104 echo "########### REBOOT YOUR SYSTEM TO FINISH INSTALLATION ############" 105 } 106 107 function end_kvm 108 { 109 /etc/init.d/libvirtd start 100 110 } 101 111 … … 171 181 then 172 182 # mode devel 173 lastest="trunk" 174 depot=${repo}/trunk/ 183 #lastest="trunk" 184 #depot=${repo}/trunk/ 185 lastest="branches/1.x" 186 depot=${repo}/branches/1.x/ 175 187 srcdir=${opt_d%%/} 176 188 libdir=$srcdir/lib … … 187 199 fi 188 200 [ "$opt_r" == "" ] || depot=$opt_r 189 echo -ne "\nPress a keyto start installation, or ^C otherwise..."201 echo -ne "\nPress ENTER to start installation, or ^C otherwise..." 190 202 read 191 203 echo … … 197 209 # prerequisited CPAN modules 198 210 set_step "Perl CPAN modules installation" 199 echo no | cpan -i CPAN 211 cpandir=$(find /usr/lib -name CPAN) 212 [ -e "$cpandir/Config.pm" ] || cat << 'EOL' > $cpandir/Config.pm 213 $CPAN::Config = { 214 'build_cache' => q[10], 215 'build_dir' => q[/root/.cpan/build], 216 'cache_metadata' => q[1], 217 'cpan_home' => q[/root/.cpan], 218 'dontload_hash' => { }, 219 'ftp' => q[/usr/kerberos/bin/ftp], 220 'ftp_proxy' => q[], 221 'getcwd' => q[cwd], 222 'gpg' => q[/usr/bin/gpg], 223 'gzip' => q[/bin/gzip], 224 'histfile' => q[/root/.cpan/histfile], 225 'histsize' => q[100], 226 'http_proxy' => q[], 227 'inactivity_timeout' => q[0], 228 'index_expire' => q[1], 229 'inhibit_startup_message' => q[0], 230 'keep_source_where' => q[/root/.cpan/sources], 231 'links' => q[], 232 'make' => q[/usr/bin/make], 233 'make_arg' => q[], 234 'make_install_arg' => q[], 235 'makepl_arg' => q[], 236 'ncftp' => q[], 237 'ncftpget' => q[], 238 'no_proxy' => q[], 239 'pager' => q[/usr/bin/less], 240 'prerequisites_policy' => q[ask], 241 'scan_cache' => q[atstart], 242 'shell' => q[/bin/bash], 243 'tar' => q[/bin/tar], 244 'term_is_latin' => q[1], 245 'unzip' => q[/usr/bin/unzip], 246 'urllist' => [q[http://cpan.enstimac.fr/], q[ftp://ftp.u-strasbg.fr/CPAN], q[ftp://ftp.lip6.fr/pub/perl/CPAN/], q[ftp://ftp.inria.fr/pub/CPAN/], q[ftp://ftp.crihan.fr/mirrors/ftp.cpan.org/], q[ftp://distrib-coffee.ipsl.jussieu.fr/pub/mirrors/cpan/], q[ftp://cpan.cict.fr/pub/CPAN/]], 247 'wget' => q[/usr/bin/wget], 248 }; 249 1; 250 __END__ 251 EOL 252 253 #perl -MCPAN -e "o conf auto_commit" 254 #perl -MCPAN -e "o conf prerequisites_policy follow" 255 #perl -MCPAN -e "o conf build_requires_install_policy yes" 256 200 257 yes "" | cpan -i \ 201 258 YAML \ … … 204 261 Dir::Which \ 205 262 Net::Interface \ 263 XML::Smart \ 206 264 >&3 2>&1 207 yes "" | cpan -if File::Find::Node >&3 2>&1 265 echo "force install File::Find::Node" | cpan >&3 2>&1 208 266 209 267 # PLACO lib … … 211 269 if [ "$opt_d" != "" ] 212 270 then 213 [ -e $srcdir/.svn ] || { yes "p" | svn checkout $depot $srcdir >&3 2>&1 ; }271 [ -e $srcdir/.svn ] || { yes "p" | svn checkout $depot $srcdir >&3 2>&1 ; } 214 272 else 215 273 [ -e $libdir ] || { yes "p" | svn export $depot/lib $libdir >&3 2>&1 ; } … … 257 315 fi 258 316 317 cat << EOL >> $etcdir/install.defines 318 319 # append by install 320 host_os $DIST 321 hypervisor $HYPER 322 EOL 323 259 324 # PLACO post config 260 325 postconf_$DIST … … 286 351 287 352 rm -r -f $tmpdir 288 echo "########### REBOOT YOUR SYSTEM TO FINISH INSTALLATION ############" 353 end_$HYPER 354 -
trunk/lib/etc/vm.defines
r1014 r1094 21 21 # Network 22 22 rexec config_hostname.sh 23 put hosts /etc/hosts23 # put hosts /etc/hosts 24 24 rexec config_network.sh 25 put iptables $iptables_script25 # put iptables $iptables_script 26 26 rexec config_iptables.sh 27 27 28 28 # Munin (monitoring) 29 29 rexec install_munin_node.sh 30 put munin-node.conf $muninnode_file30 # put munin-node.conf $muninnode_file 31 31 rexec restart_munin_node.sh 32 32 -
trunk/lib/middleware/config_http_reverse_proxy.sh
r962 r1094 6 6 7 7 #Put the /etc/hosts on $* with vh address 8 placomgr --put hosts $*9 8 placomgr put hosts /etc/hosts $* 9 10 10 #Put the VirtualHost configuration in apache config 11 placomgr --put vh4reverse_proxy$*12 placomgr --put vh_spip4reverse_proxy$*13 placomgr --put vh_svn4reverse_proxy$*14 placomgr --put vh_sympa4reverse_proxy$*15 placomgr --put vh_horde4reverse_proxy$*16 placomgr --put vh_static4reverse_proxy$*11 placomgr put vh4reverse_proxy {apache_vh_conf_file} $* 12 placomgr put vh_spip4reverse_proxy {apache_spip_conf_file} $* 13 placomgr put vh_svn4reverse_proxy {apache_svn_conf_file} $* 14 placomgr put vh_sympa4reverse_proxy {apache_sympa_conf_file} $* 15 placomgr put vh_horde4reverse_proxy {apache_horde_conf_file} $* 16 placomgr put vh_static4reverse_proxy {apache_static_conf_file} $* 17 17 #Create a log directory for each vh 18 placomgr --rexec mkdir_vh_logdir.sh$*18 placomgr rexec mkdir_vh_logdir.ex $* 19 19 #Restart apache to reload the new config 20 placomgr --rexec restart_apache.sh$*20 placomgr rexec restart_apache.ex $* 21 21 -
trunk/lib/middleware/config_http_web_hosting.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --put apache_status.conf$*8 placomgr --put vh4http_server$*9 placomgr --rexec mk_ldap_group_4_vh.sh$*10 placomgr --rexec mkdir_vh_docroot.sh$*11 placomgr --rexec restart_apache.sh$*7 placomgr put apache_status.conf {apache_status_conf_file} $* 8 placomgr put vh4http_server {apache_vh_conf_file} $* 9 placomgr rexec mk_ldap_group_4_vh.ex $* 10 placomgr rexec mkdir_vh_docroot.ex $* 11 placomgr rexec restart_apache.ex $* -
trunk/lib/middleware/config_iptables.sh
r897 r1094 8 8 9 9 #Put the new iptables script 10 placomgr --put iptables$*10 placomgr put iptables {iptables_script} --mode 700 $* 11 11 #Reload the new iptables rules 12 placomgr --rexec config_iptables.sh$*12 placomgr rexec restart_iptables.ex $* -
trunk/lib/middleware/config_lists.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --put conf_topics$*8 placomgr --rexec restart_sympa.sh$*7 placomgr put conf_topics /etc/sympa/topics.conf $* 8 placomgr rexec restart_sympa.ex $* 9 9 -
trunk/lib/middleware/config_log_host.sh
r897 r1094 1 1 #!/bin/bash 2 2 # $Id: middleware_template 360 2009-07-22 06:29:15Z jaclin $ 3 # maintainer: Nicolas Vuilmet 3 # maintainer: Nicolas Vuilmet 4 4 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --put config_log_host$*8 placomgr --rexec restart_log.sh$*7 placomgr put config_log_host {rsyslog_conf_file} $* 8 placomgr rexec restart_log.ex $* -
trunk/lib/middleware/config_ntpd.sh
r897 r1094 1 1 #!/bin/bash 2 2 # $Id: middleware_template 360 2009-07-22 06:29:15Z jaclin $ 3 # maintainer: Nicolas Vuilmet 3 # maintainer: Nicolas Vuilmet 4 4 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --put ntp_conf $*8 placomgr --rexec restart_ntpd.sh$*7 placomgr put ntp_conf /etc/ntp.conf $* 8 placomgr rexec restart_ntpd.ex $* -
trunk/lib/middleware/config_smtpd.sh
r977 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --lexec maps_postfix_host.sh$*7 placomgr lexec maps_postfix_host.ex $* 8 8 9 placomgr --put main_postfix_host$*9 placomgr put main_postfix_host /etc/postfix/main.cf $* 10 10 11 placomgr --lexec restart_postfix.sh$*11 placomgr lexec restart_postfix.ex $* -
trunk/lib/middleware/config_svn.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --rexec config_svn_repositories.sh$*8 placomgr --rexec mk_ldap_group_4_svn.sh$*9 placomgr --put vh4svn_server$*10 placomgr --rexec restart_apache.sh$*7 placomgr rexec config_svn_repositories.ex $* 8 placomgr rexec mk_ldap_group_4_svn.ex $* 9 placomgr put vh4svn_server {apache_svn_conf_file} $* 10 placomgr rexec restart_apache.ex $* -
trunk/lib/middleware/create_vm.sh
r1014 r1094 9 9 10 10 #Reload /etc/hosts on localhost 11 placomgr --lexec hosts.sh-m localhost11 placomgr lexec hosts.ex -m localhost 12 12 13 # Create the new domaine in xen (image, installation os and configuration)14 placomgr -lexec create_vm.sh$*13 # create a new domaine 14 placomgr lexec create_vm.ex $* 15 15 16 #Reload /etc/hosts on localhost because xen has changed 17 placomgr --lexec hosts.sh -m localhost 16 # configure the VM (offline, write on its cold disk, before running it) 17 placomgr lexec mountdisk_vm.ex $* 18 placomgr lexec config_vm.ex $* 19 placomgr lexec umountdisk_vm.ex $* 20 21 placomgr lexec start_vm.ex $* 22 23 # initialize the VM (inline, while running) 24 placomgr -v rexec init_vm.ex $* 25 26 #Reload /etc/hosts on localhost (require by Xen) 27 placomgr lexec hosts.ex -m localhost 18 28 19 29 #Config save for this VM 20 placomgr --lexec config_save.sh$*30 placomgr lexec config_save.ex $* 21 31 22 #Mount the VM file system23 placomgr -lexec init_pre.sh $*24 #Config root password and sharing ssh key25 placomgr -lexec init_auth.sh $*26 #Install new pakage27 placomgr -lexec init_pkg.sh $*28 #Configure VM services29 placomgr -lexec init_config.sh $*30 #Umount the VM file system31 placomgr -lexec init_post.sh $*32 33 #Start the new VM34 placomgr -lexec start_vm.sh $*35 36 #Wait 10 second (start VM)37 sleep 1038 39 #Fix hostname40 placomgr -rexec config_hostname.sh $*41 #Reload network configuration42 placomgr -rexec config_network.sh $*43 32 #Config iptables 44 config_iptables.sh $* 45 placomgr -rexec ipforward.sh $* 33 config_iptables.sh $* # middleware 46 34 47 35 #Put the new /etc/hosts on proxy (with the new VM) 48 placomgr --puthosts -m proxy36 placomgr put hosts /etc/hosts -m proxy 49 37 #Put /etc/hosts on the new VM 50 placomgr --puthosts $*38 placomgr put hosts /etc/hosts $* 51 39 52 40 # new log config 53 placomgr --rexec config_log_vm.sh $* 41 placomgr rexec config_log_vm.ex $* 42 43 # Enable additionnals packages repository 44 placomgr rexec add_extra_repository.ex $* 54 45 55 46 # Mail 56 placomgr --rexec install_postfix.sh $* 57 placomgr --rexec maps_postfix_vm.sh $* 58 placomgr --rexec restart_postfix.sh $* 47 placomgr rexec install_postfix.ex $* 48 placomgr put main_postfix_vm /etc/postfix/main.cf $* 49 placomgr rexec maps_postfix_vm.ex $* 50 placomgr rexec restart_postfix.ex $* -
trunk/lib/middleware/create_vmbase.sh
r1006 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --lexec create_vmbase.sh -m localhost 7 # apache will be used by the vmbase installation : 8 # to acquire the response file 9 # to relay to a mirror the local HTTP request 10 placomgr put apache_mirror.conf {apache_mirror_conf_file} $* 11 placomgr put base.ks /var/www/base.ks --mode 644 $* 12 placomgr lexec restart_apache.ex $* 13 14 15 placomgr lexec create_vmbase.ex $* -
trunk/lib/middleware/delete_vm.sh
r897 r1094 1 1 #!/bin/bash 2 2 # $Id$ 3 # maintainer: Nicolas Vuilmet 3 # maintainer: Nicolas Vuilmet 4 4 5 5 source $PLACO_libdir/placolib.sh 6 6 7 #Stop the virtual machine and delete the virtual disks 8 placomgr --lexec delete_vm.sh $* 7 # Stop the virtual machine 8 placomgr lexec stop_vm.ex $* 9 10 # Delete the virtual disks 11 placomgr lexec delete_vm.ex $* 12 13 # Remove ssh key 14 placomgr lexec remove_ssh_keys.ex $* -
trunk/lib/middleware/init_vh_4_web_hosting.sh
r947 r1094 6 6 7 7 # mysql 8 placomgr --rexec config_mysql_4_vh.sh$*8 placomgr rexec config_mysql_4_vh.ex $* 9 9 10 10 # spip 11 placomgr --rexec install_spip.sh$*12 placomgr --rexec install_spip_cnrs_kit.sh$*13 placomgr --rexec config_spip_web.pl$*11 placomgr rexec install_spip.ex $* 12 placomgr rexec install_spip_cnrs_kit.ex $* 13 placomgr rexec config_spip_web.ex $* 14 14 15 15 # horde 16 placomgr --puthorde_hook $*17 placomgr --rexec install_horde.sh$*16 placomgr put horde_hook /tmp/horde_hook $* 17 placomgr rexec install_horde.ex $* -
trunk/lib/middleware/install_apache_host.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --lexec install_apache_monitoring.sh$*8 placomgr --put ports_monitoring$*9 placomgr --put apache_status.conf$*10 placomgr --lexec restart_apache.sh$*7 placomgr lexec install_apache_monitoring.ex $* 8 placomgr put ports_monitoring {apache_ports_conf_file} $* 9 placomgr put apache_status.conf {apache_status_conf_file} $* 10 placomgr lexec restart_apache.ex $* 11 11 -
trunk/lib/middleware/install_hobbit_host.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --lexec install_hobbit_client.sh$*8 placomgr --lexec install_hobbit_server.sh$*9 placomgr --put hobbit_bb-hosts$*10 placomgr --put vh4monitoring$*11 placomgr --lexec restart_apache.sh$*7 placomgr lexec install_hobbit_client.ex $* 8 placomgr lexec install_hobbit_server.ex $* 9 placomgr put hobbit_bb-hosts {hobbit_conf_file} $* 10 placomgr put vh4monitoring {apache_hobbit_conf_file} $* 11 placomgr lexec restart_apache.ex $* -
trunk/lib/middleware/install_ldap.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --put config_initialtree_slapd $* 8 #placomgr --put horde.schema $* 9 placomgr --rexec install_slapd.sh $* 7 placomgr put config_initialtree_slapd /root/config_initialtree_slapd $* 8 placomgr rexec install_slapd.ex $* 9 placomgr put config_slapd openldap_config $* 10 placomgr rexec initialize_ldap_db.ex $* -
trunk/lib/middleware/install_list.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --putconfig_debconf_sympa $*8 placomgr --rexec install_apache_list.sh$*9 placomgr --rexec restart_apache.sh$*10 placomgr --rexec install_debconf_sympa.sh$*11 placomgr --rexec install_sympa.sh$*12 placomgr --put conf_sympa /etc/sympa/sympa.conf $*13 placomgr --put auth_ldap_sympa /etc/sympa/auth.conf $*14 placomgr --putconfig_postfix_list /etc/postfix/main.cf $*15 placomgr --rexec post_install_sympa.sh$*16 placomgr --rexec restart_postfix.sh$*17 placomgr --rexec restart_sympa.sh$*7 placomgr put config_debconf_sympa /root/config_debconf_sympa $* 8 placomgr rexec install_apache_list.ex $* 9 placomgr rexec restart_apache.ex $* 10 placomgr rexec install_debconf_sympa.ex $* 11 placomgr rexec install_sympa.ex $* 12 placomgr put conf_sympa /etc/sympa/sympa.conf $* 13 placomgr put auth_ldap_sympa /etc/sympa/auth.conf $* 14 placomgr put config_postfix_list /etc/postfix/main.cf $* 15 placomgr rexec post_install_sympa.ex $* 16 placomgr rexec restart_postfix.ex $* 17 placomgr rexec restart_sympa.ex $* -
trunk/lib/middleware/install_munin_host.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --lexec install_munin_monitoring.sh$*8 placomgr --lexec muninconf.sh$*9 placomgr --lexec restart_munin_node.sh$*7 placomgr lexec install_munin_monitoring.ex $* 8 placomgr lexec muninconf.ex $* 9 placomgr lexec restart_munin_node.ex $* -
trunk/lib/middleware/install_mysql.sh
r897 r1094 1 1 #!/bin/bash 2 2 # $Id: middleware_template 360 2009-07-22 06:29:15Z jaclin $ 3 # maintainer: Nicolas Vuilmet 3 # maintainer: Nicolas Vuilmet 4 4 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --rexec install_mysql.sh$*7 placomgr rexec install_mysql.ex $* -
trunk/lib/middleware/install_ntpd.sh
r897 r1094 1 1 #!/bin/bash 2 2 # $Id: middleware_template 360 2009-07-22 06:29:15Z jaclin $ 3 # maintainer: Nicolas Vuilmet 3 # maintainer: Nicolas Vuilmet 4 4 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --rexec install_ntpd.sh$*7 placomgr rexec install_ntpd.ex $* -
trunk/lib/middleware/install_reverse_proxy.sh
r897 r1094 6 6 7 7 #install apache with reverse proxy module 8 placomgr --rexec install_apache_proxy.sh$*8 placomgr rexec install_apache_proxy.ex $* 9 9 10 10 #enable apache monitoring trough munin-node 11 placomgr --put apache_status.conf$*11 placomgr put apache_status.conf {apache_status_conf_file} $* 12 12 13 13 #set listen interfaces 14 placomgr --put ports_reverse_proxy $* 15 16 placomgr --rexec restart_apache.sh $* 14 placomgr put ports_reverse_proxy {apache_ports_conf_file} $* -
trunk/lib/middleware/install_smtpd.sh
r977 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --lexec install_postfix.sh$*7 placomgr lexec install_postfix.ex $* -
trunk/lib/middleware/install_svn.sh
r897 r1094 3 3 source $PLACO_libdir/placolib.sh 4 4 5 placomgr --rexec install_svn.sh$*6 placomgr --put apache_status.conf$*7 placomgr --put vh4svn_server$*8 placomgr --rexec restart_apache.sh$*5 placomgr rexec install_svn.ex $* 6 placomgr put apache_status.conf {apache_status_conf_file} $* 7 placomgr put vh4svn_server {apache_svn_conf_file} $* 8 placomgr rexec restart_apache.ex $* -
trunk/lib/middleware/install_web_hosting.sh
r896 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --rexec install_apache_web_hosting.sh$*7 placomgr rexec install_apache_web_hosting.ex $* 8 8 9 placomgr --rexec install_php5.sh$*10 placomgr --rexec install_unzip.sh$* # for spip and cnrskit9 placomgr rexec install_php5.ex $* 10 placomgr rexec install_unzip.ex $* # for spip and cnrskit -
trunk/lib/middleware/install_webconf.sh
r897 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 placomgr --rexec install_openmeetings.sh$*7 placomgr rexec install_openmeetings.ex $* -
trunk/lib/middleware/monitoring_vm.sh
r897 r1094 8 8 9 9 # munin-node 10 placomgr --rexec install_munin_node.sh$*11 placomgr --put munin-node.conf$*12 placomgr --rexec restart_munin_node.sh$*10 placomgr rexec install_munin_node.ex $* 11 placomgr put munin-node.conf {muninnode_file} $* 12 placomgr rexec restart_munin_node.ex $* 13 13 14 14 # hobbit 15 placomgr --rexec install_hobbit_client.sh$*15 placomgr rexec install_hobbit_client.ex $* 16 16 17 17 # change config on localhost to see new vm in hobbit and munin 18 placomgr --lexec muninconf.sh-m localhost19 placomgr --put hobbit_bb-hosts-m localhost18 placomgr lexec muninconf.ex -m localhost 19 placomgr put hobbit_bb-hosts {hobbit_conf_file} -m localhost -
trunk/lib/middleware/save_data_user.sh
r897 r1094 7 7 # Save directory 8 8 9 placomgr --lexec save_dir.sh$*9 placomgr lexec save_dir.ex $* 10 10 11 11 # Save data base 12 12 # Save mysql 13 placomgr --lexec save_mysql.sh$*13 placomgr lexec save_mysql.ex $* 14 14 15 15 # Save ldap 16 placomgr --lexec save_ldap.sh$*16 placomgr lexec save_ldap.ex $* -
trunk/lib/middleware/save_machine.sh
r897 r1094 6 6 7 7 #save vm 8 placomgr --lexec save_vm.sh$*8 placomgr lexec save_vm.ex $* 9 9 10 10 #save etc placo 11 placomgr --rexec save_etc_placo.sh$*11 placomgr rexec save_etc_placo.ex $* -
trunk/lib/middleware/update_system.sh
r897 r1094 6 6 7 7 #Update all VM 8 placomgr --rexec update_pkg.sh$*8 placomgr rexec update_pkg.ex $* 9 9 10 10 #Update HÃŽte 11 placomgr --rexec update_host.sh$*11 placomgr rexec update_host.ex $* 12 12 13 echo "=========================== "14 echo "= REBO T YOUR HOST SYSTEM! ="15 echo "=========================== "13 echo "============================" 14 echo "= REBOOT YOUR HOST SYSTEM! =" 15 echo "============================" -
trunk/lib/placomgr
r1036 r1094 1 #!/usr/ bin/perl -w1 #!/usr//bin/perl -w 2 2 3 3 ############################################################ … … 39 39 my $this_prog = basename($0) ; 40 40 my $TEMPLATE_DIR = "template" ; 41 my $PROMPT = " "x 30 ;41 my $PROMPT = " "x20 ; 42 42 my $SCREEN_HANDLE = 3 ; 43 my @DEBUG_TAGS = qw/ env data file conf expand/ ; 43 44 44 45 my $default_conf = { … … 49 50 , "tmp_dir" => "/tmp" 50 51 , "copy_fmt" => "/usr/bin/scp -q %s %s:%s" 52 , "rm_fmt" => "/bin/rm %s" 51 53 , "rexec_fmt" => "/usr/bin/ssh -t %s %s" 52 54 , "hierarchy_var" => "hierarchy" … … 62 64 placomgr - PLACO Manager v$VERSION 63 65 64 Usage : placomgr [options] operation 65 placomgr --help 66 placomgr --man 67 68 Operations are : 69 -l, --lexec template local execution of a templated script 70 -p, --put template upload a templated file 71 -r, --rexec template remote execution of a templated script 72 73 Options : 74 -C config_file 75 -P, --platform platform_name 76 (the environment variable 'PLACO_platform' can also be used) 77 -m, --machine machine_name 78 -d, --debug 79 --dry-run don't apply operation 80 --no-cleanup don't delete temporary files 81 --broadcast return OK even if no machine 82 apply operation 83 --expand only show expanded templates 84 -v, --verbose 66 Usage : placomgr [options] operation args 67 placomgr help 68 placomgr man 69 70 Operation is lexec, rexec or put. 71 72 - placomgr [options] lexec template [args] 73 Local execution of a script (generated from 'template'). 'args' are 74 passed to the script. 75 76 - placomgr [options] rexec template [args] 77 Remote execution of a script (generated from 'template'). 'args' are 78 passed to the script. 79 80 - placomgr [options] [-u user] [-g group] [-m mode] put template target 81 File upload (generated from 'template') to 'target'. If -u, -g or -m 82 are specified, owner, group or perms are set on the target. 83 84 Options are : 85 86 --broadcast return OK even if no machine apply operation 87 -C config_file 88 -d, --debug tag tag must be one of : env data file conf expand 89 --delimiters "ccc,ccc" delimiter pairs for Perl code in template 90 --dry-run don't apply operation 91 -m, --machine machine_name 92 --no-cleanup don't delete temporary files 93 -P, --platform platform_name 94 (the environment variable 'PLACO_platform' can also be used) 95 -v, --verbose 85 96 EOL 86 97 , "placosh" => << "EOL" … … 104 115 placocheck - PLACO configuration validator v$VERSION 105 116 106 Usage : placocheck [options] 117 Usage : placocheck [options] 107 118 placocheck --help 108 119 placocheck --man … … 112 123 -P, --platform platform_name 113 124 (the environment variable 'PLACO_platform' can also be used) 114 -d, --debug 125 -d, --debug tag 115 126 --dry-run 116 127 --no-cleanup … … 132 143 { 133 144 system(@_) ; 134 if ($? == -1) 145 if ($? == -1) 135 146 { 136 147 Log::err(sprintf("failed to execute '%s': $!",join(" ",@_)),9) ; 137 148 } 138 elsif ($? & 127) 149 elsif ($? & 127) 139 150 { 140 151 Log::err(sprintf("'%s' died with signal %d",join(" ",@_),($? & 127)),9) ; 141 152 } 142 elsif ($? >> 8 !=0) 153 elsif ($? >> 8 !=0) 143 154 { 144 155 Log::err(sprintf("child exited with value %d",$? >> 8),9) ; … … 152 163 our @ISA = qw(Exporter); 153 164 our @EXPORT=qw() ; 165 use Data::Dumper ; 154 166 155 167 #-------------------- 156 168 sub new 157 169 { 158 my($type,$level) = @_ ; 159 my($this) ; 160 161 $this->{"level"} = $level ; 170 my($type,$verbose,$debug) = @_ ; 171 my($this,%tags) ; 172 173 $this->{verbose} = $verbose || 0 ; 174 $this->{debug} = $debug || 0 ; 162 175 bless $this,$type ; 176 177 %tags = map { $_ => 1 ; } @DEBUG_TAGS ; 178 err("debug tag must be one of: ".join(",",@DEBUG_TAGS)." !",21) 179 if defined($debug) && ! exists $tags{$debug} ; 163 180 return $this ; 164 181 } … … 166 183 sub debug 167 184 { 185 my($this,$level,$msg) = @_ ; 186 print "$msg\n" if $this->{debug} eq $level ; 187 } 188 sub info 189 { 168 190 my($this,$msg) = @_ ; 169 print "$msg\n" if $this->{"level"}==2 ; 170 } 171 sub info 172 { 173 my($this,$msg) = @_ ; 174 print "$msg\n" if $this->{"level"}>=1 ; 191 print "$msg\n" if $this->{verbose} ; 175 192 } 176 193 sub err … … 178 195 my($msg,$retcode) = @_ ; 179 196 print "ERROR:$retcode: $msg\n" ; 180 $screen->print(" placomgr [ ERR ($retcode) $msg ]\n") ;197 $screen->print("\nplacomgr [ ERR ($retcode) $msg ]\n") ; 181 198 exit($retcode) ; 182 199 } … … 281 298 sub new 282 299 { 283 my($type,$data,$machine,$fqmachine ) = @_ ;300 my($type,$data,$machine,$fqmachine,$debug) = @_ ; 284 301 my($this) ; 285 302 … … 287 304 $this->{machine} = $machine ; 288 305 $this->{fqmachine} = $fqmachine ; 306 $this->{debug} = $debug ; 289 307 unless (exists $data->{"machine"}{$machine}) 290 308 { … … 303 321 bless $this,$type ; 304 322 $this->get_split_path() ; 323 $this->{templatedata} = $this->templatedata() ; 305 324 306 325 return $this ; … … 308 327 309 328 #-------------------- 329 sub expand_arg 330 { 331 my ($this,$val) = @_ ; 332 my $var ; 333 334 ($var) = $val=~/^{(.*)}$/ ; 335 $val = $this->get($var) if $var ; 336 return $val ; 337 } 338 339 sub expand_args 340 { 341 my ($this,@val) = @_ ; 342 343 @val = map { $_ = $this->expand_arg($_) ; } @val ; 344 return @val ; 345 } 346 347 #-------------------- 348 sub templatedata 349 { 350 my($this) = @_ ; 351 my %localdef = () ; 352 353 my $path = "" ; 354 for my $p (@{$this->{split_path}}) 355 { 356 $path = File::Spec->catdir($path,$p) ; 357 my $file = File::Spec->catdir($path,$this->get("hierarchy").".defines") ; 358 next unless -e $file ; 359 $log->debug("file","for ".$this->{machine}.": load '$file'") ; 360 my $conf ; 361 my $ret = eval { $conf = new Config::General( 362 -ConfigFile=>$file 363 , -InterPolateVars=>1 364 , -UseApacheInclude=>1 365 , -IncludeDirectories=>1 366 , -IncludeGlob=>1 367 , -IncludeAgain=>1 368 , -IncludeRelative=>1 369 , -StrictVars=>1 370 , -ConfigPath=>[$path,$config->get("lib_dir")."/etc"] 371 , -MergeDuplicateBlocks=>1 372 ) } ; 373 unless ($ret) 374 { 375 $@ =~ s/Config::General *// ; 376 $@ =~ s/! at.*// ; 377 Log::err($@,11) ; 378 } 379 380 my %conf = $conf->getall; 381 %localdef = (%localdef,%conf) ; 382 } 383 return \%localdef ; 384 } 385 #-------------------- 310 386 sub get 311 387 { 312 388 my($this,$var) = @_ ; 313 389 314 # warn "WARN: on $this->{machine} : no value found for '$var'\n"315 390 Log::err("on $this->{machine} : no value found for '$var'",8) 316 unless exists($this->{section}{$var}) or exists($this->{data}{$var}) ; 317 if (ref($this->{section}{$var}) eq "ARRAY" || ref($this->{data}{$var}) eq "ARRAY") 391 unless exists($this->{section}{$var}) 392 or exists($this->{data}{$var}) 393 or exists($this->{templatedata}{$var}) ; 394 if (ref($this->{section}{$var}) eq "ARRAY" 395 || ref($this->{data}{$var}) eq "ARRAY" 396 || ref($this->{templatedata}{$var}) eq "ARRAY") 318 397 { 319 398 my @l1 = () ; … … 322 401 my @l2 = @{::to_list($this->{section}{$var})} ; 323 402 push @l1,@l2 ; 324 }403 } 325 404 if (exists($this->{data}{$var})) 326 405 { … … 328 407 push @l1,@l2 ; 329 408 } 409 if (exists($this->{templatedata}{$var})) 410 { 411 my @l2 = @{::to_list($this->{templatedata}{$var})} ; 412 push @l1,@l2 ; 413 } 330 414 return \@l1 ; 331 415 } … … 334 418 return $this->{section}{$var} if exists($this->{section}{$var}) ; 335 419 return $this->{data}{$var} if exists($this->{data}{$var}) ; 420 return $this->{templatedata}{$var} if exists($this->{templatedata}{$var}) ; 336 421 } 337 422 } … … 390 475 my @prefix = $this->gets(@keys) ; 391 476 392 # formate the prefixes 393 map { $_="$_ :" } @prefix ;477 # formate the prefixes 478 map { $_="$_/" } @prefix ; 394 479 395 480 # add the default prefix (empty prefix) … … 437 522 my($this,$script) = @_ ; 438 523 439 my ($cmd,@args,@delim,$defline) ; 440 { 441 # get the 'rexec' directives 442 my $rexecs = ::to_list($this->get("rexec")) ; 443 my @scripts = grep /^$script(\W|$)/,@$rexecs ; 444 return (1,"no directive 'rexec $script' found") if scalar(@scripts)==0 ; 445 $defline = $scripts[0] ; 446 ($cmd,@args) = split(/\s+/,$defline) ; 447 @delim = $cmd=~/\['(.*?)','(.*?)'\]/ ; 448 $cmd =~ s/^\[.*?\] *// ; 449 $log->info("on $this->{machine}: starting '$defline'") ; 450 } 524 printf("> on %s: starting rexec $script\n",$this->{machine}) ; 525 my ($cmd,@args) ; 526 @args = $this->expand_args(split(/\s+/,$script)) ; 527 $script = shift(@args) ; 528 $log->info("on $this->{machine}: starting 'rexec $script'") ; 451 529 452 530 ## ajout d'arguments implicites … … 462 540 , $path 463 541 ) unless defined($path) and -f $path ; 542 printf(" template: %s\n",$path) ; 543 printf(" args: %s\n",join(" , ",@args)) if scalar(@args)>0 ; 464 544 465 545 #$this->{args} = [ $path , $script ] ; … … 468 548 $this->{PWD} = File::Basename::dirname($path) ; 469 549 { my $d = $config->get("lib_dir") ; $this->{TEMPLATE} =~ s|^$d/|| ; } 470 550 471 551 $this->{ARGV} = [ $path , @args ] ; 472 552 $this->{ARGC} = scalar(@args) ; … … 474 554 #$this->_setenv() ; 475 555 476 print "$path:\n","-"x10,"\n" if $args{"expand"};556 $log->debug("expand","-- begin of expansion for $path:") ; 477 557 my $localfile = $config->get("tmp_dir")."/$script.$$" ; 478 558 my $tmpl = new Text::Template ( TYPE => 'FILE', SOURCE => $path ) or Log::err("can't create template",1) ; … … 480 560 chmod(0700,$localfile) or warn "WARN: $!\n" ; 481 561 { 482 my $fillin_args = { OUTPUT => $ args{"expand"}?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ;483 $fillin_args->{DELIMITERS} = \@delim if @delim;562 my $fillin_args = { OUTPUT => $this->{debug} eq "expand"?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 563 $fillin_args->{DELIMITERS} = $args{delimiters} if exists $args{delimiters} ; 484 564 $fillin_args->{BROKEN} = \&my_broken ; 485 565 #$fillin_args->{BROKEN_ARG} = { path=>$path, localfile=>$localfile } ; 486 566 $tmpl->fill_in(%$fillin_args) or Log::err("Partial result can be found in '$localfile'",4) ; 487 567 } 488 print "-"x10,"\n" if $args{"expand"};568 $log->debug("expand","-- end of expansion for $path") ; 489 569 $log->info("on $this->{machine}: create '$localfile' on localhost") ; 490 491 unless ($args{"dry-run"}) 492 { 493 my $machine = $this->{fqmachine} ; 494 495 my $cmdline = sprintf($config->get("copy_fmt"),$localfile,$machine,$this->get("spool_dir")."/$script") ; 496 $log->info("on $this->{machine}: execute '$cmdline'") ; 497 ::mysystem($cmdline) ; 498 499 $cmdline = sprintf("%s/%s %s",$this->get("spool_dir"),$script,join(' ',@args)) ; 500 $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 501 $log->info("on $this->{machine}: execute '$cmdline'") ; 502 ::mysystem($cmdline) ; 503 504 $cmdline = sprintf($this->get("rm_fmt"),$this->get("spool_dir")."/$script") ; 505 $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 506 $log->info("on $this->{machine}: execute '$cmdline'") ; 507 ::mysystem($cmdline) unless $args{"no-cleanup"} ; 508 } 570 close(F) ; 571 572 my $machine = $this->{fqmachine} ; 573 574 my $cmdline = sprintf($config->get("copy_fmt"),$localfile,$machine,$this->get("spool_dir")."/$script") ; 575 $log->info("on $this->{machine}: execute '$cmdline'") ; 576 ::mysystem($cmdline) unless $args{"dry-run"} ; 577 578 $cmdline = sprintf("%s/%s %s",$this->get("spool_dir"),$script,join(' ',@args)) ; 579 $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 580 $log->info("on $this->{machine}: execute '$cmdline'") ; 581 ::mysystem($cmdline) unless $args{"dry-run"} ; 582 583 $cmdline = sprintf($config->get("rm_fmt"),$this->get("spool_dir")."/$script") ; 584 $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; 585 $log->info("on $this->{machine}: execute '$cmdline'") ; 586 ::mysystem($cmdline) unless $args{"dry-run"} || $args{"no-cleanup"} ; 509 587 510 588 return (0,"'rexec $script' done","rexec") ; … … 516 594 my($this,$script) = @_ ; 517 595 596 printf("> on %s: starting lexec $script\n",$this->{machine}) ; 518 597 my ($cmd,@args,@delim,$defline) ; 519 { 520 # get the 'exec' directives 521 my $execs = ::to_list($this->get("lexec")) ; 522 my @scripts = grep /^$script(\W|$)/,@$execs ; 523 return (1,"no directive 'lexec $script' found") if scalar(@scripts)==0 ; 524 $defline = $scripts[0] ; 525 ($cmd,@args) = split(/\s+/,$defline) ; 526 @delim = $cmd=~/\['(.*?)','(.*?)'\]/ ; 527 $cmd =~ s/^\[.*?\] *// ; 528 $log->info("on $this->{machine}: starting '$defline'") ; 529 } 598 @args = $this->expand_args(split(/\s+/,$script)) ; 599 $script = shift(@args) ; 600 $log->info("on $this->{machine}: starting 'lexec $script'") ; 530 601 531 602 ## ajout d'arguments implicites … … 541 612 , $path 542 613 ) unless defined($path) and -f $path ; 614 printf(" template: %s\n",$path) ; 615 printf(" args: %s\n",join(" , ",@args)) if scalar(@args)>0 ; 543 616 544 617 #$this->{args} = [ $path , $script ] ; … … 550 623 #$this->_setenv() ; 551 624 552 print "$path:\n","-"x10,"\n" if $args{"expand"};625 $log->debug("expand","-- begin of expansion for $path:") ; 553 626 my $localfile = $this->get("spool_dir")."/$script" ; 554 627 my $tmpl = new Text::Template ( TYPE => 'FILE', SOURCE => $path ) or Log::err("can't create template",1) ; … … 556 629 chmod(0700,$localfile) or warn "WARN: $!\n" ; 557 630 { 558 my $fillin_args = { OUTPUT => $ args{"expand"}?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ;559 $fillin_args->{DELIMITERS} = \@delim if @delim;631 my $fillin_args = { OUTPUT => $this->{debug} eq "expand"?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 632 $fillin_args->{DELIMITERS} = $args{delimiters} if exists $args{delimiters} ; 560 633 $fillin_args->{BROKEN} = \&my_broken ; 561 634 #$fillin_args->{BROKEN_ARG} = { path=>$path, localfile=>$localfile } ; 562 635 $tmpl->fill_in(%$fillin_args) or Log::err("Partial result can be found in '$localfile'",4) ; 563 636 } 564 print "-"x10,"\n" if $args{"expand"};637 $log->debug("expand","-- end of expansion for $path") ; 565 638 $log->info("on $this->{machine}: create '$localfile' on localhost") ; 566 639 close(F) ; 567 640 568 unless ($args{"dry-run"}) 569 { 570 my $cmdline = sprintf("%s/%s %s",$this->get("spool_dir"),$script,join(' ',@args)) ; 571 $log->info("on localhost: execute '$cmdline'") ; 572 ::mysystem($cmdline) ; 573 574 $cmdline = sprintf($this->get("rm_fmt"),$this->get("spool_dir")."/$script") ; 575 $log->info("on $this->{machine}: execute '$cmdline'") ; 576 ::mysystem($cmdline) unless $args{"no-cleanup"} ; 577 } 641 my $cmdline = sprintf("%s/%s %s",$this->get("spool_dir"),$script,join(' ',@args)) ; 642 $log->info("on localhost: execute '$cmdline'") ; 643 ::mysystem($cmdline) unless $args{"dry-run"} ; 644 645 $cmdline = sprintf($config->get("rm_fmt"),$this->get("spool_dir")."/$script") ; 646 $log->info("on $this->{machine}: execute '$cmdline'") ; 647 ::mysystem($cmdline) unless $args{"dry-run"} || $args{"no-cleanup"} ; 578 648 579 649 return (0,"'lexec $script' done","lexec") ; … … 583 653 sub run_put 584 654 { 585 my($this,$file) = @_ ; 586 587 my ($dest,@delim,$defline,$user,$group,$mode,$modflag) ; 588 $modflag = 0 ; 589 { 590 # get the 'puts' directives 591 my $putss = ::to_list($this->get("put")) ; 592 my @files = grep /^$file\W/,@$putss ; 593 return (1,"no directive 'put $file' found") if scalar(@files)==0 ; 594 $defline = $files[0] ; 595 ($dest) = $defline=~/$file\S*\s+(.*)$/ ; 596 @delim = $defline=~/^\S+\['(.*?)','(.*?)'\]/ ; 597 if ($dest=~/\[.*\]/) 598 { 599 ($user,$group,$mode) = $dest=~/\[(.*),(.*),(.*)\]/ ; 600 $dest =~ s/\[.*\]// ; 601 $modflag = 1 ; 602 } 603 $log->info("on $this->{machine}: starting '$defline'") ; 604 } 655 my($this,$cmd_args) = @_ ; 656 my ($dest,$file) ; 657 658 printf("> on %s: starting 'put %s'\n",$this->{machine},join(" ",@$cmd_args)) ; 659 660 my ($user,$group,$mode) ; 661 $user = $this->expand_arg($args{user}) if exists $args{user} ; 662 $group = $this->expand_arg($args{group}) if exists $args{group} ; 663 $mode = $this->expand_arg($args{mode}) if exists $args{mode} ; 664 665 my @args = $this->expand_args(@$cmd_args) ; 666 $file = $this->expand_arg($cmd_args->[0]) ; 667 $dest = $this->expand_arg($cmd_args->[1]) ; 668 669 $log->info("on $this->{machine}: starting 'put $file'") ; 605 670 606 671 my $path = $this->_locate($file) ; … … 610 675 , $path 611 676 ) unless defined($path) and -f $path ; 677 printf(" template: %s\n destination: %s\n",$path,$args[1]) ; 612 678 613 679 #$this->{args} = [ $path, $dest ] ; … … 619 685 #$this->_setenv() ; 620 686 621 print "$path:\n","-"x10,"\n" if $args{"expand"};687 $log->debug("expand","-- begin of expansion for $path:") ; 622 688 my $localfile = $config->get("tmp_dir")."/$file.$$" ; 623 689 my $tmpl = new Text::Template ( TYPE => 'FILE', SOURCE => $path ) or Log::err("can't create template",1) ; … … 625 691 chmod(0700,$localfile) or warn "WARN: $!\n" ; 626 692 { 627 my $fillin_args = { OUTPUT => $ args{"expand"}?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ;628 $fillin_args->{DELIMITERS} = \@delim if @delim;693 my $fillin_args = { OUTPUT => $this->{debug} eq "expand"?\*STDOUT:\*F, HASH=>{$this->_hash4vars()}} ; 694 $fillin_args->{DELIMITERS} = $args{delimiters} if exists $args{delimiters} ; 629 695 $fillin_args->{BROKEN} = \&my_broken ; 630 696 #$fillin_args->{BROKEN_ARG} = { path=>$path, localfile=>$localfile } ; 631 697 $tmpl->fill_in(%$fillin_args) or Log::err("Partial result can be found in '$localfile",4) ; 632 698 } 633 print "-"x10,"\n" if $args{"expand"};699 $log->debug("expand","-- end of expansion for $path") ; 634 700 $log->info("on $this->{machine}: create '$localfile' on localhost") ; 701 close(F) ; 635 702 636 703 { … … 640 707 ::mysystem($cmdline) unless $args{"dry-run"} ; 641 708 642 if ( $modflag)709 if (defined($mode)) 643 710 { 644 711 $cmdline = sprintf($this->get("chmod_fmt"),$mode,$dest) ; … … 646 713 $log->info("on $this->{machine}: execute '$cmdline'") ; 647 714 ::mysystem($cmdline) unless $args{"dry-run"} ; 648 715 } 716 717 if (defined($user) || defined($group)) 718 { 719 my $user = defined($user) ? $user : "" ; 720 my $group = defined($group) ? $group : "" ; 649 721 $cmdline = sprintf($this->get("chown_fmt"),$user,$group,$dest) ; 650 722 $cmdline = sprintf($config->get("rexec_fmt"),$machine,$cmdline) ; … … 694 766 my $h ; 695 767 768 #template variables 769 while (my($k,$v) = each %{$this->{templatedata}}) 770 { 771 $h->{$k} = $v ; 772 } 773 774 # global variables 696 775 while (my($k,$v) = each %{$this->{data}}) 697 776 { 698 777 $h->{$k} = $v unless $k eq "machine" ; 699 778 } 779 780 # machine variables 700 781 while (my($k,$v) = each %{$this->{data}{"machine"}{$this->{machine}}}) 701 782 { 702 783 $h->{$k} = $v ; 703 784 } 785 704 786 #$h->{"machine"} = $this->{machine} ; 705 787 $h->{"MACHINE"} = $this->{machine} ; … … 712 794 push(@{$h->{"MACHINE_NAME"}},keys %{$define->{"machine"}}) ; 713 795 { 714 $log->debug(" \n".('-'x40)."\nenvironment variables:\n") ;796 $log->debug("env","\n".('-'x40)."\nenvironment variables:\n") ; 715 797 while (my($k,$v)=each(%ENV)) 716 798 { 717 $log->debug(" $k=$v") if $k=~/^PLACO/ ;718 } 719 } 720 $log->debug(" \n".('-'x40)."\ndata passed to the template:\n\n".Dumper($h)) ;799 $log->debug("env","$k=$v") if $k=~/^PLACO/ ; 800 } 801 } 802 $log->debug("data","\n".('-'x40)."\ndata passed to the template:\n\n".Dumper($h)) ; 721 803 return %$h ; 722 804 } … … 763 845 { 764 846 my($this) = @_ ; 765 847 766 848 printf("INFO: placo main configuration file: %s\n",$config->{path}) ; 767 849 printf("INFO: placo shell: %s\n",$this->get("PLACOSH")) ; … … 769 851 printf("INFO: main definition file for this platform: %s\n",$config->{conf}{DEFINITION_FILE}) ; 770 852 $this->is_set( qw/ 771 admin_dn 772 admin_pw ldap_root_pw ldap_bindpw 773 root_mysql_passwd 774 proxy_addr external_gateway_addr dns_addr smtp_relay_addr 775 external_hostname 853 admin_dn 854 admin_pw ldap_root_pw ldap_bindpw 855 root_mysql_passwd 856 proxy_addr external_gateway_addr dns_addr smtp_relay_addr 857 external_hostname 776 858 external_interface 777 859 /) ; … … 796 878 for my $v (@vars) 797 879 { 798 next unless exists($this->{define}{$v}) && 799 defined($this->{define}{$v}) && 880 next unless exists($this->{define}{$v}) && 881 defined($this->{define}{$v}) && 800 882 ($this->{define}{$v}=~/^\s*$/) ; 883 801 884 $ok = 0 ; 802 885 printf("ERROR: variable '%s' is not %s in defines files\n" … … 814 897 return $this->{define}{$var} ; 815 898 } 816 899 817 900 #--------------------- 818 901 sub like_email … … 826 909 next if $s =~/\w@\w+\.\w+/ ; 827 910 $ok = 0 ; 828 printf("ERROR: variable '$v' isn't a email address: '$s'\n") ; 911 printf("ERROR: variable '$v' isn't a email address: '$s'\n") ; 829 912 } 830 913 exit(12) unless $ok ; … … 940 1023 { 941 1024 my($my,$env) = @_ ; 942 1025 943 1026 $$my = $ENV{$env} if (exists($ENV{$env}) && $ENV{$env}=~/\S/) ; 944 1027 } … … 947 1030 { 948 1031 my ($my,$env) = @_ ; 949 1032 950 1033 $ENV{$env} = $my if defined($my) && $my=~/\S/ ; 951 1034 } … … 955 1038 my ($my,$conf) = @_ ; 956 1039 $$my = $config->get($conf) unless defined($$my) && $$my=~/\S/ ; 957 } 1040 } 958 1041 959 1042 #--------------------- … … 987 1070 $screen->fdopen($SCREEN_HANDLE,"a") or die ; 988 1071 989 my($verbose,$debug,$rexec,$lexec,$put,$machine,$config_file,$platform,$placomgr,$placosh ) ;1072 my($verbose,$debug,$rexec,$lexec,$put,$machine,$config_file,$platform,$placomgr,$placosh,$op) ; 990 1073 991 1074 # first, initialize from the environment … … 1005 1088 \%args 1006 1089 , "h|help" => \&usage 1007 , "man" => \&man1090 , "man" => \&man 1008 1091 , "v|verbose+" => \$verbose 1009 , "d|debug +" => \$debug1092 , "d|debug=s" => \$debug 1010 1093 , "C=s" => \$config_file 1011 1094 , "m|machine=s" => \$machine … … 1013 1096 , "l|lexec=s" => \$lexec 1014 1097 , "p|put=s" => \$put 1098 , "user=s" 1099 , "group=s" 1100 , "mode=s" 1015 1101 , "dry-run" 1016 1102 , "no-cleanup" 1017 1103 , "expand" 1018 1104 , "broadcast" 1105 , "delimiters=s" 1019 1106 , "P|platform=s" => \$platform 1020 1107 ) or usage("") ; 1021 1108 1022 $args{"dry-run"} = 1 if $args{"expand"} ;1023 1024 1109 if ($this_prog eq "placomgr") 1025 1110 { 1026 Log::err("--rexec, --lexec, --put, --man or --help required !",5) 1027 unless defined $rexec or defined $lexec or defined $put ; 1028 } 1029 1030 $log = new Log($debug?2:$verbose?1:0) ; 1111 $op = shift() or usage() ; 1112 Log::err("unknown operation '$op' !",5) unless $op=~/^(rexec|lexec|put|man|help)$/ ; 1113 1114 # args manipulation 1115 $args{"dry-run"} = 1 if $debug && ($debug eq "expand") ; 1116 if (exists $args{"delimiters"}) 1117 { 1118 my @l = split(/\s*,\s*/,$args{"delimiters"}) ; 1119 Log::err("bad syntax for delimiters !",5) 1120 unless scalar(@l)==2 ; 1121 $args{"delimiters"} = \@l ; 1122 } 1123 else 1124 { 1125 $args{"delimiters"} = ['{!','!}'] ; 1126 } 1127 1128 if ($op =~ /exec$/) 1129 { 1130 Log::err("argument missing for $op !\nusage: $op template",5) if scalar(@ARGV)<1 ; 1131 Log::err("too many arguments for $op !\nusage: $op template",5) if scalar(@ARGV)>1 ; 1132 } 1133 1134 if ($op eq "put") 1135 { 1136 Log::err("arguments missing for put !\nusage: put template target",5) if scalar(@ARGV)<2 ; 1137 Log::err("too many arguments for put !\nusage: put template",5) if scalar(@ARGV)>2 ; 1138 } 1139 else 1140 { 1141 for my $o ("user","mode","group") 1142 { 1143 Log::err("option '$o' only permitted for operation 'put' !",5) if exists $args{$o} ; 1144 } 1145 } 1146 } 1147 1148 $log = new Log($verbose,$debug) ; 1031 1149 1032 1150 if ($config_file) … … 1045 1163 $config->load() ; 1046 1164 $config_file = $config->get_path() ; 1047 $log->debug(" config file used: ".$config_file) ;1165 $log->debug("file","config file used: ".$config_file) ; 1048 1166 1049 1167 # last, local initialisation from the config file … … 1078 1196 unless -e $config->{conf}{DEFINITION_FILE} ; 1079 1197 } 1080 $log->debug(" \n".('-'x80)."configuration data:\n\n".Dumper($config)) ;1081 1082 if ($this_prog eq "placosh" ) 1083 { 1084 placosh($verbose,$debug,$platform) ; 1085 exit 0 ; 1198 $log->debug("conf","\n".('-'x80)."configuration data:\n\n".Dumper($config)) ; 1199 1200 if ($this_prog eq "placosh" ) 1201 { 1202 placosh($verbose,$debug,$platform) ; 1203 exit 0 ; 1086 1204 } 1087 1205 … … 1089 1207 my $defdir = dirname($config->get_path()) ; 1090 1208 my $conf ; 1091 1092 my $ret = eval { $conf = new Config::General( 1093 -ConfigFile=>$config->{conf}{DEFINITION_FILE} 1209 my $file = $config->{conf}{DEFINITION_FILE} ; 1210 1211 $log->debug("file","load '$file'") ; 1212 my $ret = eval { 1213 $conf = new Config::General( 1214 -ConfigFile=>$file 1094 1215 , -InterPolateVars=>1 1095 1216 , -UseApacheInclude=>1 … … 1101 1222 , -ConfigPath=>[$defdir,$config->get("lib_dir")."/etc"] 1102 1223 , -MergeDuplicateBlocks=>1 1103 ) } ; 1224 ) 1225 } ; 1104 1226 unless ($ret) 1105 1227 { 1106 my @l = split("\n",$@);1107 pop @l;1108 Log::err( sprintf("%s\n",join("\n",@l)),11) ;1228 $@ =~ s/Config::General *// ; 1229 $@ =~ s/! at.*// ; 1230 Log::err($@,11) ; 1109 1231 } 1110 1232 … … 1118 1240 $define->{ETC_DIR} = $config->get("etc_dir") ; 1119 1241 } 1120 $log->debug(" \n".('-'x80)."whole definition data:\n\n".Dumper($define)) ;1242 $log->debug("define","\n".('-'x80)."whole definition data:\n\n".Dumper($define)) ; 1121 1243 1122 1244 if ($this_prog eq "placocheck" ) … … 1133 1255 Log::err(sprintf("undefined machine '$machine' in %s !",$config->get("definition_files")->{$platform}),6) unless exists $define->{"machine"}{$machine} ; 1134 1256 push(@machines,$machine) ; 1257 $define->{BROADCAST} = 0 ; 1135 1258 } 1136 1259 else … … 1138 1261 # perform every machine 1139 1262 @machines = keys %{$define->{"machine"}} ; 1263 $define->{BROADCAST} = 1 ; 1140 1264 } 1141 1265 … … 1145 1269 my $fqm = $m ; 1146 1270 $fqm .= ".$platform" unless $m eq "localhost" ; 1147 my $placo = new PlacoMrg($define,$m,$fqm ) ;1271 my $placo = new PlacoMrg($define,$m,$fqm,$debug||"") ; 1148 1272 next unless defined $placo ; 1149 1273 1150 1274 my ($code,$msg,$trace) ; 1151 1275 1152 ($code,$msg,$trace) = $placo->run_rexec($ rexec) if defined($rexec);1153 ($code,$msg,$trace) = $placo->run_lexec($ lexec) if defined($lexec);1154 ($code,$msg,$trace) = $placo->run_put( $put) if defined($put);1276 ($code,$msg,$trace) = $placo->run_rexec($ARGV[0]) if $op eq "rexec" ; 1277 ($code,$msg,$trace) = $placo->run_lexec($ARGV[0]) if $op eq "lexec" ; 1278 ($code,$msg,$trace) = $placo->run_put(\@ARGV,\%args) if $op eq "put" ; 1155 1279 1156 1280 if ($code==2) { Log::err("on $m: $msg",9) ; } 1157 elsif($code==1) { print " on $m: $msg\n" ; }1158 else 1159 { 1160 print " on $m: $msg\n" ; $done++ ;1161 $screen->printf(" OK (0)\n") ; 1281 elsif($code==1) { print "< on $m: $msg\n" ; } 1282 else 1283 { 1284 print "< on $m: $msg\n" ; $done++ ; 1285 $screen->printf(" OK (0)\n") ; 1162 1286 } 1163 1287 } … … 1188 1312 =head1 DESCRIPTION 1189 1313 1190 placosh is the PLACO shell. It is a simple invocation of bash with an particular environment 1314 placosh is the PLACO shell. It is a simple invocation of bash with an particular environment 1191 1315 (PATH, etc.) suitable to facilitate the interactive executions of PLACO scripts. 1192 1316 In particular, inside placosh, toplevel scripts can be interactively called without an explicit path, … … 1195 1319 placomgr is the PLACO platform manager, for templates expansion and scripts execution. It assumes 3 sequential tasks at each invocation : 1196 1320 - read the platform specification 1197 - scan the templates repository to find, according to the specifications, an appropriate template, 1198 - expanse the selected template to produce a local temporaty file 1321 - scan the templates repository to find, according to the specifications, an appropriate template, 1322 - expanse the selected template to produce a local temporaty file 1199 1323 - perform the operation specified on the command line invocation onto this temporary expanded file. 1200 1324 1201 The template is either a template of script or either a template of configuration file. 1202 So the expansion gives either a script, either a configuration file. 1325 The template is either a template of script or either a template of configuration file. 1326 So the expansion gives either a script, either a configuration file. 1203 1327 This must be coherent with the requested operation : a put for a configuration file, and a rexec or a lexec for a script. 1204 1328 … … 1209 1333 =item -C config_file 1210 1334 1211 specify an alternate configuration file. Default if /etc/placo.conf in production mode 1335 specify an alternate configuration file. Default if /etc/placo.conf in production mode 1212 1336 (see DIRECTORIES DISTRIBUTION below, for the devel mode). 1213 1337 1214 =item -d --debug, 1215 1216 debug mode, useful to show the data stucture, comming from the specification, and used to fill the template. 1217 1338 =item -d tag, --debug tag, 1339 1340 debug mode, to show internal data structures. 1341 possible tags are : conf, data, define, env, expand, file 1342 1343 =item --delimiters "seq,seq" 1344 1345 Specify delimiters for begin/end Perl code (default is { and }). 1346 For example, --delimiters "{-,-}" meens that the Perl code are delimitered with {- and -} inside the template. 1347 1218 1348 =item --dry-run 1219 1349 1220 no action is performed, but templates is however expansed 1350 no action is performed, but templates is however expansed 1221 1351 (useful in conjonction with --no-cleanup, for debugging) 1222 1352 1223 1353 =item -m, --machine machine_name 1224 1354 1225 perform the operation only on the machine_name. 1355 perform the operation only on the machine_name. 1226 1356 Note that the operation is really performed only if an according directive is found in the specification for that machine. 1227 1357 … … 1250 1380 =over 4 1251 1381 1252 =item -p, --put template 1253 1254 copy the expansed template to machines. 1255 The machines must have a directive : 1256 1257 put template directory 1258 1259 The expansed template is transferred into the specified directory, 1260 which can differs between the machines. 1261 1262 Perl code delimiters can be specified with [] following the template name 1263 (default are '{' and '}'). For example : 1264 1265 put template['{-','-}'] directory 1266 1267 meens that the Perl code are delimitered with {- and -} inside the template. 1268 1269 A user, group and mode can be specified with the syntax [user,group,mode] 1270 following the directory name. 1271 This gives the owner, group and mode for the target file. For example : 1272 1273 put slapd.conf /etc/openldap/slapd.conf[ldap,ldap,600] 1274 1275 =item -r, --rexec template 1382 =item -p, --put "template destination [u:user] [g:group] [m:mode]" 1383 1384 copy the expansed template on 'destination' onto machines. 1385 Arguments can have the form {var}, which meens the value of the variable 'var'. 1386 user, group and mode give the owner, group and mode for the target file. For example : 1387 1388 --put "slapd.conf /etc/openldap/slapd.conf u:{ldap_user} g:{ldap_group} m:600" 1389 1390 =item -r, --rexec "template [args]" 1276 1391 1277 1392 exec the expansed template on machines. 1278 The machines must have a directive : 1279 1280 rexec template 1281 1282 As above, Perl code delimiters can be specified with [] following the template 1283 name. For example : 1284 1285 rexec template['{{','}}'] 1286 1287 meens that the Perl code are delimitered with {{ and }} inside the template. 1288 1289 =item -l, --lexec template 1393 As above, arguments can have the form {var}, which meens the value of the variable 'var'. 1394 1395 =item -l, --lexec "template [args]" 1290 1396 1291 1397 exec the expansed template on the local host. 1292 The machines must have a directive : 1293 1294 lexec template 1295 1296 As above, Perl code delimiters can be specified with [] following the template 1297 name. For example : 1298 1299 lexec template['@','@'] 1300 1301 meens that the Perl code are delimitered with @ and @ inside the template. 1398 As above, arguments can have the form {var}, which meens the value of the variable 'var'. 1302 1399 1303 1400 =back … … 1307 1404 An operation is applied on a machine if and only if a directive with the same name is specified for the machine on the specification file. 1308 1405 1309 So, in the case where the operation is targetted to a given machine (with --machine), 1406 So, in the case where the operation is targetted to a given machine (with --machine), 1310 1407 then if this machine have a directive with a such name, the operation is performed, 1311 1408 otherwise nothing is performed. … … 1320 1417 The template is filled with values defined in the specifications. 1321 1418 But not the whole values are passed : 1322 for a given machine, only the corresponding section are passed 1419 for a given machine, only the corresponding section are passed 1323 1420 (but a machine inherits of the global variables, ie variables defined outside any 'machine' section). 1324 1421 1325 1422 =head1 PLATFORM DEFINITION 1326 1423 1327 This is specification of the platform. 1328 In production mode, the it stands on the /etc/default.defines file 1424 This is specification of the platform. 1425 In production mode, the it stands on the /etc/default.defines file 1329 1426 (see DIRECTORIES DISTRIBUTION below, for the devel mode). 1330 1427 1331 The defintion file is processed by T. Linden's Config::General Perl module. 1428 The defintion file is processed by T. Linden's Config::General Perl module. 1332 1429 and its syntax is an apache config-like one. 1333 1430 1334 =head2 Significant directives/variables/sections 1431 =head2 Significant directives/variables/sections 1335 1432 1336 1433 Some variables/sections are signifiants for placomgr : … … 1342 1439 hierarchy variable_name 1343 1440 1344 This mandatory variable indicates which variable is used to organize 1441 This mandatory variable indicates which variable is used to organize 1345 1442 the decomposition od the template repository. 1346 This value must be coherent with the templates repository structure. 1443 This value must be coherent with the templates repository structure. 1347 1444 1348 1445 Currently, in the standard distribution of PLACO, the template repository is structured by os. 1349 1446 So the value of hierarchy must be "OS". Any change implics another templates repository structure. 1350 1447 1351 Templates are first searched in the directory mapped with the current OS value, 1448 Templates are first searched in the directory mapped with the current OS value, 1352 1449 and if not found, the search go on to the parent directories, 1353 1450 until to reach the root directory of the repository. … … 1355 1452 =item lexec 1356 1453 1357 lexec template_name 1358 1454 lexec template_name 1455 1359 1456 This variable indicates that the current machine authorize the local host 1360 1457 to exec the expansed template_name. 1361 1458 1362 =item machine 1459 =item machine 1363 1460 1364 1461 <machine machine_name> 1365 1462 ... 1366 1463 </machine> 1367 1368 Each machine (virtual and local host) must have its own 'machine' section, to store its own variables. 1464 1465 Each machine (virtual and local host) must have its own 'machine' section, to store its own variables. 1369 1466 1370 1467 =item OS … … 1372 1469 OS os_name 1373 1470 1374 This variable says which operating system is used by a machine. 1471 This variable says which operating system is used by a machine. 1375 1472 It is significant only if the hierarchy value is 'OS'. 1376 1473 In this case, each machine must have its own OS value (possibly inherited). … … 1381 1478 1382 1479 put template_name directory_name 1383 1384 This variable indicates that the current machine accepts to upload 1480 1481 This variable indicates that the current machine accepts to upload 1385 1482 the expansed template_name into its directory directory_name. 1386 1483 1387 1484 =item rexec 1388 1485 1389 rexec template_name 1390 1391 This variable indicates that the current machine accepts to exec 1486 rexec template_name 1487 1488 This variable indicates that the current machine accepts to exec 1392 1489 the expansed template_name. 1393 1490 … … 1398 1495 A defintion file can include others definition files, 1399 1496 which are searched in the same directory where its parent resides, 1400 and, if not found, in /usr/lib/placo/etc directory 1497 and, if not found, in /usr/lib/placo/etc directory 1401 1498 (see DIRECTORIES DISTRIBUTION below, for the devel mode). 1402 1499 … … 1406 1503 1407 1504 =head2 Templates repository tree 1408 1505 1409 1506 It contains file templates (which produce configuration files), and script templates. 1410 1507 A template can be OS dependent. 1411 1508 1412 An expansed template script performs basic treatments, 1509 An expansed template script performs basic treatments, 1413 1510 in destination of a unique machine, for a given OS. 1414 Ttypically, this script install or configure 1511 Ttypically, this script install or configure 1415 1512 a package on a machine running a given OS. 1416 1513 1417 1514 Its places in the tree determines the OS for which it can be used. 1418 1515 1419 For example, with hierarchy=OS, a template located in the directory named 'rpm' 1516 For example, with hierarchy=OS, a template located in the directory named 'rpm' 1420 1517 means that it can be expanded for every machines : 1421 - with OS=rpm, or 1518 - with OS=rpm, or 1422 1519 - with any OS which can be mapped with a directory located in the subtree of the 'rpm' directory. 1423 1520 1424 1521 Theses templates are expanded by placomgr. 1425 1522 1426 =head2 The middleware directory 1523 =head2 The middleware directory 1427 1524 1428 1525 This directory contains scripts which aggregate several operations on a machine. 1429 1526 1430 1527 A such script can : 1431 - execute scripts located in the template repository, and 1432 - perform files transfert 1528 - execute scripts located in the template repository, and 1529 - perform files transfert 1433 1530 1434 1531 to accomplish a aggegated operation on a given machine. 1435 It must perform transfert and execution only via 1532 It must perform transfert and execution only via 1436 1533 put, rexec or lexec operations, though placomgr invocation. 1437 1534 Respecting this rule, a middleware script is OS independant. … … 1441 1538 1442 1539 =head2 The toplevel directory 1443 1540 1444 1541 This directroy contains scripts for macro treatments. 1445 1542 They only must perform calls to the middleware scripts. 1446 1543 1447 Typically, a toplevel script installs or configures a macro service, 1544 Typically, a toplevel script installs or configures a macro service, 1448 1545 possibly depending of several machines. 1449 1546 … … 1458 1555 /etc/placo.d/placo.conf 1459 1556 1460 searched in this order (see DIRECTORIES DISTRIBUTION below, for the devel mode). 1557 searched in this order (see DIRECTORIES DISTRIBUTION below, for the devel mode). 1461 1558 You can also define a shell environment variable PLACOPATH (a string PATH-like) to change this behavour. 1462 1559 1463 1560 placo.conf fixes the value of some global parameters, reflecting the current installation. 1464 1561 1465 See the placo.conf-dist file to have the whole allowed variables and 1562 See the placo.conf-dist file to have the whole allowed variables and 1466 1563 theirs respective default values. 1467 1564 … … 1472 1569 =head1 DIRECTORIES DISTRIBUTION 1473 1570 1474 In a production installation (resulting of an 'install.sh' execution with no arg), 1571 In a production installation (resulting of an 'install.sh' execution with no arg), 1475 1572 the files are dispatched in : 1476 1573 /etc/placo : configuration and definition files … … 1490 1587 1491 1588 More informations about the project can be found on http://placodev.mathrice.fr. 1492 1589 1493 1590 Some Perl modules documentation are useful to understand how works placomgr 1494 1591 and to learn its capabilities : -
trunk/lib/template/apache_status.conf
r983 r1094 1 { # $Id$}2 { # maintainer: Benoit Metrot}3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]}1 {! # $Id$ !} 2 {! # maintainer: Benoit Metrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 5 <IfModule mod_status.c> -
trunk/lib/template/auth_ldap_sympa
r616 r1094 1 { # $Id: auth_sympa.sh 390 2009-07-24 07:15:12Z damien $}2 { # maintainer: Damien Ferney}3 { # comment:1 {! # $Id: auth_sympa.sh 390 2009-07-24 07:15:12Z damien $ !} 2 {! # maintainer: Damien Ferney !} 3 {! # comment: 4 4 # install le fichier de auth.conf 5 } 5 !} 6 # generated from PLACO template: {!$TEMPLATE!} $Rev: $ 6 7 7 8 # Authentication services for Sympa … … 13 14 host proxy 14 15 timeout 30 15 suffix ou=People,{ $ldap_root}16 suffix ou=People,{!$ldap_root!} 16 17 get_dn_by_uid_filter (uid=[sender]) 17 18 get_dn_by_email_filter (mail=[sender]) … … 24 25 host proxy 25 26 timeout 30 26 suffix ou=People,{ $ldap_root}27 bind_dn { $ldap_attr}={$ldap_binddn},ou=People,{$ldap_root}28 bind_password { $ldap_bindpw}27 suffix ou=People,{!$ldap_root!} 28 bind_dn {!$ldap_attr!}={!$ldap_binddn!},ou=People,{!$ldap_root!} 29 bind_password {!$ldap_bindpw!} 29 30 get_dn_by_uid_filter (uid=[sender]) 30 31 get_dn_by_email_filter (mail=[sender]) … … 32 33 #alternative_email_attribute mailalternateaddress,ur1mail 33 34 scope sub 34 authentication_info_url https://{ $external_hostname}/lists/wws35 authentication_info_url https://{!$external_hostname!}/lists/wws 35 36 36 37 user_table -
trunk/lib/template/conf_sympa
r784 r1094 11 11 log_socket_type unix 12 12 log_level 0 13 domain { $external_cname_lists}14 listmaster { $listmaster}13 domain {!$external_cname_lists!} 14 listmaster {!$listmaster!} 15 15 email sympa 16 16 lang fr … … 39 39 db_host proxy 40 40 db_user sympa 41 db_passwd { $sympa_mysql_password}42 wwsympa_url https://{ $external_cname_lists}/wws41 db_passwd {!$sympa_mysql_password!} 42 wwsympa_url https://{!$external_cname_lists!}/wws 43 43 supported_lang fr,en_US -
trunk/lib/template/config_postfix_list
r812 r1094 19 19 smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key 20 20 smtpd_use_tls=yes 21 smtpd_tls_session_cache_database = btree:$ \{data_directory\}/smtpd_scache22 smtp_tls_session_cache_database = btree:$ \{data_directory\}/smtp_scache21 smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache 22 smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache 23 23 24 24 # See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for 25 25 # information on enabling SSL in the smtp client. 26 myhostname = { $external_cname_lists}26 myhostname = {!$external_cname_lists!} 27 27 alias_maps = hash:/etc/aliases,hash:/etc/mail/sympa.aliases 28 28 alias_database = hash:/etc/mail/sympa.aliases 29 29 transport_maps = hash:/etc/postfix/transport 30 30 myorigin = $myhostname 31 mydestination = $myhostname, { $hostname}, localhost32 relayhost = { $smtp_relay_addr}31 mydestination = $myhostname, {!$hostname!}, localhost 32 relayhost = {!$smtp_relay_addr!} 33 33 mynetworks = 127.0.0.0/8 34 34 # seulement si le postfix de sympa joue le role de postfix pour toutes les VM … … 37 37 recipient_delimiter = + 38 38 inet_interfaces = all 39 proxy_interfaces = { $proxy_addr}39 proxy_interfaces = {!$proxy_addr!} -
trunk/lib/template/deb/config_debconf_sympa
r831 r1094 1 1 sympa sympa/key_password_again password 2 sympa sympa/db_adminpasswd password { $root_mysql_passwd}3 sympa sympa/db_passwd password { $sympa_mysql_password}4 sympa sympa/db_passwd_again password { $sympa_mysql_password}2 sympa sympa/db_adminpasswd password {!$root_mysql_passwd!} 3 sympa sympa/db_passwd password {!$sympa_mysql_password!} 4 sympa sympa/db_passwd_again password {!$sympa_mysql_password!} 5 5 sympa sympa/key_password password 6 6 sympa wwsympa/webserver_type select Apache 2 7 sympa wwsympa/wwsympa_url string http://{ $hostname}/wws8 sympa sympa/listmaster string { $listmaster}7 sympa wwsympa/wwsympa_url string http://{!$hostname!}/wws 8 sympa sympa/listmaster string {!$listmaster!} 9 9 sympa wwsympa/webserver_restart boolean true 10 sympa sympa/hostname string { $hostname}10 sympa sympa/hostname string {!$hostname!} 11 11 sympa sympa/db_options string 12 12 sympa sympa/wwsympa_configured boolean false -
trunk/lib/template/deb/install_apache_hobbit.sh
r662 r1094 1 1 #!/bin/bash 2 { # $Id$}3 { # maintainer:}4 { # comment:}2 {! # $Id$ !} 3 {! # maintainer: !} 4 {! # comment: !} 5 5 6 6 apt-get -y install apache2 -
trunk/lib/template/deb/install_debconf_debconf.sh
- Property svn:keywords set to LastChangedDate Id URL Author Rev LastChangedRevision
r496 r1094 1 { # $Id:$}2 { # maintainer: Damien Ferney}1 {! # $Id$ !} 2 {! # maintainer: Damien Ferney !} 3 3 4 4 debconf-set-selections /root/config_debconf_debconf -
trunk/lib/template/deb/install_debconf_utils.sh
- Property svn:keywords set to LastChangedDate Id URL Author Rev LastChangedRevision
r496 r1094 1 { # $Id:$}2 { # maintainer: Damien Ferney}1 {! # $Id$ !} 2 {! # maintainer: Damien Ferney !} 3 3 4 4 #export TERM=xterm -
trunk/lib/template/deb/install_horde.sh-disabled
r437 r1094 1 1 #!/bin/bash 2 { # $Id: install_horde.sh 390 2009-07-24 07:15:12Z jaclin $}3 { # maintainer: Jacquelin Charbonnel}4 { # comment:2 {! # $Id: install_horde.sh 390 2009-07-24 07:15:12Z jaclin $ !} 3 {! # maintainer: Jacquelin Charbonnel !} 4 {! # comment: 5 5 # install HORDE 6 } 6 !} 7 # generated from PLACO template: {!$TEMPLATE!} $Rev: $ 7 8 8 9 vh=$1 … … 12 13 url=$horde_url/$file 13 14 14 wget -q -P { $spool_dir} $url15 cd { $spool_dir}15 wget -q -P {!$spool_dir!} $url 16 cd {!$spool_dir!} 16 17 tar zxf $file 17 18 rm -f $file 18 mv horde-groupware* { $htdocs}/vh1/horde19 mv horde-groupware* {!$htdocs!}/vh1/horde 19 20 20 cd { $htdocs}/vh1/horde21 cd {!$htdocs!}/vh1/horde 21 22 echo "create database horde;" | mysql 22 23 echo -e "\n1\nmysql\n0\nroot\n\n\n\nhorde\n\n\n\n\n2\n\nroot\n\n\n0\n" | php scripts/setup.php -
trunk/lib/template/deb/install_pkg.sh
r337 r1094 1 1 #!/bin/bash 2 { # $Id$}3 { # maintainer: Jacquelin Charbonnel}2 {! # $Id$ !} 3 {! # maintainer: Jacquelin Charbonnel !} 4 4 5 5 PKG=$* -
trunk/lib/template/deb/install_proftpd.sh
r672 r1094 1 1 #!/bin/bash 2 { # $Id$}3 { # maintainer: Nicolas Vuilmet}2 {! # $Id$ !} 3 {! # maintainer: Nicolas Vuilmet !} 4 4 5 5 apt-get -y install proftpd -
trunk/lib/template/deb/iptables
r1013 r1094 1 1 #!/bin/bash 2 { # $Id: iptables 541 2009-09-29 17:01:46Z vuilmet $ } 3 { # maintainer: Nicolas Vuilmet } 4 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 5 { 2 {! # $Id: iptables 541 2009-09-29 17:01:46Z vuilmet $ !} 3 {! # maintainer: Nicolas Vuilmet !} 4 # generated from PLACO template: {!$TEMPLATE!} $Rev: $ 5 6 {! 6 7 ######## 7 8 # … … 131 132 $OUT.="iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE\n"; 132 133 $OUT.="iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE\n"; 133 134 $OUT.="echo 1 > /proc/sys/net/ipv4/ip_forward\n"; 134 135 } 135 136 } 136 }137 !} -
trunk/lib/template/deb/ubuntu/create-xen-image.sh
r672 r1094 1 1 #!/bin/bash 2 { # $Id$}3 { # maintainer:}4 { # comment:}2 {! # $Id$ !} 3 {! # maintainer: !} 4 {! # comment: !} 5 5 6 6 # Script pour la création d'image … … 9 9 xenEtc=/etc/xen 10 10 11 xen-create-image --hostname { $MACHINE} -ip {$internal_addr{$MACHINE}}11 xen-create-image --hostname {!$MACHINE!} -ip {!$internal_addr{$MACHINE}!} 12 12 setupcon 13 sed -i 's/file:/tap:aio:/' $xenEtc/{ $MACHINE}.cfg14 mv $xenEtc/{ $MACHINE}.cfg $xenEtc/auto/15 xm create $xenEtc/auto/{ $MACHINE}.cfg13 sed -i 's/file:/tap:aio:/' $xenEtc/{!$MACHINE!}.cfg 14 mv $xenEtc/{!$MACHINE!}.cfg $xenEtc/auto/ 15 xm create $xenEtc/auto/{!$MACHINE!}.cfg 16 16 17 if [ "{ $nb_interface}" == "2" ]; then17 if [ "{!$nb_interface!}" == "2" ]; then 18 18 #superbe sed qui me permet de rajouter une interface réseau au proxy 19 sed -i "/^vif/s/'[^']*$/', 'mac="{ $mac_addr}",bridge=brExt' ]/" $xenEtc/auto/{$MACHINE}.cfg19 sed -i "/^vif/s/'[^']*$/', 'mac="{!$mac_addr!}",bridge=brExt' ]/" $xenEtc/auto/{!$MACHINE!}.cfg 20 20 fi -
trunk/lib/template/hobbit_bb-hosts
r884 r1094 1 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 2 1 3 # Master configuration file for Hobbit 2 4 # … … 16 18 17 19 18 { 20 {! 19 21 foreach (sort(@MACHINE_NAME)) { 20 22 if (m/^localhost$/) { next; } 21 23 $OUT.=sprintf("%s\t%s\t# ssh\n", $internal_addr{$_}, $_); 22 24 } 23 }25 !} -
trunk/lib/template/horde_hook
r635 r1094 1 # generated from PLACO template: {!$TEMPLATE!} $Rev: $ 1 2 2 3 if (!function_exists('_horde_hook_authldap')) { -
trunk/lib/template/hosts
r962 r1094 1 { # $Id$}2 { # maintainer: Benoit Metrot}3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]}1 {! # $Id$ !} 2 {! # maintainer: Benoit Metrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 5 … … 7 7 #::1 localhost6.localdomain6 localhost6 8 8 9 { 9 {! 10 10 11 11 $OUT.="$internal_addr{$hostname}\t$hostname.$PLATFORM\t$hostname\n" ; … … 40 40 } 41 41 42 }42 !} -
trunk/lib/template/main_postfix_host
r886 r1094 1 { # $Id$}2 { # maintainer: Benoit Métrot}3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]}1 {! # $Id$ !} 2 {! # maintainer: Benoit Métrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 5 # See /usr/share/postfix/main.cf.dist for a commented, more complete version … … 9 9 # is /etc/mailname. 10 10 myorigin = /etc/mailname 11 { 11 {! 12 12 $OUT.=sprintf("myhostname = %s\n",`hostname -f`); 13 }13 !} 14 14 15 15 smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU) … … 34 34 # information on enabling SSL in the smtp client. 35 35 36 mydestination = $myhostname, { $hostname}, localhost.localdomain, localhost37 relayhost = { $smtp_relay_addr}36 mydestination = $myhostname, {!$hostname!}, localhost.localdomain, localhost 37 relayhost = {!$smtp_relay_addr!} 38 38 mynetworks = 127.0.0.0/8, 10.0.0.0/16 39 39 mailbox_size_limit = 0 … … 41 41 inet_interfaces = all 42 42 43 { 43 {! 44 44 my $str = ""; 45 45 foreach (split(/\n/, `ls /etc/postfix/aliases.*`)) { … … 50 50 $OUT.=sprintf("alias_maps = hash:/etc/aliases%s\n", $str); 51 51 $OUT.=sprintf("alias_database = hash:/etc/aliases%s\n", $str); 52 }52 !} 53 53 54 54 local_header_rewrite_clients = permit_inet_interfaces, permit_mynetworks 55 { 55 {! 56 56 my $str = ""; 57 57 foreach (split(/\n/, `ls /etc/postfix/canonical_sender_*`)) { … … 64 64 } 65 65 $OUT.=sprintf("sender_canonical_maps = %s\n", $str); 66 }66 !} -
trunk/lib/template/munin-node.conf
r727 r1094 1 { # $Id$ } 2 { # maintainer: } 3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 4 1 {! # $Id$ !} 2 {! # maintainer: !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 5 4 6 5 # … … 39 38 40 39 allow ^127\.0\.0\.1$ 41 { 40 {! 42 41 my $ip = $internal_addr{'placohost'}; 43 42 $ip =~ s/\./\\./g; 44 43 $OUT.= 'allow ^'.$ip.'$'."\n"; 45 }44 !} 46 45 47 46 # Which address to bind to; 48 47 # host 127.0.0.1 49 { 48 {! 50 49 my $localip = $internal_addr{$hostname}; 51 50 $OUT.="host $localip\n"; 52 }51 !} 53 52 54 53 # And which port -
trunk/lib/template/network-placo
r794 r1094 1 1 #!/bin/bash 2 3 # generated from PLACO template: {!$TEMPLATE!} $Rev: $ 4 2 5 ##============================================================================ 3 6 # … … 58 61 brnet=${brnet:-10.0.0.0/24} 59 62 netmask=${netmask:-255.0.0.0} 60 bridge=${bridge:-brInt} 63 bridge=${bridge:-brInt} ## jaclin: !!! c'est louche que ce soit en dur !!! 61 64 62 65 ## -
trunk/lib/template/ntp_conf
- Property svn:keywords set to Date Author Revision Id URL Rev LastChangedRev
r604 r1094 1 { # $Id: $}2 { # maintainer: Nicolas Vuilmet}3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]}1 {! # $Id$ !} 2 {! # maintainer: Nicolas Vuilmet !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 5 # /etc/ntp.conf, configuration for ntpd; see ntp.conf(5) for help … … 12 12 filegen clockstats file clockstats type day enable 13 13 14 { 14 {! 15 15 for $s (split(/ +/,$ntp_server)) 16 16 { 17 17 $OUT.="server $s\n" ; 18 18 } 19 }19 !} 20 20 restrict -4 default kod notrap nomodify nopeer noquery 21 21 restrict -6 default kod notrap nomodify nopeer noquery -
trunk/lib/template/rpm/centos/ifcfg-eth0
r672 r1094 1 { # $Id$}2 { # maintainer:}3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]}1 {! # $Id$ !} 2 {! # maintainer: !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 5 DEVICE=eth0 6 6 BOOTPROTO=static 7 IPADDR={ $ips{$hostname}}8 NETMASK={ $netmask}7 IPADDR={!$ips{$hostname}!} 8 NETMASK={!$netmask!} -
trunk/lib/template/rpm/centos/iptables
r1014 r1094 1 1 #!/bin/bash 2 { # $Id$}3 { # maintainer: Jacquelin Charbonnel}4 # {$TEMPLATE}: processed with {$0} from {$_ARGV[0]}2 {! # $Id$ !} 3 {! # maintainer: Jacquelin Charbonnel !} 4 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 5 5 6 { 6 {! 7 7 $host_rules = << "EOL" ; 8 8 *filter … … 60 60 -A INPUT -p tcp -s $internal_host_addr --dport 4949 -j ACCEPT 61 61 -A INPUT -p tcp -s $internal_gateway_addr --dport 80 -j ACCEPT 62 -A INPUT -j REJECT --reject-with icmp-host-prohibited63 COMMIT64 62 EOL 65 63 … … 109 107 $OUT.="-A INPUT -p $proto -s $internal_gateway_addr --dport $dport -j ACCEPT\n"; 110 108 } 109 $OUT.="-A INPUT -j REJECT --reject-with icmp-host-prohibited\n"; 110 $OUT.="COMMIT\n"; 111 111 # end iptables for VMs 112 112 } … … 129 129 } 130 130 } 131 }131 !} -
trunk/lib/template/rpm/centos/ldap.conf
r672 r1094 1 { # $Id$}2 { # maintainer:}3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]}1 {! # $Id$ !} 2 {! # maintainer: !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 5 ssl no 6 6 tls_cacertdir /etc/openldap/cacerts 7 7 pam_password md5 8 host { $ips{"ldap"}}9 nss_base_passwd ou={ $ldap_users_ou},dc={$ldap_dc}?one10 nss_base_group ou={ $ldap_groups_ou},dc={$ldap_dc}?one8 host {!$ips{"ldap"}!} 9 nss_base_passwd ou={!$ldap_users_ou!},dc={!$ldap_dc!}?one 10 nss_base_group ou={!$ldap_groups_ou!},dc={!$ldap_dc!}?one -
trunk/lib/template/rpm/centos/network
r672 r1094 1 { # $Id$}2 { # maintainer:}3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]}1 {! # $Id$ !} 2 {! # maintainer: !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 5 NETWORKING=yes 6 HOSTNAME={ $hostname}7 GATEWAY={ $gateway}6 HOSTNAME={!$hostname!} 7 GATEWAY={!$gateway!} -
trunk/lib/template/rpm/install_pkg.sh
r337 r1094 1 1 #!/bin/bash 2 { # $Id$}3 { # maintainer: Jacquelin Charbonnel}2 {! # $Id$ !} 3 {! # maintainer: Jacquelin Charbonnel !} 4 4 5 5 PKG=$* -
trunk/lib/template/vh4http_server
r861 r1094 1 { # $Id$}2 { # maintainer: Jacquelin Charbonnel}3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$1 {! # $Id$ !} 2 {! # maintainer: Jacquelin Charbonnel !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 <Directory { $htdocs}>5 <Directory {!$htdocs!}> 6 6 AuthBasicProvider ldap 7 7 AuthzLDAPAuthoritative on 8 AuthLDAPURL ldap://proxy:389/ou=People,{ $ldap_root}?{$ldap_attr}?8 AuthLDAPURL ldap://proxy:389/ou=People,{!$ldap_root!}?{!$ldap_attr!}? 9 9 AuthLDAPGroupAttributeIsDN off 10 10 AuthLDAPGroupAttribute memberUid 11 11 </Directory> 12 12 13 { 13 {! 14 14 while (($k,$v)=each %vh) 15 15 { … … 78 78 $OUT.="# --end $vh\n"; 79 79 } 80 }80 !} -
trunk/lib/template/vh4monitoring
r808 r1094 1 { # $Id$ } 2 { # maintainer: } 3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]} 4 1 {! # $Id$ !} 2 {! # maintainer: !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 5 4 6 5 # This file is for Apache 1.3.x and Apache 2.0.x … … 13 12 <VirtualHost _default_:80> 14 13 15 ServerName { `hostname -f`}14 ServerName {!`hostname -f`!} 16 15 DocumentRoot /var/www 17 ErrorLog { $apache_log_dir}/error.log18 CustomLog { $apache_log_dir}/access.log common16 ErrorLog {!$apache_log_dir!}/error.log 17 CustomLog {!$apache_log_dir!}/access.log common 19 18 LogLevel Warn 20 19 -
trunk/lib/template/vh4reverse_proxy
r795 r1094 1 { # $Id$}2 { # maintainer: Benoit Metrot}3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$1 {! # $Id$ !} 2 {! # maintainer: Benoit Metrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 5 ProxyHTMLLogVerbose On … … 10 10 </Proxy> 11 11 12 ServerName { $hostname}.{$PLATFORM}12 ServerName {!$hostname!}.{!$PLATFORM!} 13 13 14 SSLCertificateFile /etc/ssl/certs/ssl-cert-snakeoil.pem15 SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key14 SSLCertificateFile {!$apache_ssl_cert!} 15 SSLCertificateKeyFile {!$apache_ssl_key!} -
trunk/lib/template/vh4svn_server
r838 r1094 1 { # $Id: vh4svn_server 410 2009-08-07 12:43:18Z foury $}2 { # maintainer: Jacques Foury}3 # {$TEMPLATE}: processed by {$ENV{USER}} with {$0} from {$_ARGV[0]}1 {! # $Id: vh4svn_server 410 2009-08-07 12:43:18Z foury $ !} 2 {! # maintainer: Jacques Foury !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev: $ 4 4 5 5 <VirtualHost *:80> 6 6 ServerName localhost 7 7 DocumentRoot /var/www 8 ErrorLog { $apache_log_dir}/error.log9 CustomLog { $apache_log_dir}/access.log common8 ErrorLog {!$apache_log_dir!}/error.log 9 CustomLog {!$apache_log_dir!}/access.log common 10 10 LogLevel Warn 11 11 <Location /> … … 18 18 19 19 <VirtualHost *:80> 20 ServerName { $hostname}20 ServerName {!$hostname!} 21 21 DocumentRoot /var/www 22 ErrorLog { $apache_log_dir}/error.log23 CustomLog { $apache_log_dir}/access.log common22 ErrorLog {!$apache_log_dir!}/error.log 23 CustomLog {!$apache_log_dir!}/access.log common 24 24 LogLevel Warn 25 25 26 26 <Location /> 27 27 DAV svn 28 SVNParentPath { $dir_repo}28 SVNParentPath {!$dir_repo!} 29 29 </Location> 30 30 31 { 31 {! 32 32 for $r (split(/\s*,\s*/,$repositories)) 33 33 { … … 49 49 $OUT .= " </Location>\n\n"; 50 50 } 51 }51 !} 52 52 53 53 </VirtualHost> -
trunk/lib/template/vh_common4reverse_proxy.pm
r795 r1094 1 # generated from PLACO template: {!$TEMPLATE!} $Rev: $ 2 1 3 sub writecommonconf 2 4 { -
trunk/lib/template/vh_horde4reverse_proxy
r770 r1094 1 { # $Id$}2 { # maintainer: Benoit Metrot}3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$1 {! # $Id$ !} 2 {! # maintainer: Benoit Metrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 { 5 {! 6 6 require "$PWD/vh_common4reverse_proxy.pm" ; 7 8 $OUT=""; 7 9 8 10 sub writeconf … … 37 39 } 38 40 39 $OUT="";40 41 while (($k,$v)=each %vh) 41 42 { … … 51 52 writeconf($v,$vh,0,$vh,0,0,0) ; 52 53 } 53 }54 !} -
trunk/lib/template/vh_spip4reverse_proxy
r770 r1094 1 { # $Id$}2 { # maintainer: Benoit Metrot}3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$1 {! # $Id$ !} 2 {! # maintainer: Benoit Metrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 { 5 {! 6 6 require "$PWD/vh_common4reverse_proxy.pm" ; 7 8 $OUT = "" ; 7 9 8 10 sub writeconf … … 44 46 } 45 47 46 $OUT="";48 # $OUT=""; 47 49 while (($k,$v)=each %vh) 48 50 { … … 58 60 writeconf($v,$vh,0,$vh,1,1,0) ; 59 61 } 60 }62 !} -
trunk/lib/template/vh_static4reverse_proxy
r770 r1094 1 { # $Id$}2 { # maintainer: Benoit Metrot}3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$1 {! # $Id$ !} 2 {! # maintainer: Benoit Metrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 { 5 {! 6 6 require "$PWD/vh_common4reverse_proxy.pm" ; 7 8 $OUT=""; 7 9 8 10 sub writeconf … … 40 42 } 41 43 42 $OUT="";43 44 while (($k,$v)=each %vh) 44 45 { … … 54 55 writeconf($v,$vh,0,$vh,1,1,0) ; 55 56 } 56 }57 !} -
trunk/lib/template/vh_svn4reverse_proxy
r770 r1094 1 { # $Id$}2 { # maintainer: Benoit Metrot}3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$1 {! # $Id$ !} 2 {! # maintainer: Benoit Metrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 { 5 {! 6 6 require "$PWD/vh_common4reverse_proxy.pm" ; 7 7 8 $OUT=""; 9 8 10 sub writeconf 9 11 { … … 30 32 $OUT.=" Satisfy Any\n"; 31 33 $OUT.=" </Limit>\n"; 32 34 33 35 if ($rewritehtml) { $OUT.=sprintf(" SetOutputFilter INFLATE;proxy-html;DEFLATE\n"); } 34 36 $OUT.=sprintf(" </Location>\n"); … … 37 39 $OUT.="</IfModule>\n" if $https ; 38 40 } 39 40 $OUT=""; 41 41 42 while (($k,$v)=each %vh) 42 43 { … … 48 49 writeconf($v,$vh,1,$vh,1,0,0) ; 49 50 } 50 }51 !} -
trunk/lib/template/vh_sympa4reverse_proxy
r770 r1094 1 { # $Id$}2 { # maintainer: Benoit Metrot}3 # File generated by placo.{$RELEASE} from {$TEMPLATE} $Rev$1 {! # $Id$ !} 2 {! # maintainer: Benoit Metrot !} 3 # generated from PLACO template: {!$TEMPLATE!} $Rev$ 4 4 5 { 5 {! 6 6 require "$PWD/vh_common4reverse_proxy.pm" ; 7 8 $OUT=""; 7 9 8 10 sub writeconf … … 43 45 } 44 46 45 $OUT="";46 47 while (($k,$v)=each %vh) 47 48 { … … 57 58 writeconf($v,$vh,0,$vh,0,0,0) ; 58 59 } 59 }60 !} -
trunk/lib/toplevel/init_platform
r1006 r1094 5 5 source $PLACO_libdir/placolib.sh 6 6 7 install_platform.sh 7 config_bridges.sh 8 9 repository.sh -m localhost 8 10 9 11 #Iptables for host … … 28 30 ### Base VM (for later cloning) ### 29 31 30 create_vmbase.sh 32 create_vmbase.sh -m localhost 31 33 32 34 ### Required VM ### -
trunk/lib/toplevel/install_proxy
r897 r1094 6 6 7 7 create_vm.sh -m proxy 8 8 9 install_reverse_proxy.sh -m proxy 9 10
![(please configure the [header_logo] section in trac.ini)](/logo-cnrs.jpg)