[PATCH configure] Puppet Pulp sync script v6
by Richard Su
In this version, Pulp is activated only if its rpm is available from
a yum repo.
The steps in the script are:
1. check Pulp rpm is installed
2. write out templatized configuration files
3. initialize Pulp
4. start pulp-server service
5. save default credentials (may need to change admin password)
6. create x86_64 repos for f13 and f14
7. trigger a sync on both repos
Syncs run in the background. The first sync may take some time to complete
depending on your network bandwidth. Use "pulp-admin repo status --id" to
check the status of the sync using f13-x86_64 and f14-x86_64 for the
repo id.
---
bin/aeolus-configure | 6 +
recipes/aeolus_recipe/aeolus_recipe.pp | 2 +-
recipes/aeolus_recipe/aeolus_uninstall.pp | 2 +-
recipes/aeolus_recipe/manifests/aeolus.pp | 8 ++-
recipes/aeolus_recipe/manifests/pulp.pp | 76 ++++++++++++++
recipes/aeolus_recipe/templates/pulp-client.conf | 49 +++++++++
recipes/aeolus_recipe/templates/pulp.conf | 119 ++++++++++++++++++++++
7 files changed, 259 insertions(+), 3 deletions(-)
create mode 100644 recipes/aeolus_recipe/manifests/pulp.pp
create mode 100755 recipes/aeolus_recipe/templates/pulp-client.conf
create mode 100644 recipes/aeolus_recipe/templates/pulp.conf
diff --git a/bin/aeolus-configure b/bin/aeolus-configure
index 6d87cb1..ee004e0 100644
--- a/bin/aeolus-configure
+++ b/bin/aeolus-configure
@@ -1,5 +1,11 @@
#!/bin/sh
+YUM_LIST_PULP=`yum list pulp`
+if [[ "$YUM_LIST_PULP" == *pulp* ]]
+then
+ export FACTER_AEOLUS_ENABLE_PULP=true
+fi
+
export FACTER_AEOLUS_ENABLE_HTTPS=true
export FACTER_AEOLUS_ENABLE_SECURITY=false
puppet /usr/share/aeolus-configure/aeolus_recipe.pp \
diff --git a/recipes/aeolus_recipe/aeolus_recipe.pp b/recipes/aeolus_recipe/aeolus_recipe.pp
index 879b314..65f468f 100644
--- a/recipes/aeolus_recipe/aeolus_recipe.pp
+++ b/recipes/aeolus_recipe/aeolus_recipe.pp
@@ -30,6 +30,7 @@ import "aeolus_recipe/defaults"
include aeolus::conductor
include aeolus::image-factory
include aeolus::iwhd
+include aeolus::pulp
aeolus::create_bucket{"aeolus":}
@@ -70,4 +71,3 @@ aeolus::conductor::hwp{"hwp1":
login_user => 'admin',
login_password => 'password',
require => Aeolus::Site_admin["admin"] }
-
diff --git a/recipes/aeolus_recipe/aeolus_uninstall.pp b/recipes/aeolus_recipe/aeolus_uninstall.pp
index c0b0eae..8dba827 100644
--- a/recipes/aeolus_recipe/aeolus_uninstall.pp
+++ b/recipes/aeolus_recipe/aeolus_uninstall.pp
@@ -30,8 +30,8 @@ import "aeolus_recipe/defaults"
include aeolus::conductor::disabled
include aeolus::iwhd::disabled
include aeolus::image-factory::disabled
+include aeolus::pulp::disabled
aeolus::deltacloud::disabled{"mock": }
aeolus::deltacloud::disabled{"ec2-us-east-1": }
aeolus::deltacloud::disabled{"ec2-us-west-1": }
-
diff --git a/recipes/aeolus_recipe/manifests/aeolus.pp b/recipes/aeolus_recipe/manifests/aeolus.pp
index ca684bb..b944ff9 100644
--- a/recipes/aeolus_recipe/manifests/aeolus.pp
+++ b/recipes/aeolus_recipe/manifests/aeolus.pp
@@ -25,6 +25,13 @@ if $aeolus_enable_security == "true" or $aeolus_enable_security == "1" {
$enable_security = false
}
+if $aeolus_enable_pulp == "true" or $aeolus_enable_pulp == "1" {
+ import "pulp"
+ $enable_pulp = true
+} else {
+ $enable_pulp = false
+}
+
# Base aeolus class
class aeolus {
@@ -63,4 +70,3 @@ define aeolus::provider($type, $port, $endpoint="", $login_user="", $login_passw
login_password => $login_password,
require => Aeolus::Deltacloud[$name] }
}
-
diff --git a/recipes/aeolus_recipe/manifests/pulp.pp b/recipes/aeolus_recipe/manifests/pulp.pp
new file mode 100644
index 0000000..595fe24
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/pulp.pp
@@ -0,0 +1,76 @@
+# Aeolus pulp puppet definitions
+
+class aeolus::pulp inherits aeolus {
+
+if $enable_pulp {
+ package { 'pulp':
+ ensure => 'installed'
+ }
+
+ file { 'pulp-conf-file-pulp':
+ path => '/etc/pulp/pulp.conf',
+ owner => root,
+ group => root,
+ content => template("aeolus_recipe/pulp.conf"),
+ require => Package['pulp']
+ }
+
+ file { 'pulp-conf-file-client':
+ path => '/etc/pulp/client.conf',
+ owner => apache,
+ group => apache,
+ content => template("aeolus_recipe/pulp-client.conf"),
+ require => Package['pulp']
+ }
+
+ exec{'pulp-init':
+ command => "/sbin/service pulp-server init",
+ logoutput => true,
+ creates => "/var/lib/pulp/init.flag",
+ require => [Package['pulp'],
+ File['pulp-conf-file-pulp'],
+ File['pulp-conf-file-client']]}
+
+ service { 'pulp-server':
+ ensure => 'running',
+ enable => true,
+ require => [Package['pulp'],
+ Exec["pulp-init"]]}
+
+ exec{'pulp-auth':
+ command => "/usr/bin/pulp-admin -u admin -p admin auth login --username admin --password admin",
+ logoutput => true,
+ creates => "/root/.pulp/user-key.pem",
+ require => Service['pulp-server']}
+
+ exec{'pulp-f13-x86-64-repo-create':
+ command => "/usr/bin/pulp-admin repo create --id f13-x86_64 --feed yum:http://download.fedoraproject.org/pub/fedora/linux/releases/13/Fedora...",
+ logoutput => true,
+ creates => "/var/lib/pulp/repos/pub/fedora/linux/releases/13/Fedora/x86_64/os",
+ require => Exec['pulp-auth']}
+
+ exec{'pulp-f13-x86-64-repo-sync':
+ command => "/usr/bin/pulp-admin repo sync --id f13-x86_64",
+ logoutput => true,
+ require => Exec['pulp-f13-x86-64-repo-create']}
+
+ exec{'pulp-f14-x86-64-repo-create':
+ command => "/usr/bin/pulp-admin repo create --id f14-x86_64 --feed yum:http://download.fedoraproject.org/pub/fedora/linux/releases/14/Fedora...",
+ logoutput => true,
+ creates => "/var/lib/pulp/repos/pub/fedora/linux/releases/14/Fedora/x86_64/os",
+ require => Exec['pulp-auth']}
+
+ exec{'pulp-f14-x86-64-repo-sync':
+ command => "/usr/bin/pulp-admin repo sync --id f14-x86_64",
+ logoutput => true,
+ require => Exec['pulp-f14-x86-64-repo-create']}
+ }
+}
+
+class aeolus::pulp::disabled {
+ service { 'pulp-server':
+ ensure => 'stopped',
+ enable => false,
+ hasstatus=> true
+ }
+}
diff --git a/recipes/aeolus_recipe/templates/pulp-client.conf b/recipes/aeolus_recipe/templates/pulp-client.conf
new file mode 100755
index 0000000..7c990e8
--- /dev/null
+++ b/recipes/aeolus_recipe/templates/pulp-client.conf
@@ -0,0 +1,49 @@
+# The pulp server configuration
+# host : The pulp server
+# port : The port providing the RESTful API.
+# scheme : The protocol.
+# interval : The agent update interval
+[server]
+host = <%= fqdn %>
+port = 443
+scheme = https
+path = /pulp/api
+interval = 240
+
+# Client configuration
+# reboot_schedule : Time in minutes or 'now' before system is scheduled for reboot
+# when user requests a reboot for applicable errata.
+# assumeyes : Uncomment this to override this value. Assumes that install performs all the suggested actions such as reboot on successful install;
+# import_gpg_keys : automatically import gpg keys if available during remote package installs
+[client]
+reboot_schedule = 3
+import_gpg_keys = False
+#assumeyes = False
+repo_file = /etc/yum.repos.d/pulp.repo
+mirror_list_dir = /etc/yum.repos.d
+gpg_keys_dir = /etc/pki/pulp-gpg-keys
+
+# heartbeat
+# interval in seconds
+[heartbeat]
+seconds=10
+
+# messaging
+# scheme: (tcp|ssl)
+# port: broker port
+# cacert: the CA certificate (PEM) to verify the server.
+# clientcert: The client (PEM) key & certificate.
+[messaging]
+scheme = tcp
+port = 5672
+cacert =
+clientcert =
+
+
+# Content distribution options
+# baseurl : The content base url
+# keyurl : The gpg key base url
+[cds]
+baseurl = https://localhost/pulp/repos
+keyurl = http://localhost/pulp/gpg
+ksurl = http://localhost/pulp/ks
diff --git a/recipes/aeolus_recipe/templates/pulp.conf b/recipes/aeolus_recipe/templates/pulp.conf
new file mode 100644
index 0000000..ef34eaf
--- /dev/null
+++ b/recipes/aeolus_recipe/templates/pulp.conf
@@ -0,0 +1,119 @@
+# Server options
+#
+# server_name: server hostname(protocol defaults to https)
+# relative_url: the relative url at which repos are exposed to the clients
+# key_url: the relative url at which gpg keys are exposed to clients
+# default_login: default admin username for your pulp server
+# default_password: default password for admin
+# Highly recommend changing the default_password with "pulp-admin user update"
+#
+[server]
+server_name: <%= fqdn %>
+relative_url: /pulp/repos
+key_url: /pulp/gpg
+default_login: admin
+default_password: admin
+
+# Messaging options.
+#
+# url: the broker url.
+# cacert: path to PEM encoded CA certificate file
+# clientcert: path to PEM encoded file containing both
+# the private key and certificate.
+#
+# The url has form: <transport>://<host>:<port> where
+# transport can be (tcp|ssl). When ssl is specified,
+# cacert and clientcert must be specified.
+
+[messaging]
+url: tcp://localhost:5672
+cacert: /etc/pki/qpid/ca/ca.crt
+clientcert: /etc/pki/qpid/client/client.pem
+
+#
+# AMQP event processing
+#
+[events]
+send_enabled: false
+recv_enabled: false
+
+# Configures aspects of the pulp web server security.
+#
+# cacert: full path to the CA certificate that will be used to sign
+# consumer and admin identification certificates. This MUST match
+# the value of SSLCACertificateFile in /etc/httpd/conf.d/pulp.conf.
+# cakey: full path to the private key for the CA certificate
+#
+
+[security]
+cacert: /etc/pki/pulp/ca.crt
+cakey: /etc/pki/pulp/ca.key
+# oauth_key: string key to enable OAuth style authentication
+# oauth_secret: string shared secret that can be used for OAuth style authentication
+# For more info see: https://fedorahosted.org/pulp/wiki/Authentication
+
+[auditing]
+events_file: /var/log/pulp/events.log
+lifetime: 90
+backups: 4
+
+# Configuration for storage of consumer history
+#
+# lifetime: length in days - consumer history entries older than this
+# will be purged; setting this to -1 will disable history purging
+[consumer_history]
+lifetime: 180
+
+[logs]
+qpid_log_level: info
+level: info
+pulp_file: /var/log/pulp/pulp.log
+grinder_file: /var/log/pulp/grinder.log
+
+[rhn]
+# using less than 5 threads can cause issues with progress feed back
+threads: 5
+fetch_all_packages: false
+remove_old_packages: false
+cert_file: /etc/sysconfig/rhn/entitlement-cert.xml
+systemid_file: /etc/sysconfig/rhn/systemid
+
+[yum]
+threads: 3
+# True/False to flag if we should remove older rpms
+remove_old_packages: false
+# Integer to specify how many old packages to keep.
+# Only used if 'removeold' is set to True
+num_old_pkgs_keep: 2
+# Uncomment below to set a bandwidth limit in KB/sec for downloading
+# Only used if 'removeold' is set to True
+num_old_pkgs_keep: 2
+# Uncomment below to set a bandwidth limit in KB/sec for downloading
+# 0 represents unlimited
+# limit_in_KB: 500
+# Uncomment the below section with appropriate values for proxy configuration
+# proxy_url:
+# proxy_port:
+# proxy_user:
+# proxy_pass:
+
+[repos]
+content_url: https://cdn.redhat.com/
+use_entitlement_certs = false
+default_to_published: true
+
+[database]
+# automatically upgrade the database when the data model changes
+name: pulp_database
+# comma separated list of URIs to pass to pymongo
+seeds: localhost
+
+# Uncomment the below section with appropriate values, to use an external ldap for
+# user authentication instead of pulp.
+#[ldap]
+#uri: ldap://localhost
+#base: dc=localhost
+
+[cds]
+# messaging timeout for sync. <initial>:<duration>
+sync_timeout = 10:7200
--
1.7.4.4
12 years
[PATCH configure 1/2] utilize puppet external node definitions in aeolus review
by Mo Morsi
(morazi's patchset merged/reworked)
aeolus configuration can now be specified in yml config files
---
Rakefile | 2 +-
bin/aeolus-cleanup | 5 +-
bin/aeolus-configure | 3 +-
bin/aeolus-node | 9 +++
contrib/aeolus-configure.spec | 14 ++++--
recipes/aeolus_recipe/aeolus_recipe.pp | 70 --------------------------
recipes/aeolus_recipe/aeolus_uninstall.pp | 38 --------------
recipes/aeolus_recipe/manifests/conductor.pp | 41 +++++++++++++++
recipes/aeolus_recipe/manifests/init.pp | 63 +++++++++++++++++++++++
recipes/apache/manifests/init.pp | 6 +-
10 files changed, 132 insertions(+), 119 deletions(-)
create mode 100644 bin/aeolus-node
delete mode 100644 recipes/aeolus_recipe/aeolus_recipe.pp
delete mode 100644 recipes/aeolus_recipe/aeolus_uninstall.pp
create mode 100644 recipes/aeolus_recipe/manifests/init.pp
diff --git a/Rakefile b/Rakefile
index 1104573..647cf65 100644
--- a/Rakefile
+++ b/Rakefile
@@ -19,7 +19,7 @@ RPM_SPEC = "contrib/aeolus-configure.spec"
rpm_task =
Rake::RpmTask.new(RPM_SPEC) do |rpm|
rpm.need_tar = true
- rpm.package_files.include("bin/*", "recipes/**/*")
+ rpm.package_files.include("bin/*", "recipes/**/*", "conf/*")
rpm.topdir = "#{RPMBUILD_DIR}"
end
diff --git a/bin/aeolus-cleanup b/bin/aeolus-cleanup
index 87fb405..a45a277 100644
--- a/bin/aeolus-cleanup
+++ b/bin/aeolus-cleanup
@@ -2,8 +2,9 @@
export FACTER_AEOLUS_ENABLE_HTTPS=true
export FACTER_AEOLUS_ENABLE_SECURITY=false
-puppet /usr/share/aeolus-configure/aeolus_uninstall.pp \
++puppet /usr/share/aeolus-configure/modules/aeolus_recipe/manifests/defaults.pp \
--modulepath=/usr/share/aeolus-configure/modules/ \
- --logdest=/var/log/aeolus-configure/aeolus-cleanup.log \
+ --external_nodes '/usr/sbin/aeolus-node cleanup' --node_terminus exec \
+ --logdest=/var/log/aeolus-configure/aeolus-configure.log \
--logdest=console
diff --git a/bin/aeolus-configure b/bin/aeolus-configure
index 6d87cb1..a4fae56 100644
--- a/bin/aeolus-configure
+++ b/bin/aeolus-configure
@@ -2,8 +2,9 @@
export FACTER_AEOLUS_ENABLE_HTTPS=true
export FACTER_AEOLUS_ENABLE_SECURITY=false
-puppet /usr/share/aeolus-configure/aeolus_recipe.pp \
+puppet /usr/share/aeolus-configure/modules/aeolus_recipe/manifests/defaults.pp \
--modulepath=/usr/share/aeolus-configure/modules/ \
+ --external_nodes '/usr/sbin/aeolus-node configure' --node_terminus exec \
--logdest=/var/log/aeolus-configure/aeolus-configure.log \
--logdest=console
diff --git a/bin/aeolus-node b/bin/aeolus-node
new file mode 100644
index 0000000..5b1468a
--- /dev/null
+++ b/bin/aeolus-node
@@ -0,0 +1,9 @@
+#! /bin/sh
+
+CAT=/bin/cat
+NODE_DIR=/etc/aeolus-configure/nodes
+
+# look for node setting files, or revert to default
+[ -f nodes/$2_$1 ] && NODE=$2_$1 || NODE=default_$1
+
+$CAT $NODE_DIR/$NODE
diff --git a/contrib/aeolus-configure.spec b/contrib/aeolus-configure.spec
index 4bfaf6a..f4a9877 100644
--- a/contrib/aeolus-configure.spec
+++ b/contrib/aeolus-configure.spec
@@ -3,8 +3,8 @@
Summary: Aeolus Configure Puppet Recipe
Name: aeolus-configure
-Version: 2.0.0
-Release: 11%{?dist}%{?extra_release}
+Version: 2.0.1
+Release: 0%{?dist}%{?extra_release}
Group: Applications/Internet
License: GPLv2+
@@ -31,8 +31,8 @@ Aeolus Configure Puppet Recipe
%install
rm -rf %{buildroot}
%{__mkdir} -p %{buildroot}/%{dchome}/modules/aeolus_recipe %{buildroot}/%{_sbindir}
-%{__cp} -R %{pbuild}/recipes/aeolus_recipe/aeolus_recipe.pp %{buildroot}/%{dchome}
-%{__cp} -R %{pbuild}/recipes/aeolus_recipe/aeolus_uninstall.pp %{buildroot}/%{dchome}
+%{__mkdir} -p %{buildroot}%{_sysconfdir}/aeolus-configure/nodes
+%{__cp} -R %{pbuild}/conf/* %{buildroot}%{_sysconfdir}/aeolus-configure/nodes
%{__cp} -R %{pbuild}/recipes/aeolus_recipe/*/ %{buildroot}/%{dchome}/modules/aeolus_recipe
%{__cp} -R %{pbuild}/recipes/apache/ %{buildroot}/%{dchome}/modules/apache
%{__cp} -R %{pbuild}/recipes/ntp/ %{buildroot}/%{dchome}/modules/ntp
@@ -40,6 +40,7 @@ rm -rf %{buildroot}
%{__cp} -R %{pbuild}/recipes/postgres/ %{buildroot}/%{dchome}/modules/postgres
%{__cp} -R %{pbuild}/bin/aeolus-configure %{buildroot}/%{_sbindir}/
%{__cp} -R %{pbuild}/bin/aeolus-cleanup %{buildroot}/%{_sbindir}/
+%{__cp} -R %{pbuild}/bin/aeolus-node %{buildroot}/%{_sbindir}/\
%clean
rm -rf %{buildroot}
@@ -48,9 +49,14 @@ rm -rf %{buildroot}
%defattr(-,root,root,-)
%attr(0755, root, root) %{_sbindir}/aeolus-configure
%attr(0755, root, root) %{_sbindir}/aeolus-cleanup
+%attr(0755, root, root) %{_sbindir}/aeolus-node
+%config(noreplace) %{_sysconfdir}/aeolus-configure/nodes/*
%{dchome}
%changelog
+* Wed May 18 2011 Mike Orazi <morazi(a)redhat.com> 2.0.1-0
+- Move using external nodes so changes to behavior can happen in etc
+
* Wed May 18 2011 Chris Lalancette <clalance(a)redhat.com> - 2.0.0-11
- Bump the release version
diff --git a/recipes/aeolus_recipe/aeolus_recipe.pp b/recipes/aeolus_recipe/aeolus_recipe.pp
deleted file mode 100644
index 6ae1827..0000000
--- a/recipes/aeolus_recipe/aeolus_recipe.pp
+++ /dev/null
@@ -1,70 +0,0 @@
-#--
-# Copyright (C) 2010 Red Hat Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Author: Mohammed Morsi <mmorsi(a)redhat.com>
-#--
-
-#
-# aeolus installation recipe
-#
-
-# Modules used by the recipe
-import "aeolus_recipe/aeolus"
-import "aeolus_recipe/defaults"
-
-# include the various aeolus components
-include aeolus::conductor
-include aeolus::image-factory
-include aeolus::iwhd
-
-aeolus::create_bucket{"aeolus":}
-
-aeolus::site_admin{"$admin_user":
- email => 'dcuser(a)aeolusproject.org',
- password => "$admin_password",
- first_name => 'aeolus',
- last_name => 'user'}
-
-aeolus::provider{"mock":
- type => 'mock',
- port => 3002,
- require => Aeolus::Site_admin["admin"] }
-
-aeolus::provider{"ec2-us-east-1":
- type => 'ec2',
- endpoint => 'us-east-1',
- port => 3003,
- require => Aeolus::Site_admin["admin"] }
-
-aeolus::provider{"ec2-us-west-1":
- type => 'ec2',
- endpoint => 'us-west-1',
- port => 3004,
- require => Aeolus::Site_admin["admin"] }
-
-aeolus::provider{"rhevm":
- type => "rhevm",
- port => 3005,
- require => Aeolus::Site_admin["admin"] }
-
-aeolus::conductor::hwp{"hwp1":
- memory => "1",
- cpu => "1",
- storage => "1",
- architecture => "x86_64",
- require => Aeolus::Site_admin["admin"] }
-
diff --git a/recipes/aeolus_recipe/aeolus_uninstall.pp b/recipes/aeolus_recipe/aeolus_uninstall.pp
deleted file mode 100644
index 572960a..0000000
--- a/recipes/aeolus_recipe/aeolus_uninstall.pp
+++ /dev/null
@@ -1,38 +0,0 @@
-#--
-# Copyright (C) 2010 Red Hat Inc.
-#
-# This library is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 2.1 of the License, or (at your option) any later version.
-#
-# This library is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public
-# License along with this library; if not, write to the Free Software
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-#
-# Author: Mohammed Morsi <mmorsi(a)redhat.com>
-#--
-
-#
-# aeolus uninstallation recipe
-#
-
-# Modules used by the recipe
-import "aeolus_recipe/aeolus"
-import "aeolus_recipe/defaults"
-
-# disable the various aeolus components
-include aeolus::conductor::disabled
-include aeolus::iwhd::disabled
-include aeolus::image-factory::disabled
-
-aeolus::deltacloud::disabled{"mock": }
-aeolus::deltacloud::disabled{"ec2-us-east-1": }
-aeolus::deltacloud::disabled{"ec2-us-west-1": }
-aeolus::deltacloud::disabled{"rhevm": }
-
diff --git a/recipes/aeolus_recipe/manifests/conductor.pp b/recipes/aeolus_recipe/manifests/conductor.pp
index 10de426..ebe703f 100644
--- a/recipes/aeolus_recipe/manifests/conductor.pp
+++ b/recipes/aeolus_recipe/manifests/conductor.pp
@@ -160,6 +160,47 @@ class aeolus::conductor inherits aeolus {
enable => 'true' }
}
+class aeolus::conductor::seed_data {
+ aeolus::create_bucket{"aeolus":}
+
+ aeolus::site_admin{"$admin_user":
+ email => 'dcuser(a)aeolusproject.org',
+ password => "$admin_password",
+ first_name => 'aeolus',
+ last_name => 'user'}
+
+ aeolus::provider{"mock":
+ type => 'mock',
+ port => 3002,
+ require => Aeolus::Site_admin["admin"] }
+
+ aeolus::provider{"ec2-us-east-1":
+ type => 'ec2',
+ endpoint => 'us-east-1',
+ port => 3003,
+ require => Aeolus::Site_admin["admin"] }
+
+ aeolus::provider{"ec2-us-west-1":
+ type => 'ec2',
+ endpoint => 'us-west-1',
+ port => 3004,
+ require => Aeolus::Site_admin["admin"] }
+
+ aeolus::conductor::hwp{"hwp1":
+ memory => "1",
+ cpu => "1",
+ storage => "1",
+ architecture => "x86_64",
+ require => Aeolus::Site_admin["admin"] }
+
+}
+
+class aeolus::conductor::remove_seed_data {
+ aeolus::deltacloud::disabled{"mock": }
+ aeolus::deltacloud::disabled{"ec2-us-east-1": }
+ aeolus::deltacloud::disabled{"ec2-us-west-1": }
+}
+
class aeolus::conductor::disabled {
file {"/var/lib/aeolus-conductor":
ensure => absent,
diff --git a/recipes/aeolus_recipe/manifests/init.pp b/recipes/aeolus_recipe/manifests/init.pp
new file mode 100644
index 0000000..e3e601c
--- /dev/null
+++ b/recipes/aeolus_recipe/manifests/init.pp
@@ -0,0 +1,63 @@
+# Aeolus puppet definitions
+
+import "postgres"
+import "apache"
+import "rails"
+import "selinux"
+import "ntp"
+
+import "conductor"
+import "deltacloud"
+import "iwhd"
+import "image-factory"
+
+if $aeolus_enable_https == "true" or $aeolus_enable_https == "1" {
+ import "openssl"
+ $enable_https = true
+} else {
+ $enable_https = false
+}
+
+if $aeolus_enable_security == "true" or $aeolus_enable_security == "1" {
+ import "openssl"
+ $enable_security = true
+} else {
+ $enable_security = false
+}
+
+
+# Base aeolus class
+class aeolus {
+ package{'curl': ensure => 'installed'}
+
+ # Setup repos which to pull aeolus components
+ # TODO: Don't hardcode these repos to RHEL-6
+ # The issue is that $releasever resolves to something like 6Server
+ # so we either need to have a repo per RHEL variant, or we need
+ # to have smarter logic here
+ $base_url_release = $operatingsystem ? { 'fedora' => "fedora-\$releasever",
+ 'redhat' => 'rhel-6' }
+ $pulp_base_url_release = $operatingsystem ? { 'fedora' => "fedora-13",
+ 'redhat' => 'rhel5' }
+
+ yumrepo{"${name}_arch":
+ name => "${name}_arch",
+ descr => "${name}_arch",
+ baseurl => "http://repos.fedorapeople.org/repos/aeolus/packages/${base_url_release}/\...",
+ enabled => 0, gpgcheck => 0}
+ yumrepo{"${name}_noarch":
+ name => "${name}_noarch",
+ descr => "${name}_noarch",
+ baseurl => "http://repos.fedorapeople.org/repos/aeolus/packages/${base_url_release}/n...",
+ enabled => 0, gpgcheck => 0}
+
+}
+
+# Create a new provider in aeolus
+define aeolus::provider($type, $port, $endpoint=""){
+ aeolus::deltacloud{$name: provider_type => $type, endpoint => $endpoint, port => $port}
+ aeolus::conductor::provider{$name:
+ type => $type,
+ url => "http://localhost:${port}/api",
+ require => Aeolus::Deltacloud[$name] }
+}
diff --git a/recipes/apache/manifests/init.pp b/recipes/apache/manifests/init.pp
index de703aa..32a0723 100644
--- a/recipes/apache/manifests/init.pp
+++ b/recipes/apache/manifests/init.pp
@@ -1,6 +1,3 @@
-$apache_dir = "/etc/httpd"
-$apache_conf_dir = "${apache_dir}/conf.d"
-
class apache {
# require apache and mod_ssl
package { "httpd": ensure => installed }
@@ -31,6 +28,9 @@ class apache {
}
define apache::site ( $ensure = 'present', $source = '') {
+ $apache_dir = "/etc/httpd"
+ $apache_conf_dir = "${apache_dir}/conf.d"
+
$site_file = "${apache_conf_dir}/${name}.conf"
file {
$site_file:
--
1.7.2.3
12 years
[PATCH conductor] Add pulp as a dependency in spec file
by Richard Su
Redmine #1520
---
aeolus-all.spec.in | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/aeolus-all.spec.in b/aeolus-all.spec.in
index aac9657..52ff831 100644
--- a/aeolus-all.spec.in
+++ b/aeolus-all.spec.in
@@ -17,6 +17,7 @@ Requires: qpid-cpp-server
Requires: rubygem(image_factory_connector)
Requires: mongodb-server
Requires: mod_ssl
+Requires: pulp
%description
This is the aeolus meta-package. If you want to install aeolus and all of its
--
1.7.4.4
12 years
viewstate (rev. 5)
by Tomas Sedovic
As Jan pointed out, this makes sense to happen on the newui branch.
This is the same code as yesterday but rebased against newui.
12 years
[PATCH 0/6]: Various package cleanups
by Chris Lalancette
While going through the repositories preparing for this release, I noticed
a number of packages that are no longer needed, and/or are available in
upstream Fedora. This patchset does a bit of cleanup to make things more
sane; it should be relatively uncontroversial.
12 years
Fixes InstanceController rspec test after Condor update
by Matt Wagner
We're seeing a failing test on Hudson after the Condor changes were applied. It's not actually a bug in the code, but that the test isn't properly setting up the requirements for a new instance, causing it to fail immediately. But in actuality, this test only cares that the instance state hasn't changed, so I modified the test to express this.
Extra credit:
I tried to write this as:
expect {
put :update, :instance => {:state => 'running', :name => 'mockinstance6'}, :id => instance.id
}.to {
change(instance, :name)
!change(instance, :state)
}
but it looks as though this is not legal. If anyone happens to know a cleaner way of rewriting the attached patch, I'd love to find out more.
-- Matt
12 years
Revert Deployments and Instances to using old UI for now
by Matt Wagner
In the newui branch, we have a whole bunch of tests (17) failing because DeploymentsController and InstancesController render in the new UI, but haven't been updated to actually use it. With an impending sprint deadline, I propose this patch to change Instances and Deployments back to the old UI, leaving Pools as the only user of the new UI.
-- Matt
12 years
(no subject)
by Matt Wagner
Hi all,
I'm attaching a patch for #1529, getting PoolsController#show to work with the new UI. I haven't applied the Wonder Twins' styling; my understanding is that this will be done as a separate step. Please let me know if this is incorrect and I'm submitting something hideously ugly that's not supposed to be.
I also have some scattered musings/questions about this below:
- There are a few components I haven't implemented because I don't believe they're ready / in scope yet. Namely, the "Alerts" section of the page and the Deployments / History / Properties / Permission line, including the buttons to the right of those tabs.
- Is there an existing implementation of switching between 'filter' and 'pretty' views? I suspect that multiple tasks are going to involve doing this, and want to make sure I'm not reinventing the wheel.
- I added a "statistics" method to pools, returning the data required for the partial at top. (Except for Alerts, Updates, and Quota, which I don't believe are ready to be implemented.) You'll note that I have it in a commented-out Rails.cache.fetch block. If uncommented, it'll store the result in local memory. (We don't need to pull in memcache this way.) It's commented out right now because it'll take some work to make sure we invalidate it properly, and I wanted someone else to sanity-check this idea before I implemented it. The Rails logs indicate that the queries for this section takes about 25ms; this isn't a crazy amount of time, but I suspect these sections will start to add up.
- A few sections seem to imply that we care about the state/status of a deployment, but the code has no such concept just yet. Instances have a state, but their deployments do not. Retrieving it through the association implies that we cannot (easily, at least) sort or filter on deployment state. It's also unclear to me what the state of a deployment would be if it had multiple instances in different states. Has someone already figured this out?
- You may note some deep associations being used, like "deployment.realm.provider.provider_type.name". I tried to add a few associations where they made sense, but it wouldn't hurt for someone to give a little extra scrutiny to make sure I didn't do anything too foolish.
-- Matt
12 years
recreated newui branch
by Jan Provazník
Because of some minor inconsistency of newui branch and rebase conflict
I recreated this branch again, commits are almost identical. If you use
this branch, pull it again, please.
Jan
12 years
TASK 1527 Pools pretty view
by Tomas Hrcka
-pretty view without css, added src/.idea to gitignore, fix one cucumber test
-removed unnecessary markup
-added expand all link
-removed duolble in locales en.yaml
-droped unnecessary if conditions
-fixed typo
12 years