Skip to content
Snippets Groups Projects
Commit 68181e10 authored by Alessandro Costantini's avatar Alessandro Costantini
Browse files

ceph modificaton to install radosgw.gateway

parent 88cd71ad
No related branches found
No related tags found
No related merge requests found
......@@ -35,7 +35,7 @@ $rabbit_password = 'openstack',
##CEPH
$ceph_fsid = 'f65809d3-7961-4cd7-b731-a9bc94bc6e9c',
# Uncomment if auth_type is different from 'cephx'
#ceph_auth_type = 'cephx',
$ceph_auth_type = 'cephx',
$ceph_mon_initmemb = '<CEPH_MONIM_1>,<CEPH_MONIM_2>,<CEPH_MONIM_3>',
$ceph_mon_host = '<CEPH_MON_1>,<CEPH_MON_2>,<CEPH_MON_3>',
$ceph_osdpool_pgnum = '100',
......@@ -50,6 +50,8 @@ $ceph_journal_size = '5120',
$os_verbose = false,
$os_debug = false,
$os_region = 'regionOne',
$os_admin_token = '12345678901234567890',
##DB_params
#MysqlDB
......
class iaas::profile::fastcgi (
$enable_fastcgi = false,
$enable_rgw = false,
$os_endpoint = $iaas::params::main_hostname,
$os_admin_token = $iaas::params::os_admin_token,
) {
if $enable_fastcgi {
ceph::rgw::apache_fastcgi { 'radosgw.gateway':
admin_email => 'root@localhost',
docroot => '/var/www',
fcgi_file => '/var/www/s3gw.fcgi',
rgw_dns_name => $::fqdn,
rgw_port => 80,
rgw_socket_path => $::ceph::params::rgw_socket_path,
syslog => true,
ceph_apache_repo => true,
}
}
}
class iaas::profile::radosgw (
$enable_fastcgi = false,
$enable_rgw = false,
$os_endpoint = $iaas::params::main_hostname,
$os_admin_token = $iaas::params::os_admin_token,
) {
if $enable_rgw {
ceph::rgw { 'radosgw.gateway':
pkg_radosgw => $::ceph::params::pkg_radosgw,
rgw_data => "/var/lib/ceph/radosgw/ceph-radosgw.gateway",
# user => $ceph::profile::params::rgw_user,
user => 'root',
keyring_path => "/etc/ceph/ceph.client.radosgw.gateway.keyring",
log_file => '/var/log/ceph/radosgw.log',
rgw_dns_name => $::fqdn,
rgw_socket_path => '/var/run/ceph/ceph.radosgw.gateway.fastcgi.sock',
syslog => true,
rgw_port => '80',
# frontend_type => 'civetweb',
# rgw_frontends => "civetweb port=$::hostname:7480",
frontend_type => 'apache-fastcgi',
rgw_frontends => "fastcgi socket_port=9000 socket_host=$::hostname",
rgw_print_continue => 'false',
}
# ceph::rgw::keystone { 'radosgw.gateway':
# rgw_keystone_admin_token => $os_admin_token,
# rgw_keystone_url => "http://${os_endpoint}:5000",
# rgw_keystone_version => 'v2.0',
# rgw_keystone_accepted_roles => '_member_, Member',
# rgw_keystone_token_cache_size => 500,
# rgw_keystone_revocation_interval => 600,
# nss_db_path => '/var/lib/ceph/nss',
# user => 'root',
# }
}
}
......@@ -20,7 +20,8 @@ $ceph_public_network = $iaas::params::ceph_public_network,
$ceph_journal_size = $iaas::params::ceph_journal_size,
##ADMIN credentails - override
$os_admin_token = '12345678901234567890',
#$os_admin_token = '12345678901234567890',
$os_admin_token = $iaas::params::os_admin_token,
$os_admin_email = 'admin@mail',
$os_admin_passwd = '<ADMIN_PASSWORD>',
$os_admin_tenant = 'admin',
......
......@@ -20,7 +20,8 @@ $ceph_public_network = $iaas::params::ceph_public_network,
$ceph_journal_size = $iaas::params::ceph_journal_size,
##ADMIN credentails - override
$os_admin_token = '12345678901234567890',
#$os_admin_token = '12345678901234567890',
$os_admin_token = $iaas::params::os_admin_token,
$os_admin_email = 'admin@mail',
$os_admin_passwd = '<ADMIN_PASSWORD>',
$os_admin_tenant = 'admin',
......
......@@ -9,6 +9,7 @@ $ceph_secret_cinderbkup = 'AQBKvuVUMHvaGhAADT6nvBv9LFs7dqpB8Kis0Q==',
$ceph_bootstrap_mdskey = 'AQBxkvVU4F+VDBAArxUf+8s0LbxIxNrbyEC1kw==',
$ceph_mon_key = 'AQApksZUIJhXJxAAEHVW/dbL1OeLA7Om++zdVw==',
$ceph_secret_radosgw = 'AQCbGddWJyqjHBAAomrJkvccCHsWaNcIif65mg==',
$ceph_secret_radosgw_gateway = 'AQBNN9dWbU3SORAAERedNbXc0gxm0edAfayf2w==',
##OSD+POOL configuration
$osd_configure = true,
......@@ -16,7 +17,7 @@ $osd_configure = true,
##CEPH - no override
$ceph_fsid = $iaas::params::ceph_fsid,
# Uncomment if auth_type is different from 'cephx'
#ceph_auth_type = $iaas::params::ceph_authentication_type,
$ceph_auth_type = $iaas::params::ceph_auth_type,
$ceph_mon_initmembers = $iaas::params::ceph_mon_initmemb,
$ceph_mon_host = $iaas::params::ceph_mon_host,
$ceph_osdpool_pgnum = $iaas::params::ceph_osdpool_pgnum,
......@@ -31,14 +32,17 @@ $ceph_journal_size = $iaas::params::ceph_journal_size,
$ceph_pool = {'images' => { pg_num => '128'},
'volumes' => { pg_num => '128'},
'vms' => { pg_num => '128'},
'backups' => { pg_num => '128'},
'objstore' => { pg_num => '128'}},
'backups' => { pg_num => '128'}},
$ceph_osd = {'/dev/vdb'=> { journal => '/osd1'},
'/dev/vdc'=> { journal => '/osd2'}},
##RADOSGW
$rgw_enable = false,
##OPENSTACK
#$os_endpoint = $iaas::params::main_hostname,
#$os_admin_token = $iaas::params::os_admin_token,
) {
# Ceph
......@@ -94,32 +98,59 @@ $rgw_enable = false,
inject_as_id => 'mon.',
inject_keyring => "/var/lib/ceph/mon/ceph-$::hostname/keyring";
'client.radosgw':
secret => $ceph_secret_radosgw,
'client.radosgw.gateway':
secret => $ceph_secret_radosgw_gateway,
cap_mon => 'allow rwx',
cap_osd => 'allow class-read object_prefix rbd_children, allow rwx pool=objstore',
# cap_osd => 'allow class-read object_prefix rbd_children, allow rwx pool=objstore',
cap_osd => 'allow rwx',
inject => 'true',
inject_as_id => 'mon.',
inject_keyring => "/var/lib/ceph/mon/ceph-$::hostname/keyring",
}
if $rgw_enable {
ceph::rgw { 'radosgw':
pkg_radosgw => $::ceph::params::pkg_radosgw,
rgw_data => "/var/lib/ceph/radosgw/ceph-${name}",
user => $ceph::profile::params::rgw_user,
keyring_path => "/etc/ceph/ceph.client.${name}.keyring",
log_file => '/var/log/ceph/radosgw.log',
rgw_dns_name => $::fqdn,
rgw_socket_path => $::ceph::params::rgw_socket_path,
syslog => true,
rgw_port => '7480',
frontend_type => 'civetweb',
rgw_frontends => "civetweb port=$::hostname:7480",
rgw_print_continue => 'false',
}
}
# if $rgw_enable {
#
# ceph::rgw::apache_fastcgi { 'radosgw.gateway':
# admin_email => 'root@localhost',
# docroot => '/var/www',
# fcgi_file => '/var/www/rgw.fcgi',
# rgw_dns_name => $::fqdn,
# rgw_port => 80,
# rgw_socket_path => $::ceph::params::rgw_socket_path,
# syslog => true,
# ceph_apache_repo => true,
# } ->
#
# ceph::rgw { 'radosgw.gateway':
# pkg_radosgw => $::ceph::params::pkg_radosgw,
# rgw_data => "/var/lib/ceph/radosgw/ceph-radosgw.gateway",
## user => $ceph::profile::params::rgw_user,
# user => 'www-data',
# keyring_path => "/etc/ceph/ceph.client.radosgw.gateway.keyring",
# log_file => '/var/log/ceph/radosgw.log',
# rgw_dns_name => $::fqdn,
# rgw_socket_path => $::ceph::params::rgw_socket_path,
# syslog => true,
# rgw_port => '80',
## frontend_type => 'civetweb',
## rgw_frontends => 'civetweb port=$::hostname:7480',
# frontend_type => 'apache-fastcgi',
# rgw_frontends => "fastcgi socket_port=9000 socket_host=$::hostname",
# rgw_print_continue => 'false',
# } ->
#
# ceph::rgw::keystone { 'radosgw.gateway':
# rgw_keystone_admin_token => $iaas::params::os_admin_token,
# rgw_keystone_url => "http://${os_endpoint}:5000",
# rgw_keystone_version => 'v2.0',
# rgw_keystone_accepted_roles => '_member_, Member',
# rgw_keystone_token_cache_size => 500,
# rgw_keystone_revocation_interval => 600,
# nss_db_path => '/var/lib/ceph/nss',
# user => 'www-data',
# }
# }
# Classes
......@@ -131,7 +162,7 @@ $rgw_enable = false,
class {'ceph::profile::params':
fsid => $iaas::params::ceph_fsid,
# Uncomment if auth_type is different from 'cephx'
#authentication_type => $iaas::params::ceph_auth_type,
authentication_type => $iaas::params::ceph_auth_type,
mon_initial_members => $iaas::params::ceph_mon_initmemb,
mon_host => $iaas::params::ceph_mon_host,
osd_pool_default_pg_num => $iaas::params::ceph_osdpool_pgnum,
......@@ -142,10 +173,21 @@ $rgw_enable = false,
public_network => $iaas::params::ceph_public_network,
mon_key => $ceph_mon_key,
osd_journal_size => $iaas::params::ceph_journal_size,
enable_rgw => $rgw_enable,
enable_rgw => true,
# frontend_type => 'civetweb',
# rgw_frontends => "civetweb port=$::hostname:7480",
fastcgi => true,
} ->
class { 'ceph::profile::base': } ->
class { 'iaas::profile::fastcgi':
enable_fastcgi => true,
} ->
class { 'ceph::profile::mon': } ->
class { 'ceph::keys': } ->
class { 'ceph::profile::rgw': }
# class { 'ceph::profile::rgw': } ->
class { 'ceph::keys': }
class { 'iaas::profile::radosgw':
enable_rgw => true,
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment