-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: I73dc3439d42c8e108b4f22a0acec7a9166192f4b
- Loading branch information
Showing
21 changed files
with
442 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,3 +51,5 @@ radosgw: | |
user_shards: 1 | ||
static_website: false | ||
dns_s3website_name: your.subdomain.tld | ||
|
||
restapi_port: 5000 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
backend/common/decapod_common/playbooks/files/ceph-rest-api.service
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
[Unit] | ||
Description=Ceph Rest Api | ||
After=network-online.target local-fs.target time-sync.target | ||
Wants=network-online.target local-fs.target time-sync.target | ||
PartOf=ceph.target | ||
|
||
[Service] | ||
LimitNOFILE=1048576 | ||
LimitNPROC=1048576 | ||
EnvironmentFile=-/etc/default/ceph | ||
ExecStart=/usr/bin/ceph-rest-api | ||
PrivateDevices=yes | ||
ProtectHome=true | ||
ProtectSystem=full | ||
PrivateTmp=true | ||
TasksMax=infinity | ||
Restart=on-failure | ||
StartLimitInterval=30s | ||
StartLimitBurst=5 | ||
|
||
[Install] | ||
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
backend/common/decapod_common/playbooks/plays/deploy_restapi.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
--- | ||
# Copyright (c) 2017 Mirantis Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
# implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
- include: "{{ decapod_common_playbooks }}/plays/add_ceph_ansible_role.yaml" | ||
|
||
- hosts: restapis | ||
become: true | ||
roles: | ||
- ceph-restapi | ||
|
||
- hosts: restapis | ||
become: true | ||
tasks: | ||
- name: Create dependencied directory for ceph-target | ||
file: | ||
path: /etc/systemd/system/ceph.target.wants | ||
state: directory | ||
|
||
- name: Upload service file | ||
copy: | ||
src: "{{ decapod_path_files }}/ceph-rest-api.service" | ||
dest: /lib/systemd/system/ceph-rest-api.service | ||
|
||
- name: Add rest-api to ceph-target.wants | ||
file: | ||
src: /lib/systemd/system/ceph-rest-api.service | ||
dest: /etc/systemd/system/ceph.target.wants/ceph-rest-api.service | ||
state: link | ||
|
||
- name: Enable ceph-rest-api target | ||
systemd: | ||
daemon_reload: yes | ||
enabled: yes | ||
name: ceph-rest-api.service | ||
|
||
- include: "{{ decapod_common_playbooks }}/tasks/restart_rest_api.yaml" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 102 additions & 0 deletions
102
docs/source/playbook-plugins/add-restapi/example-config.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
.. _plugin_add_restapi_example_config: | ||
|
||
===================== | ||
Configuration example | ||
===================== | ||
|
||
The following is an example of the *Add Ceph REST API host* plugin | ||
configuration: | ||
|
||
.. code-block:: json | ||
{ | ||
"global_vars": { | ||
"ceph_restapi_port": 5000, | ||
"ceph_stable": true, | ||
"ceph_stable_distro_source": "jewel-xenial", | ||
"ceph_stable_release": "jewel", | ||
"ceph_stable_release_uca": "jewel-xenial", | ||
"ceph_stable_repo": "http://mirror.fuel-infra.org/decapod/ceph/jewel-xenial", | ||
"ceph_stable_repo_key": "AF94F6A6A254F5F0", | ||
"ceph_stable_repo_keyserver": "hkp://keyserver.ubuntu.com:80", | ||
"ceph_version_verify": true, | ||
"ceph_version_verify_packagename": "ceph-common", | ||
"cluster": "ceph", | ||
"cluster_network": "10.0.0.0/24", | ||
"copy_admin_key": true, | ||
"dmcrypt_dedicated_journal": false, | ||
"dmcrypt_journal_collocation": false, | ||
"fsid": "84965b5f-ce7d-4c88-a7ea-1b9b82c15d4e", | ||
"journal_collocation": true, | ||
"journal_size": 512, | ||
"max_open_files": 131072, | ||
"nfs_file_gw": false, | ||
"nfs_obj_gw": false, | ||
"os_tuning_params": [ | ||
{ | ||
"name": "fs.file-max", | ||
"value": 26234859 | ||
}, | ||
{ | ||
"name": "kernel.pid_max", | ||
"value": 4194303 | ||
} | ||
], | ||
"public_network": "10.0.0.0/24", | ||
"radosgw_civetweb_num_threads": 50, | ||
"radosgw_civetweb_port": 8080, | ||
"radosgw_dns_s3website_name": "your.subdomain.tld", | ||
"radosgw_static_website": false, | ||
"radosgw_usage_log": false, | ||
"radosgw_usage_log_flush_threshold": 1024, | ||
"radosgw_usage_log_tick_interval": 30, | ||
"radosgw_usage_max_shards": 32, | ||
"radosgw_usage_max_user_shards": 1, | ||
"raw_multi_journal": false | ||
}, | ||
"inventory": { | ||
"_meta": { | ||
"hostvars": { | ||
"10.0.0.20": { | ||
"ansible_user": "ansible", | ||
"devices": [ | ||
"/dev/sda", | ||
"/dev/sdb", | ||
"/dev/sdc" | ||
], | ||
"monitor_address": "10.0.0.20" | ||
}, | ||
"10.0.0.21": { | ||
"ansible_user": "ansible", | ||
"devices": [ | ||
"/dev/sda", | ||
"/dev/sdb", | ||
"/dev/sdc" | ||
], | ||
"monitor_address": "10.0.0.21" | ||
}, | ||
"10.0.0.22": { | ||
"ansible_user": "ansible", | ||
"devices": [ | ||
"/dev/sda", | ||
"/dev/sdb", | ||
"/dev/sdc" | ||
], | ||
"monitor_address": "10.0.0.22" | ||
} | ||
} | ||
}, | ||
"already_deployed": [ | ||
"10.0.0.21", | ||
"10.0.0.20", | ||
"10.0.0.22" | ||
], | ||
"mons": [ | ||
"10.0.0.20", | ||
"10.0.0.21" | ||
], | ||
"restapis": [ | ||
"10.0.0.22" | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
.. _plugin_add_restapi_overview: | ||
|
||
======== | ||
Overview | ||
======== | ||
|
||
The following table shows the general information about the *Add Ceph | ||
REST API Gateway host* plugin: | ||
|
||
==================== ====================== | ||
Property Value | ||
==================== ====================== | ||
ID add_restapi | ||
Name Add Ceph REST API host | ||
Required Server List Yes | ||
==================== ====================== | ||
|
||
Plugin is tightly coupled with ``ceph-ansible`` versions. The following | ||
table shows the mapping between the plugin version and the corresponding | ||
version of ``ceph-ansible``. | ||
|
||
============== ============================================================ | ||
Plugin version ``ceph-ansible`` version | ||
============== ============================================================ | ||
1.1 `v2.1.9 <https://github.com/ceph/ceph-ansible/tree/v2.1.9>`_ | ||
============== ============================================================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.. _plugins_add_restapi: | ||
|
||
====================== | ||
Add Ceph REST API host | ||
====================== | ||
|
||
The *Add Ceph REST API host* playbook plugin allows you to add a | ||
new host with REST API to the cluster. | ||
|
||
The section contains the following topics: | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
add-restapi/overview.rst | ||
add-restapi/example-config.rst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
include decapod_plugin_playbook_add_restapi/config.yaml | ||
include decapod_plugin_playbook_add_restapi/playbook.yaml |
Empty file.
15 changes: 15 additions & 0 deletions
15
plugins/playbook/add_restapi/decapod_plugin_playbook_add_restapi/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
# Copyright (c) 2016 Mirantis Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
# implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. |
18 changes: 18 additions & 0 deletions
18
plugins/playbook/add_restapi/decapod_plugin_playbook_add_restapi/playbook.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
# Copyright (c) 2016 Mirantis Inc. | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or | ||
# implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
|
||
- include: "{{ decapod_common_playbooks }}/plays/deploy_restapi.yaml" |
Oops, something went wrong.