Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iaas-ha
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OCP-TOOLS
iaas-ha
Commits
4ce7087f
Commit
4ce7087f
authored
9 years ago
by
Alessandro Costantini
Browse files
Options
Downloads
Patches
Plain Diff
storage.pp changed with standared CEPH calls
parent
57bae380
No related branches found
Branches containing commit
No related tags found
Tags containing commit
2 merge requests
!8
Development
,
!7
Storage ceph
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
manifests/role/storage.pp
+41
-39
41 additions, 39 deletions
manifests/role/storage.pp
with
41 additions
and
39 deletions
manifests/role/storage.pp
+
41
−
39
View file @
4ce7087f
class
iaas::role::storage
(
$cluster_vlan
=
undef
,
$cluster_ipaddress
=
undef
,
$cluster_netmask
=
undef
,
$osd_disk
=
undef
,
$osd_partition
=
undef
,
$osd_uuid
=
undef
,
#
$cluster_vlan = undef,
#
$cluster_ipaddress = undef,
#
$cluster_netmask = undef,
#
$osd_disk = undef,
#
$osd_partition = undef,
#
$osd_uuid = undef,
)
{
# Base
class
{
'iaas::profile::base'
:
}
->
# Ceph cluster network
network_config
{
"eth0.
${cluster_vlan}
"
:
ensure
=>
'present'
,
family
=>
'inet'
,
method
=>
'static'
,
ipaddress
=>
$cluster_ipaddress
,
netmask
=>
$cluster_netmask
,
onboot
=>
'true'
,
}
->
exec
{
"ifup_eth0.
${cluster_vlan}
"
:
command
=>
"ifup eth0.
${cluster_vlan}
"
,
}
->
#
# Ceph cluster network
#
network_config { "eth0.${cluster_vlan}":
#
ensure => 'present',
#
family => 'inet',
#
method => 'static',
#
ipaddress => $cluster_ipaddress,
#
netmask => $cluster_netmask,
#
onboot => 'true',
#
} ->
#
exec { "ifup_eth0.${cluster_vlan}":
#
command => "ifup eth0.${cluster_vlan}",
#
} ->
# Ceph
class
{
'ceph::profile::base'
:
}
->
...
...
@@ -29,28 +29,30 @@ class iaas::role::storage (
class
{
'ceph::keys'
:
}
->
exec
{
"ceph-osd-sgdisk-
${osd_partition}
"
:
# Trick to use a partition for an OSD
command
=>
"sgdisk --change-name='
${osd_partition}
:ceph data' --partition-guid=
${osd_partition}
:
${osd_uuid}
--typecode=
${osd_partition}
:4fbd7e29-9d25-41b8-afd0-062c0ceff05d --
${osd_disk}
&& partprobe"
,
unless
=>
"/bin/true # comment to satisfy puppet syntax requirements
set -ex
ceph-disk list 2> /dev/null | grep ' *
${osd_disk}${osd_partition}
.*ceph data'
"
,
logoutput
=>
true
,
}
->
# exec { "ceph-osd-sgdisk-${osd_partition}": # Trick to use a partition for an OSD
# command => "sgdisk --change-name='${osd_partition}:ceph data' --partition-guid=${osd_partition}:${osd_uuid} --typecode=${osd_partition}:4fbd7e29-9d25-41b8-afd0-062c0ceff05d -- ${osd_disk} && partprobe",
# unless => "/bin/true # comment to satisfy puppet syntax requirements
# set -ex
# ceph-disk list 2> /dev/null | grep ' *${osd_disk}${osd_partition}.*ceph data'
# ",
# logoutput => true,
# } ->
#
class
{
'ceph::profile::osd'
:
}
->
# class { 'ceph::profile::osd': } ->
class
{
'ceph::osds'
:
}
#->
# Openstack pools
ceph::pool
{
'images'
:
pg_num
=>
128
,
}
ceph::pool
{
'volumes'
:
pg_num
=>
128
,
}
ceph::pool
{
'vms'
:
pg_num
=>
128
,
}
ceph::pool
{
'backups'
:
pg_num
=>
128
,
}
#
ceph::pool { 'images':
#
pg_num => 128,
#
}
#
ceph::pool { 'volumes':
#
pg_num => 128,
#
}
#
ceph::pool { 'vms':
#
pg_num => 128,
#
}
#
ceph::pool { 'backups':
#
pg_num => 128,
#
}
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment