--- /dev/null
+---
+- name: Ensure packages are not present.
+ apt:
+ name: "{{ item }}"
+ state: absent
+ with_items:
+ - ceph_packages
+ - packages_to_remove
+
+- name: Upgrade packages
+ apt:
+ name: "{{ item }}"
+ state: latest
+ with_items: packages_to_upgrade
+ when: packages_to_upgrade|length > 0
+
+- name: Install packages
+ apt:
+ name: "{{ item }}"
+ state: present
+ with_items: packages
+ when: packages|length > 0
--- /dev/null
+---
+- name: Set apt preferences
+ template:
+ dest: "/etc/apt/preferences.d/{{ item }}"
+ src: "../../templates/apt/{{ item }}"
+ owner: root
+ group: root
+ mode: 0644
+ with_items:
+ - ceph.pref
+ - ceph-redhat.pref
+ register: apt_prefs
+
+- name: Add sources list
+ template:
+ dest: /etc/apt/sources.list
+ src: "../../templates/apt/sources.list.{{ ansible_distribution_release | lower }}"
+ owner: root
+ group: root
+ mode: 0644
+ register: sources
+
+- name: Install apt keys
+ apt_key:
+ url: "{{ item }}"
+ state: present
+ with_items:
+ - "http://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/autobuild.asc;hb=HEAD"
+ - "http://ceph.com/git/?p=ceph.git;a=blob_plain;f=keys/release.asc"
+
+# required for apt_repository
+- name: Install python-apt
+ apt:
+ name: python-apt
+ state: present
+
+- name: Add local apt repos.
+ apt_repository:
+ repo: "{{ item }}"
+ state: present
+ update_cache: no
+ mode: 0644
+ with_items: apt_repos|list + common_apt_repos|list
+ register: local_apt_repos
+
+- name: Update apt cache.
+ apt:
+ update_cache: yes
+ when: sources|changed or
+ local_apt_repos|changed or
+ apt_prefs|changed
--- /dev/null
+---
+- name: Setup local repo files.
+ include: apt/repos.yml
+ tags:
+ - repos
+
+- name: Perform package related tasks.
+ include: apt/packages.yml
+ tags:
+ - packages
- include: yum_systems.yml
when: ansible_pkg_mgr == "yum"
+# configure things specific to apt systems
+- include: apt_systems.yml
+ when: ansible_pkg_mgr == "apt"
+
# configure centos specific things
- include: setup-centos.yml
when: ansible_distribution == "CentOS"
- include: setup-fedora.yml
when: ansible_distribution == "Fedora"
+# configure ubuntu specific things
+- include: setup-ubuntu.yml
+ when: ansible_distribution == "Ubuntu"
+
# configure pip to use our mirror
- include: pip.yml
tags:
tags:
- packages
-- name: Install ntp package on deb based systems.
+- name: Install ntp package on apt based systems.
apt:
name: ntp
state: present
- when: ansible_pkg_mgr == "deb"
+ when: ansible_pkg_mgr == "apt"
tags:
- packages
--- /dev/null
+---
+- name: Remove /etc/ceph
+ file:
+ path: /etc/ceph
+ state: absent
- "{{ ansible_distribution | lower }}_{{ ansible_distribution_major_version }}.yml"
- empty.yml
+- name: Including distro specific variables.
+ include_vars: "{{ item }}"
+ with_first_found:
+ - "{{ ansible_distribution | lower }}.yml"
+ - empty.yml
+
- name: Including version specific variables.
include_vars: "{{ item }}"
with_first_found:
--- /dev/null
+{# {{ ansible_managed }} #}
+Package: *
+Pin: origin gitbuilder.ceph.redhat.com
+Pin-Priority: 998
--- /dev/null
+{# {{ ansible_managed }} #}
+Package: *
+Pin: origin gitbuilder.ceph.com
+Pin-Priority: 999
--- /dev/null
+# {{ ansible_managed }}
+# deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty main restricted
+
+# deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-updates main restricted
+# deb http://security.ubuntu.com/ubuntu trusty-security main restricted
+
+# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
+# newer versions of the distribution.
+deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty main restricted
+deb-src http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty main restricted
+
+## Major bug fix updates produced after the final release of the
+## distribution.
+deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-updates main restricted
+deb-src http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-updates main restricted
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team. Also, please note that software in universe WILL NOT receive any
+## review or updates from the Ubuntu security team.
+deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty universe
+deb-src http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty universe
+deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-updates universe
+deb-src http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-updates universe
+
+## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
+## team, and may not be under a free licence. Please satisfy yourself as to
+## your rights to use the software. Also, please note that software in
+## multiverse WILL NOT receive any review or updates from the Ubuntu
+## security team.
+deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty multiverse
+deb-src http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty multiverse
+deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-updates multiverse
+deb-src http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-updates multiverse
+
+## N.B. software from this repository may not have been tested as
+## extensively as that contained in the main release, although it includes
+## newer versions of some applications which may provide useful features.
+## Also, please note that software in backports WILL NOT receive any review
+## or updates from the Ubuntu security team.
+deb http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
+deb-src http://apt-mirror.front.sepia.ceph.com/archive.ubuntu.com/ubuntu trusty-backports main restricted universe multiverse
+
+deb http://security.ubuntu.com/ubuntu trusty-security main restricted
+deb-src http://security.ubuntu.com/ubuntu trusty-security main restricted
+deb http://security.ubuntu.com/ubuntu trusty-security universe
+deb-src http://security.ubuntu.com/ubuntu trusty-security universe
+deb http://security.ubuntu.com/ubuntu trusty-security multiverse
+deb-src http://security.ubuntu.com/ubuntu trusty-security multiverse
+
+## Uncomment the following two lines to add software from Canonical's
+## 'partner' repository.
+## This software is not part of Ubuntu, but is offered by Canonical and the
+## respective vendors as a service to Ubuntu users.
+# deb http://archive.canonical.com/ubuntu trusty partner
+# deb-src http://archive.canonical.com/ubuntu trusty partner
+
+## Uncomment the following two lines to add software from Ubuntu's
+## 'extras' repository.
+## This software is not part of Ubuntu, but is offered by third-party
+## developers who want to ship their latest software.
+# deb http://extras.ubuntu.com/ubuntu trusty main
+# deb-src http://extras.ubuntu.com/ubuntu trusty main
+
---
ntp_service_name: ntp
+
+ceph_packages:
+ - ceph
+ - ceph-common
+ - libcephfs1
+ - radosgw
+ - python-ceph
+ - librbd1
+ - librados2
+
+packages: []
+
+apt_repos: []
+common_apt_repos: []
--- /dev/null
+---
+common_apt_repos:
+ # mod_fastcgi for radosgw
+ - "deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-{{ansible_distribution_release}}-x86_64-basic/ref/master/ {{ansible_distribution_release}} main"
--- /dev/null
+---
+apt_repos:
+ # blkin libraries, only trusty has new enough lttng for these
+ - "deb [arch=amd64] http://apt-mirror.front.sepia.ceph.com/blkin/ trusty main"
+ - "deb http://gitbuilder.ceph.com/libapache-mod-fastcgi-deb-trusty-x86_64-basic/ref/master/ trusty main"
+
+packages:
+ - blkin
+ - lttng-tools
+ # for apache
+ - libfcgi0ldbl
+ ###
+ # for s3 tests
+ - python-virtualenv
+ - python-dev
+ - libevent-dev
+ ###
+ # for cpan
+ - perl
+ - libwww-perl
+ ###
+ - lsb-release
+ - build-essential
+ - sysstat
+ - gdb
+ - python-configobj
+ - python-gevent
+ # for running ceph
+ - libedit2
+ - libssl0.9.8
+ - libgoogle-perftools4
+ - libboost-thread1.54.0
+ - cryptsetup-bin
+ - xfsprogs
+ - gdisk
+ - parted
+ ###
+ # for setting BIOS settings
+ - smbios-utils
+ ###
+ - libcrypto++9
+ - libuuid1
+ - libfcgi
+ - btrfs-tools
+ # for compiling helpers and such
+ - libatomic-ops-dev
+ ###
+ # used by workunits
+ - git-core
+ - attr
+ - dbench
+ - bonnie++
+ - iozone3
+ - valgrind
+ - python-nose
+ - mpich2
+ - mpich
+ - libmpich2-dev
+ - ant
+ ###
+ # used by the xfstests tasks
+ - libtool
+ - automake
+ - gettext
+ - uuid-dev
+ - libacl1-dev
+ - bc
+ - xfsdump
+ - dmapi
+ - xfslibs-dev
+ - libattr1-dev
+ ###
+ - sysprof
+ - vim
+ - pdsh
+ - collectl
+ # for blktrace and seekwatcher
+ - blktrace
+ - python-numpy
+ - python-matplotlib
+ - mencoder
+ ###
+ # qemu
+ - kvm
+ - genisoimage
+ ###
+ # for json_xs to investigate JSON by hand
+ - libjson-xs-perl
+ # for pretty-printing xml
+ - xml-twig-tools
+ # for java bindings, hadoop, etc.
+ - default-jdk
+ - junit4
+ ###
+ # tgt
+ - tgt
+ - open-iscsi
+ ###
+ # for disk/etc monitoring
+ - smartmontools
+ - nagios-nrpe-server
+ ###
+ # for samba testing
+ - cifs-utils
+ # for Static IP
+ - ipcalc
+
+packages_to_upgrade:
+ - apt
+ - apache2
+ - libapache2-mod-fastcgi
+
+packages_to_remove:
+ # openmpi-common conflicts with mpitch stuff
+ - openmpi-common