{"id":15348223,"url":"https://github.com/ironcore864/ceph-ansible","last_synced_at":"2025-10-27T19:15:03.889Z","repository":{"id":73865836,"uuid":"145404115","full_name":"IronCore864/ceph-ansible","owner":"IronCore864","description":null,"archived":false,"fork":false,"pushed_at":"2021-03-15T16:05:50.000Z","size":9,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-01T18:44:32.425Z","etag":null,"topics":["ansible","ceph","configuration-management","devops","storage"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IronCore864.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-20T10:41:35.000Z","updated_at":"2021-03-15T16:05:53.000Z","dependencies_parsed_at":"2023-09-21T10:03:18.198Z","dependency_job_id":null,"html_url":"https://github.com/IronCore864/ceph-ansible","commit_stats":{"total_commits":2,"total_committers":1,"mean_commits":2.0,"dds":0.0,"last_synced_commit":"ffd89ad04cee1ce569cfe2ea9a64c32d53018981"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IronCore864%2Fceph-ansible","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IronCore864%2Fceph-ansible/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IronCore864%2Fceph-ansible/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IronCore864%2Fceph-ansible/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IronCore864","download_url":"https://codeload.github.com/IronCore864/ceph-ansible/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245864738,"owners_count":20685094,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ceph","configuration-management","devops","storage"],"created_at":"2024-10-01T11:45:26.636Z","updated_at":"2025-10-27T19:14:58.840Z","avatar_url":"https://github.com/IronCore864.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# What It Is\n\nInstalls a Ceph cluster with ansible, including admin and client nodes.\n\nFor development/local test usage only; for production, needs to be fine-tuned.\n\n# Dependencies\n\n- Ansible\n- Vagrant\n- Virtualbox\n\n# Deploy\n\n```\ngit clone git@github.com:KI-labs/ceph-ansible.git\ncd ceph-ansible\nvagrant up\nansible-playbook -i inventories/local preflight.yml\nansible-playbook -i inventories/local storage_cluster.yml\nansible-playbook -i inventories/local client.yml\n```\n\nNotes:\n\n1. The `vagrant up` will create 4 VMs so it's slow, be patient, and there is a chance that your laptop would crush depending on the hardware (8G mem here and I crashed twice) :)\n\n2. The first playbook \"preflight.yml\" installs ceph-deploy, manages dependency packages, and prepare SSH cert\n\n3. The second playbook \"storage_cluster.yml\" creates the storage cluster and installs two monitors and two managers\n\n4. The last playbook \"client.yml\" creates an rbd and mount it, as mentioned in the next section of this doc\n\n# Local ENV\n\nAlso a local environment by vagrant/virtualbox is included. Detailed info:\n\n- Ubuntu 18.04 LTS\n- 1 admin node to do ceph-deploy, IP 10.2.2.2\n- 2 node, 10G disk each, node1 IP: 10.2.2.3, node2 IP: 10.2.2.4\n- 1 client node for testing, IP 10.2.2.5\n- a rbd pool named \"rbd\" is initialized\n- a 4096MB rbd named \"foo\" is created `/dev/rbd/rbd/foo` and mounted to `/mnt/ceph-block-device`\n\n# Test\n\n```\nvagrant ssh client\ncd /mnt/ceph-block-device\necho \"Hello world!\" \u003e hello.txt\ncat hello.txt\n```\n\n# Clean Cluster and Retry\n\nIf it fails in the storage cluster playbook and you want to retry, do the following:\n\n```\nvagrant ssh admin\ncd my-cluster\nceph-deploy purge node1 node2\nceph-deploy purgedata node1 node2\nceph-deploy forgetkeys\nrm ceph.*\ncd ..\nrm -rf .cephdeploy.conf\nrm -rf .cache\nexit\n```\n\nIf OSDs are already created, you need to delete it in the nodes too:\n\n```\nvagrant ssh node1 [and node2 too]\nvgdisplay\nvgremove xxx\nexit\n```\n\nIf it fails at client playbook, you want to remove the rbd and umount the mounted disk:\n\n```\nvagrant ssh client\nsudo rbd remove foo\nsudo umount -l /mnt/ceph-block-device\nexit\n```\n\nThen replay.\n\nIf this is too much information, just:\n\n```\nvagrant destroy\n```\n\nthen start over again. It takes time so get a coffee in the meantime :)\n\n# Default Values\n\nDefault values for the local ENV see `inventories/local/group_vars/*`.\n\n# Ansible Structure\n\nFollows https://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#alternative-directory-layout\n\nNot sure if this is better than the first layout which is:\nhttps://docs.ansible.com/ansible/latest/user_guide/playbooks_best_practices.html#directory-layout\n\n# Manual Setup\n\nIf you prefer manual setup but the official doc is too long for you, here are the short versions:\n\n```\nceph-preflight.md\nceph-storage-cluster.md\nceph-block.md\n```\n\n# Todo\n\n- Steps for check points are omitted but left in the comment, need to be implemented\n- Refactor for better structure\n- Add ansible vault for private key\n- etc\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fironcore864%2Fceph-ansible","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fironcore864%2Fceph-ansible","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fironcore864%2Fceph-ansible/lists"}