summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrenton Leanhardt <bleanhar@redhat.com>2008-06-26 13:13:50 -0400
committerBrenton Leanhardt <bleanhar@redhat.com>2008-06-26 13:13:50 -0400
commitde216ffe878bc7c6054508e590e594e40defbf4c (patch)
treeab399e1d30859a1052bc6e9ff48967b47a6f8fed
parent0541e1f1eb0d09513a01cb41ac6519824e2f9c41 (diff)
everest-repo fixes
* Proper ownership for files/dirs mentioned in the specfil * machine_types.rb is no longer controlled by the everest::repo class
-rw-r--r--everest-repo/everest-repo-1.0.0/everest_module/files/machine_types.rb374
-rw-r--r--everest-repo/everest-repo-1.0.0/everest_module/manifests/init.pp26
-rw-r--r--everest-repo/everest-repo.spec16
3 files changed, 34 insertions, 382 deletions
diff --git a/everest-repo/everest-repo-1.0.0/everest_module/files/machine_types.rb b/everest-repo/everest-repo-1.0.0/everest_module/files/machine_types.rb
index ab925e9..1108813 100644
--- a/everest-repo/everest-repo-1.0.0/everest_module/files/machine_types.rb
+++ b/everest-repo/everest-repo-1.0.0/everest_module/files/machine_types.rb
@@ -13,370 +13,26 @@
# specify what facts will be used for a particular machine. #
################################################################################
-JBOSS_CONTEXTS = %w{ apps wapps wsvc svc }
-
-newfact("puppetserver", :on_all_nodes => true) do
- set_desc "The puppetmaster used for all configuration. If you are " +
- "provisioning a Repo machine, this should be it's FQDN"
- set_default "%repo%-repo.usersys.redhat.com"
-end
-
-newfact("logserver", :on_all_nodes => true) do
- set_desc "server used for syslogd. Another safe value is the FQDN of an " +
- "Everest host machine."
- set_default "localhost"
-end
-
-newfact("cobbler", :on_all_nodes => true) do
- set_desc "The cobbler server to configure for all yum dependencies"
- set_default "%repo%-repo.usersys.redhat.com"
-end
-
-newfact("user", :on_all_nodes => true) do
- set_desc "This is Everest user. If any work cannot be performed system-wide " +
- "it will be done for this user"
- set_default "it"
-end
-
-newfact("env", :on_all_nodes => true) do
- set_desc "The environment this machine will be configured for. Eventually " +
- "others will be supported by for now the default value is what you want."
- set_default "sandbox"
-end
-
-newfact("gitserver", :on_all_nodes => true) do
- set_desc "The machine hosting the bare git repositories for this machine. This fact " +
- "is also used at bootstrap time."
- set_default "%repo%-repo.usersys.redhat.com"
-end
-
-newfact("ajp_proxy") do
- set_desc "Apache proxy for the tomcat stack. Uses mod_proxy_ajp on Fedora and mod_jk on RHEL5"
- set_default "%machine_name%-jboss-dev.usersys.redhat.com"
-end
-
-newfact("ssl_term_proxy") do
- set_desc "Apache proxy where SSL is handled"
- set_default "%machine_name%-jboss-dev.usersys.redhat.com"
-end
-
-JBOSS_CONTEXTS.each do |ctx|
- instance_eval do
- newfact("jboss_#{ctx}_hosts") do
- set_desc "The machines running the jboss apps context. This can be a comma separated " +
- "list if you want to proxy multiple machines or it can be a single machine."
- set_default "%machine_name%-jboss-dev.usersys.redhat.com"
- end
- end
-end
-
-newfact("jboss_mode") do
- set_desc "This value will determine what 'mode' the JBoss container runs in. For intance, the default " +
- "value 'soa' will configure with all the necessary pieces for an ESB or JBPM node." +
- "Acceptable values for this fact are 'soa' and 'basic'."
- set_default "soa"
-end
-
-newfact("datastore_server") do
- set_desc "The MySQL server where the JBossESB message datastore resides."
- set_default "%machine_name%-jboss-dev.usersys.redhat.com"
-end
-
-newfact("messaging_server") do
- set_desc "The MySQL server where JBoss Messaging persists messages."
- set_default "%machine_name%-jboss-dev.usersys.redhat.com"
-end
-
-newfact("mysql_type") do
- set_desc "The type of Mysql server: standalone, primary-master, secondary-master or slave" +
- "standalone - A Standalone MySQL server is one that does not require binnary logging " +
- " and has no replication configuration." +
- "primary-master - A Primary Master Mysql server is one that has master to master " +
- " replication configured. NOTE: you want to add new schemas to the " +
- " primary master and replicationed to the secondary master. Be sure " +
- " the master to master configuration is working. " +
- "secondary-master - A Secondary Master Mysql server is one that has master to master " +
- " replication configured. A Secondary Master for our purpose is a " +
- " read only copy of the Primary Master. All updates will be per- " +
- " formed on the Primary Master and passed to the Secondary Master. " +
- "Slave - A Slave Mysql server is one that is connected to a Primary Master server and " +
- " is used for recovery or read-only." +
- "Options: standalone, primiary-master, secondary-master and slave"
- set_default "standalone"
-end
-
-newfact("mysql_server_id") do
- set_desc "Server ID for MySQL Replication. The default is fine if " +
- "you are using a standalone mysql type. If you are creating " +
- "master or slave server the mysql_server_id must be unique. "
- set_default "1"
-end
-
-newfact("mysql_master_ip_address") do
- set_desc "MySQL Replication requires the IP address of the Master " +
- "to establish communication between either the Master " +
- "to Slave configuration or a Master to Master configuration."
-end
-
-newfact("multicast_address") do
- set_desc "Multicast address used for hajndi, tree caches, etc. All machines " +
- "in the cluster must use the same adddress. It MUST be unique across " +
- "clusters. To ensure this for development please register an address here: " +
- "https://wwwapps.rdu.redhat.com/w3xwiki/index.php/EVEREST_IP"
- set_default "228.1.2.6"
-end
-
-newfact("maven_repo") do
- set_desc "Maven repo used for maven dependencies"
- set_default "%repo%-repo.usersys.redhat.com"
-end
-
-newfact("upstream_cobbler") do
- set_desc "Cobbler machine used for reposync"
- set_default "%repo%-repo.usersys.redhat.com"
-end
-
-newfact("code_rpm_repo") do
- set_desc "Yum repository that houses jboss artifact RPMs"
- set_default "%machine_name%-build.usersys.redhat.com"
-end
-
-newfact("ktk_db") do
- set_desc "Database used by knowledge machines"
- set_default "%machine_name%-mysql.usersys.redhat.com"
-end
-
-newfact("kerberos_realm") do
- set_desc "Kerberos signon realm for the Intranet Single Sign On"
- set_default "REDHAT.COM"
-end
-
-newfact("kerberos_kdc") do
- set_desc "Kerberos domain controller for the Intranet Single Sign On"
- set_default "kerberos.corp.redhat.com"
-end
-
-newfact("service_principal_host") do
- set_desc "This is the host name that supports the Intranet Single Sign On"
- set_default "docspace.corp.redhat.com"
-end
-
-newfact("clearspace_database_fqdn") do
- set_desc "This clearspaace database"
- set_default "%machine_name%-mysql.usersys.redhat.com"
-end
-
-newfact("wpmu_ds_host") do
- set_desc "Host machine for WordPress-MU's db"
- set_default "%machine_name%-mysql-standalone.usersys.redhat.com"
-end
-
-newfact("wpmu_secret_key") do
- set_desc "First part of WPMU's cookie authentication hash salt; make this a long and complicated random string."
-end
-
-newfact("wpmu_secret_salt") do
- set_desc "Second part of WPMU's cookie authentication hash salt; make this a long and complicated random string."
-end
-
-newfact("wpmu_no_such_blog_redirect_url") do
- set_desc "Url to redirect to if the requested blog/url doesn't exist; useful when signups are turned off"
- set_default "/wp-login.php"
-end
-
-newfact("wpmu_prefix") do
- set_desc "The wordpress context prefix if any.\nFor example: /wordpress-mu\n\nThis MUST be set to some value for non-proxy'ed deployments (ex: internal)."
- set_default "/wordpress-mu"
-end
-
-newfact("wpmu_host") do
- set_desc "Wordpress host name that is externally visible"
-end
-
-newfact("wpmu_visible_host") do
- set_desc "The externally visible hostname; for use when the app server != externally visible hostname due to proxies."
-end
-
-newfact("wpmu_blog_name") do
- set_desc "The value the WPMU codebase uses within the application, aka the name of the 'main' blog"
- set_default "Yet Another Red Hat Blog"
-end
+# newfact("puppetserver", :on_all_nodes => true) do
+# set_desc "The puppetmaster used for all configuration. If you are " +
+# "provisioning a Repo machine, this should be it's FQDN"
+# set_default "%repo%-repo.usersys.redhat.com"
+# end
+# newfact("logserver") do
+# set_desc "The machine to send syslog output to"
+# end
##############################################################################
# Machines definitions go here. It is important that this happens after the #
# fact declarations. Aside from that, order does not matter. #
##############################################################################
-classes_on_all_machine_types "puppet::client"
-
-# keep our facts DRY
-JBOSS_PROXY_FACTS = JBOSS_CONTEXTS.map {|c| "jboss_#{c}_hosts" }
-JBOSS_CONTAINER_FACTS = %w{ messaging_server datastore_server multicast_address ajp_proxy ssl_term_proxy jboss_mode}
-JBOSS_BUILD_FACTS = %w{ maven_repo }
-JBOSS_INTRANET_FACTS = %w{ kerberos_realm kerberos_kdc service_principal_host kerberos_server clearspace_database_fqdn}
-MYSQL_BASE_FACTS = %w{ mysql_type mysql_server_id }
-MYSQL_REPLICATION_FACTS = %w{ mysql_master_ip_address }
-WPMU_FACTS = %w{ wpmu_ds_host wpmu_secret_key wpmu_secret_salt wpmu_no_such_blog_redirect_url wpmu_prefix wpmu_host wpmu_blog_name}
-WPMU_PROXY_FACTS = %w{ wpmu_visible_hostname }
-INTRANET_BASE_FACTS = %w{ kerberos_realm kerberos_kdc }
-
-newmachine("jboss") do
- include_facts(*JBOSS_CONTAINER_FACTS)
- set_classes "java", "jboss::server::web"
- set_desc "Jboss container"
-end
-
-newmachine("intranet-jboss") do
- include_facts(*JBOSS_CONTAINER_FACTS + JBOSS_INTRANET_FACTS)
- set_classes "java", "jboss::server::intranet"
- set_desc "Intranet Jboss container"
-end
-
-newmachine("jboss-proxy") do
- include_facts(*JBOSS_PROXY_FACTS)
- set_classes "apache::ssl", "apache::ajp_devel", "apache::jk::web", "everest::httpd::static_content"
- set_desc "Apache proxy for the jboss tier"
-end
-
-newmachine("jboss-mysql") do
- include_facts(*MYSQL_BASE_FACTS)
- # This will be needed as soon as we figure out how to handle schemas in a
- # replicated environment
- #include_facts(*MYSQL_BASE_FACTS + MYSQL_REPLICATION_FACTS)
- set_classes "mysql::standalone", "jboss::ds::messaging", "jboss::ds::esb"
-end
-
-newmachine("intranet-mysql-standalone") do
- include_facts(*MYSQL_BASE_FACTS)
- # This will be needed as soon as we figure out how to handle schemas in a
- # replicated environment
- #include_facts(*MYSQL_BASE_FACTS + MYSQL_REPLICATION_FACTS)
- set_classes "mysql::standalone", "jboss::ds::clearspace", "blog::wordpressmu::datasource"
-end
-
-newmachine("intranet-mysql-primary-m2m") do
- include_facts "mysql_type", "mysql_server_id", "mysql_master_ip_address"
- set_classes "mysql::m2m", "jboss::ds::clearspace", "blog::wordpressmu::datasource"
-end
-
-newmachine("intranet-mysql-primary-m2s") do
- include_facts "mysql_type", "mysql_server_id", "mysql_master_ip_address"
- set_classes "mysql::m2s", "jboss::ds::clearspace", "blog::wordpressmu::datasource"
-end
-
-newmachine("mysql-standalone") do
- include_facts "mysql_server_id"
- set_classes "mysql::standalone"
-end
-
-newmachine("mysql-m2s") do
- include_facts "mysql_server_id"
- set_classes "mysql::m2s"
-end
-
-newmachine("mysql-slave") do
- include_facts "mysql_server_id", "mysql_master_ip_address"
- set_classes "mysql::slave"
-end
-
-newmachine("mysql-m2m") do
- include_facts "mysql_server_id", "mysql_master_ip_address"
- set_classes "mysql::m2m"
-end
-
-newmachine("jboss-mysql-primary-m2m") do
- include_facts "mysql_type", "mysql_server_id", "mysql_master_ip_address"
- set_classes "mysql::m2m", "jboss::ds::messaging", "jboss::ds::esb"
-end
-
-newmachine("jboss-mysql-primary-m2s") do
- include_facts "mysql_type", "mysql_server_id", "mysql_master_ip_address"
- set_classes "mysql::m2s", "jboss::ds::messaging", "jboss::ds::esb"
-end
-
-newmachine("jboss-dev") do
- include_facts(*JBOSS_PROXY_FACTS + JBOSS_BUILD_FACTS +
- JBOSS_CONTAINER_FACTS + MYSQL_BASE_FACTS)
- set_classes "everest::jboss::dev", "everest::workstation", "java", "jboss::server::web", "build::rpm", "build::maven", "build::web",
- "mysql::standalone", "jboss::ds::messaging", "jboss::ds::esb",
- "apache::ssl", "apache::ajp_http","apache::ajp_devel",
- "everest::httpd::static_content"
-end
-
-newmachine("bpel-build") do
- include_facts(*JBOSS_BUILD_FACTS)
- set_classes "everest::bpel::build", "java"
- set_desc "Development environment for bpel"
-end
-
-newmachine("splunk") do
- set_classes "splunk::server", "splunk::standalone"
-end
-
-newmachine("repo") do
- include_facts "upstream_cobbler"
- set_classes "everest::repo"
- set_desc "Houses all git/maven/yum repos needed for provisioning Everest machines"
-end
-
-newmachine("rails") do
- set_classes "everest::rails"
-end
-
-newmachine("selenium-queue") do
- set_classes "everest::selenium::queue"
- set_desc "Node for the selenium grid"
-end
-
-newmachine("host") do
- set_classes "everest::host"
- set_desc "A vanilla machine type that provides a desktop environment"
-end
-
-newmachine("ldap") do
- set_classes "everest::ldap::server"
-end
-
-newmachine("knowledge-jboss") do
- include_facts "messaging_server", "ktk_db", "multicast_address"
- set_classes "everest::knowledge::jboss"
-end
-
-newmachine("knowledge-build") do
- include_facts "maven_repo"
- set_classes "everest::knowledge::build"
-end
-
-newmachine("knowledge-mysql") do
- set_classes "everest::knowledge::mysql"
-end
-
-newmachine("hudson") do
- include_facts(*JBOSS_BUILD_FACTS)
- set_classes "java", "build::hudson", "build::web", "build::hudson::web"
- set_desc "A continuous integration environment using hudson configured with the web build components"
-end
-
-newmachine("build-web") do
- include_facts(*JBOSS_BUILD_FACTS)
- set_classes "java", "build::httpd", "build::rpm", "build::maven", "build::web"
-end
-
-newmachine("build-intranet") do
- include_facts(*JBOSS_BUILD_FACTS)
- set_classes "java", "build::httpd", "build::rpm", "build::maven", "build::intranet"
-end
-
-
-newmachine("internal-blogs") do
- include_facts(*WPMU_FACTS)
- set_classes "apache", "apache::ssl", "blog::wordpressmu::web::internal", "blog::wordpressmu::web::webconfig"
- set_desc "Simple app + ssl layer for internal WordPress-MU deployment (no proxy)"
-end
+# classes_on_all_machine_types "puppet::client"
-newmachine("intranet-proxy") do
- include_facts(*JBOSS_PROXY_FACTS + WPMU_FACTS + WPMU_PROXY_FACTS + INTRANET_BASE_FACTS )
- set_classes "apache::ssl", "apache::ajp_devel", "apache::jk::intranet", "blog::wordpressmu::web::internal", "blog::wordpress::web::proxyconfig", "wiki::wiki"
- set_desc "Apache proxy for the Intranet"
-end
+# newmachine("jboss-dev") do
+# include_facts "logserver"
+# set_classes "jboss::dev", "java", "jboss::server::web",
+# "mysql::standalone", "jboss::ds::messaging", "jboss::ds::esb",
+# "apache::ssl", "apache::ajp_http","apache::ajp_devel",
+# end
diff --git a/everest-repo/everest-repo-1.0.0/everest_module/manifests/init.pp b/everest-repo/everest-repo-1.0.0/everest_module/manifests/init.pp
index 7af239a..f9c9230 100644
--- a/everest-repo/everest-repo-1.0.0/everest_module/manifests/init.pp
+++ b/everest-repo/everest-repo-1.0.0/everest_module/manifests/init.pp
@@ -22,6 +22,7 @@ class everest {
# If this turns out to hurt performance we could also use a cronjob
exec { "Verify permissions are correct":
command => "/bin/chown -R ${user}:${user} /pub",
+ require => File["/pub"],
}
file { "/pub":
@@ -29,6 +30,12 @@ class everest {
owner => $user,
group => $user,
}
+
+ file { "/pub/git":
+ ensure => directory,
+ owner => $user,
+ group => $user,
+ }
}
class xinetd inherits base {
@@ -58,7 +65,7 @@ class everest {
}
class httpd inherits base {
- package { ["httpd","mod_ssl"]:
+ package { "httpd":
ensure => installed
}
@@ -67,7 +74,7 @@ class everest {
hasstatus => true,
# There is a bug in the httpd service script
restart => "/bin/sleep 5 && /sbin/service httpd graceful",
- require => [Package["httpd"], Package["mod_ssl"]],
+ require => Package["httpd"],
}
}
@@ -84,21 +91,6 @@ class everest {
ensure => installed,
}
-
- file { "/pub/git/puppet":
- ensure => directory,
- mode => 0755,
- owner => "$user",
- group => "$user",
- }
-
- file { "/pub/git/static":
- ensure => directory,
- mode => 0755,
- owner => "$user",
- group => "$user",
- }
-
everest::xinetd::dropfile { "git-daemon":
module => "everest",
require => Package["git-daemon"],
diff --git a/everest-repo/everest-repo.spec b/everest-repo/everest-repo.spec
index 9a94f2a..e897ca3 100644
--- a/everest-repo/everest-repo.spec
+++ b/everest-repo/everest-repo.spec
@@ -1,6 +1,6 @@
Name: everest-repo
Version: 1.0.0
-Release: 10%{?dist}
+Release: 14%{?dist}
Summary: Everest repository
Group: Applications/System
@@ -52,8 +52,8 @@ cp -r docs/tmp/* $RPM_BUILD_ROOT/pub/docs/everest
cp -r everest_module $RPM_BUILD_ROOT/etc/puppet/modules/everest
-# TODO: These are config files
cp everest_module/files/repo.yaml $RPM_BUILD_ROOT/etc/everest
+cp everest_module/files/machine_types.rb $RPM_BUILD_ROOT/etc/everest
cp bootstrap.pp $RPM_BUILD_ROOT/etc/everest
@@ -66,12 +66,16 @@ rm -rf $RPM_BUILD_ROOT
%files
%defattr(-,root,root,-)
-/etc/everest/repo.yaml
-/etc/everest/bootstrap.pp
+/etc/httpd/conf.d/docs.conf
/etc/puppet/modules/everest
-/etc/init.d/everest-repo-bootstrap
+/etc/everest/bootstrap.pp
/pub/docs
-/etc/httpd/conf.d
+%config(noreplace) /etc/everest/repo.yaml
+%config(noreplace) /etc/everest/machine_types.rb
+
+%defattr(755,root,root)
+/etc/init.d/everest-repo-bootstrap
+
%doc