Merge pull request #337 from ceph/split-repo

Modify the repo to host reoles on the galaxy
pull/338/head
Leseb 2015-07-24 18:28:05 +02:00
commit e8559bf052
29 changed files with 8 additions and 129 deletions

View File

@ -15,21 +15,20 @@
gather_facts: False gather_facts: False
vars: vars:
github: False github: ceph/ansible
roles: roles:
- ceph-common - ceph-common
- ceph-mon - ceph-mon
- ceph-osd - ceph-osd
- ceph-mds - ceph-mds
- ceph-radosgw - ceph-rgw
- haproxy
tasks: tasks:
- name: check for github prefix option on commandline - name: check for github prefix option on commandline
tags: split tags: split
fail: > fail: >
msg='github prefix missing! e.g: (--extra-vars github=mhubig/ansible).' msg='github prefix missing! e.g: (--extra-vars github=ceph/ansible).'
when: github == False when: github == False
- name: split the repo in seperate branches - name: split the repo in seperate branches
@ -63,4 +62,3 @@
git subtree push --prefix=roles/{{ item }} {{ item }} master git subtree push --prefix=roles/{{ item }} {{ item }} master
chdir=../ chdir=../
with_items: roles with_items: roles

View File

@ -161,7 +161,7 @@ dummy:
# Rados Gateway options # Rados Gateway options
# #
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls #radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls
#radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml #radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-rgw/defaults/main.yml
#radosgw_civetweb_port: 80 #radosgw_civetweb_port: 80
#radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/ #radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/
#radosgw_keystone_url: # url:admin_port ie: http://192.168.0.1:35357 #radosgw_keystone_url: # url:admin_port ie: http://192.168.0.1:35357

View File

@ -169,7 +169,7 @@ osd_deep_scrub_stride: 1048576
## Rados Gateway options ## Rados Gateway options
# #
#radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls #radosgw_dns_name: your.subdomain.tld # subdomains used by radosgw. See http://ceph.com/docs/master/radosgw/config/#enabling-subdomain-s3-calls
radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-radosgw/defaults/main.yml radosgw_frontend: civetweb # supported options are 'apache' or 'civetweb', also edit roles/ceph-rgw/defaults/main.yml
radosgw_civetweb_port: 80 radosgw_civetweb_port: 80
radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/ radosgw_keystone: false # activate OpenStack Keystone options full detail here: http://ceph.com/docs/master/radosgw/keystone/
#radosgw_keystone_url: # url:admin_port ie: http://192.168.0.1:35357 #radosgw_keystone_url: # url:admin_port ie: http://192.168.0.1:35357

View File

@ -1,7 +0,0 @@
---
# You can override vars by using host or group vars
rgw_group_name: rgws
# Rados Gateway options
radosgw_interface: eth1 # the public interface which the radosgw talks to the world with, this variable is used in the haproxy role, this does not need to be set if haproxy is not used.

View File

@ -1,4 +0,0 @@
# Set ENABLED to 1 if you want the init script to start haproxy.
ENABLED=1
# Add extra flags here.
#EXTRAOPTS="-de -m 16"

View File

@ -1,6 +0,0 @@
---
## Check distribution release
#
- include: precise.yml
when: ansible_distribution_release == 'precise'

View File

@ -1,5 +0,0 @@
---
- name: restart haproxy
service: >
name=haproxy
state=restarted

View File

@ -1,6 +0,0 @@
---
## Check distribution release
#
- include: precise.yml
when: ansible_distribution_release == 'precise'

View File

@ -1,32 +0,0 @@
---
- name: Add repository
apt_repository: >
repo=ppa:vbernat/haproxy-1.5
state=present
- name: Install haproxy
apt: >
name={{ item }}
state=present
with_items:
- haproxy
- socat
- name: Copy default configuration
copy: >
src=precise/haproxy
dest=/etc/default/haproxy
notify: restart haproxy
- name: Create configuration
template: >
src=precise/haproxy.cfg
dest=/etc/haproxy/haproxy.cfg
backup=yes
notify: restart haproxy
- name: Start and enable haproxy
service: >
name=haproxy
state=started
enabled=yes

View File

@ -1,58 +0,0 @@
#
# {{ ansible_managed }}
#
global
log /dev/log local0
log /dev/log local1 notice
chroot /var/lib/haproxy
user haproxy
group haproxy
daemon
stats socket /var/lib/haproxy/stats level admin
defaults
log global
mode http
option httplog
option dontlognull
contimeout 5000
clitimeout 50000
srvtimeout 50000
errorfile 400 /etc/haproxy/errors/400.http
errorfile 403 /etc/haproxy/errors/403.http
errorfile 408 /etc/haproxy/errors/408.http
errorfile 500 /etc/haproxy/errors/500.http
errorfile 502 /etc/haproxy/errors/502.http
errorfile 503 /etc/haproxy/errors/503.http
errorfile 504 /etc/haproxy/errors/504.http
frontend http_frontend
bind *:80
mode http
option httpclose
option forwardfor
default_backend rgw
frontend https_frontend
bind *:443 ssl crt /etc/ceph/radosgw-key-cert.pem
mode http
option httpclose
option forwardfor
reqadd X-Forwarded-Proto:\ https
default_backend rgw
backend rgw
mode http
balance roundrobin
cookie RADOSGWLB insert indirect nocache
{% for host in groups[rgw_group_name] %}
server {{ hostvars[host].ansible_hostname }} {{ hostvars[host]['ansible_' + radosgw_interface ].ipv4.address }}:80 check cookie {{ hostvars[host].ansible_hostname }}
{% endfor %}
listen stats :8080
mode http
stats enable
stats hide-version
stats realm Haproxy\ Statistics
stats uri /
#stats auth Username:Password

View File

@ -170,7 +170,7 @@
roles: roles:
- ceph-common - ceph-common
- ceph-radosgw - ceph-rgw
post_tasks: post_tasks:
- name: restart rados gateway server(s) - name: restart rados gateway server(s)

View File

@ -20,4 +20,4 @@
- hosts: rgws - hosts: rgws
sudo: True sudo: True
roles: roles:
- ceph-radosgw - ceph-rgw

View File

@ -6,5 +6,4 @@
- ceph-mon - ceph-mon
- ceph-osd - ceph-osd
- ceph-mds - ceph-mds
- ceph-radosgw - ceph-rgw
- haproxy