Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
Kolla Ansible
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
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
Very Demiurge Very Mindful
Kolla Ansible
Commits
8f3b61ce
Commit
8f3b61ce
authored
2 years ago
by
Zuul
Committed by
Gerrit Code Review
2 years ago
Browse files
Options
Downloads
Plain Diff
Merge "CI: cephadm: Add osds/pools/users in one run"
parents
22d81060
c922d458
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
roles/cephadm/tasks/main.yml
+7
-37
7 additions, 37 deletions
roles/cephadm/tasks/main.yml
roles/cephadm/templates/commands.sh.j2
+23
-0
23 additions, 0 deletions
roles/cephadm/templates/commands.sh.j2
tests/run.yml
+1
-1
1 addition, 1 deletion
tests/run.yml
with
31 additions
and
38 deletions
roles/cephadm/tasks/main.yml
+
7
−
37
View file @
8f3b61ce
...
...
@@ -65,43 +65,18 @@
dest
:
"
/var/run/ceph/{{
ceph_fsid
}}/cluster.yml"
become
:
True
-
name
:
Check Ceph Orchestrator state
command
:
cmd
:
>
cephadm shell --
ceph orch status --detail
become
:
True
-
name
:
Apply cluster spec
command
:
cmd
:
>
cephadm shell --
ceph orch apply -i /var/run/ceph/cluster.yml
-
name
:
Template out command spec
template
:
src
:
templates/commands.sh.j2
dest
:
"
/var/run/ceph/{{
ceph_fsid
}}/commands.sh"
become
:
True
-
name
:
Add os
ds
-
name
:
Run comman
ds
command
:
cmd
:
>
cephadm shell --
ceph orch daemon add osd {{ item }}
bash /var/run/ceph/commands.sh
become
:
True
loop
:
"
{{
cephadm_ceph_osd_devices
}}"
-
name
:
Create and initialise pools for OpenStack services
command
:
cmd
:
>
cephadm shell --
ceph osd pool create {{ item }}
with_items
:
"
{{
cephadm_ceph_pools
}}"
become
:
true
-
name
:
Create users for OpenStack services
command
:
cmd
:
>
cephadm shell --
ceph auth get-or-create {{ item }}
become
:
true
with_items
:
"
{{
cephadm_ceph_users
}}"
# TODO(mnasiadka): Fix merge_configs to support tabs
-
name
:
Generate ceph.conf without tabs
...
...
@@ -112,10 +87,5 @@
mon_host = {% for host in groups['all'] %} {{ hostvars[host]['ansible_'+api_interface_name].ipv4.address }} {% if not loop.last %},{% endif %} {% endfor %}
copy
:
content
:
"
{{
ceph_conf_fixed
}}"
dest
:
/etc/ceph/ceph.conf
become
:
True
-
name
:
Check ceph health
command
:
cmd
:
cephadm shell -- ceph health detail
dest
:
"
/etc/ceph/ceph.conf.fixed"
become
:
True
This diff is collapsed.
Click to expand it.
roles/cephadm/templates/commands.sh.j2
0 → 100644
+
23
−
0
View file @
8f3b61ce
# Status
ceph orch status --detail
# Apply cluster spec
ceph orch apply -i /var/run/ceph/cluster.yml
# OSDs
{% for osd in cephadm_ceph_osd_devices %}
ceph orch daemon add osd {{ osd }}
{% endfor %}
# Pools
{% for pool in cephadm_ceph_pools %}
ceph osd pool create {{ pool }}
{% endfor %}
# Users
{% for user in cephadm_ceph_users %}
ceph auth get-or-create {{ user }}
{% endfor %}
# Health
ceph health detail
This diff is collapsed.
Click to expand it.
tests/run.yml
+
1
−
1
View file @
8f3b61ce
...
...
@@ -361,7 +361,7 @@
-
name
:
copy ceph.conf to enabled services
copy
:
remote_src
:
True
src
:
"
/etc/ceph/ceph.conf"
src
:
"
/etc/ceph/ceph.conf
.fixed
"
dest
:
"
/etc/kolla/config/{{
item.name
}}/ceph.conf"
with_items
:
"
{{
cephadm_kolla_ceph_services
}}"
...
...
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