]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-cookbooks.git/commitdiff
repo: support custom apt repos
authorAlexandre Marangone <alexandre.marangone@inktank.com>
Wed, 8 May 2013 18:32:02 +0000 (11:32 -0700)
committerAlexandre Marangone <alexandre.marangone@inktank.com>
Wed, 8 May 2013 18:32:02 +0000 (11:32 -0700)
Signed-off-by: Alexandre Marangone <alexandre.marangone@inktank.com>
attributes/repo.rb
recipes/apt.rb

index 625f77cb4f170142a86185ccd7e118250916677b..961cc8a9ae849865e20288e188b5dc0fd67e3a3b 100644 (file)
@@ -2,3 +2,9 @@ default['ceph']['branch'] = "stable" # Can be stable, testing or dev.
 # Major release version to install or gitbuilder branch
 default['ceph']['version'] = "cuttlefish"
 default['ceph']['el_add_epel'] = true
+default['ceph']['debian']['stable']['repository'] = "http://ceph.com/debian-#{node['ceph']['version']}/"
+default['ceph']['debian']['stable']['repository_key'] = "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc"
+default['ceph']['debian']['testing']['repository'] = "http://www.ceph.com/debian-testing/"
+default['ceph']['debian']['testing']['repository_key'] = "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc"
+default['ceph']['debian']['dev']['repository'] = "http://gitbuilder.ceph.com/ceph-deb-#{node['lsb']['codename']}-x86_64-basic/ref/#{node['ceph']['version']}"
+default['ceph']['debian']['dev']['repository_key'] = "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc"
index 0b3dabe95c361e3ee599c5806ed2827b343d258e..769be10c98dcf16d2e21a1f9d31cda4443ced45a 100644 (file)
@@ -1,29 +1,12 @@
 include_recipe "apt"
 
-case node['ceph']['branch']
-when "stable"
-  apt_repository "ceph-stable" do
-    repo_name "ceph"
-    uri "http://ceph.com/debian-#{node['ceph']['version']}/"
-    distribution node['lsb']['codename']
-    components ["main"]
-    key "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc"
-  end
-when "testing"
-  apt_repository "ceph-testing" do
-    repo_name "ceph"
-    uri "http://www.ceph.com/debian-testing/"
-    distribution node['lsb']['codename']
-    components ["main"]
-    key "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc"
-  end
-when "dev"
-  apt_repository "ceph-gitbuilder" do
-    repo_name "ceph"
-    uri "http://gitbuilder.ceph.com/ceph-deb-#{node['lsb']['codename']}-x86_64-basic/ref/#{node['ceph']['version']}"
-    distribution node['lsb']['codename']
-    components ["main"]
-    key "https://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc"
-  end
+branch = node['ceph']['branch']
+
+apt_repository "ceph-#{branch}" do
+  repo_name "ceph"
+  uri node['ceph']['debian'][branch]['repository']
+  distribution node['lsb']['codename']
+  components ['main']
+  key node['ceph']['debian'][branch]['repository_key']
 end