{"id":16876685,"url":"https://github.com/batrick/ceph-linode","last_synced_at":"2025-03-23T16:32:57.362Z","repository":{"id":18516803,"uuid":"84504177","full_name":"batrick/ceph-linode","owner":"batrick","description":"Launch Ceph using the Linode VPS provider","archived":false,"fork":false,"pushed_at":"2024-04-04T22:01:14.000Z","size":344,"stargazers_count":13,"open_issues_count":8,"forks_count":10,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-03-18T22:07:23.708Z","etag":null,"topics":["ceph","cloud","linode","vps"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/batrick.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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":"2017-03-10T01:08:00.000Z","updated_at":"2025-01-01T21:05:14.000Z","dependencies_parsed_at":"2024-10-28T21:48:56.073Z","dependency_job_id":null,"html_url":"https://github.com/batrick/ceph-linode","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batrick%2Fceph-linode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batrick%2Fceph-linode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batrick%2Fceph-linode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/batrick%2Fceph-linode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/batrick","download_url":"https://codeload.github.com/batrick/ceph-linode/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245131334,"owners_count":20565803,"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":["ceph","cloud","linode","vps"],"created_at":"2024-10-13T15:40:15.688Z","updated_at":"2025-03-23T16:32:57.099Z","avatar_url":"https://github.com/batrick.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Repository of scripts to deploy Ceph in Linode\n\nThe repository has a collection of scripts that automate the deployment of Ceph\nwithin Linode. The primary use-case for this work is to allow rapid testing of\nCeph at scale.\n\n## Why Linode?\n\nLinode is a popular virtual private server (VPS) provider, but one of several. The primary reasons for selecting Linode were\n\n* **Price.** Linode is generally very affordable compared to competition.\n\n* **SSD local storage at no extra cost.** Obviously, testing Ceph requires the use of OSDs that require local devices. The SSDs on Linode are enterprise quality and well provisioned.\n\n* **Friendly API.** Most cloud providers have an API today for deployment. At the time I first worked on this project, there were not many that did.\n\nWant to add another cloud provider? I'm all-ears. Please talk to me by email\n(see commit history for email address).\n\n## Repository Organization\n\nThe repository has a number of utilities roughly organized as:\n\n* `linode.py`: script to rapidly create/configure/nuke/destroy Linodes.\n\n* `cluster.json`: the description of the cluster to deploy.\n\n* `pre-config.yml`: an ansible playbook to pre-configure Linodes with useful\n   packages or utilities prior to installing Ceph.\n\n* `cephadm.yml`: an ansible playbook to install Ceph using cephadm.\n\n* `playbooks/`: ansible playbooks for running serial tests and collecting test\n  artifacts and performance data. Note that most of these playbooks were\n  written for testing CephFS.\n\n* `scripts/` and `misc/`: miscellaneous scripts. Notably, workflow management\n  scripts for testing CephFS are located here.\n\n* `graphing/`: graphing scripts using gnuplot and some ImageMagik utilities.\n  These may run on the artifacts produced by the ansible playbooks in\n  `playbooks`.\n\n\n## How-to Get Started:\n\n\u003e :fire: **Note** :fire: For non-toy deployments, it's recommended to use a\n\u003e dedicated linode for running ansible. This reduces latency of\n\u003e operations, internet hiccups, allows you to allocate enough RAM for\n\u003e memory-hungry ansible, and rapidly download test artifacts for archival.\n\u003e Generally, the more RAM/cores the better. **Also**: make sure to [enable a\n\u003e private IP\n\u003e address](https://www.linode.com/docs/platform/manager/remote-access/#adding-private-ip-addresses)\n\u003e on the ansible linode otherwise ansible will not be able to communicate with\n\u003e the ceph cluster.\n\n* Setup a Linode account and [get an API key](https://www.linode.com/docs/platform/api/api-key).\n\n  Put the key in `~/.linode.key`:\n\n  ```bash\n  cat \u003e ~/.linode.key\n  ABCFejfASFG...\n  ^D\n  ```\n\n* Setup an ssh key if not already done:\n\n  ```bash\n  ssh-keygen\n  ```\n\n* Install necessary packages:\n\n  **CentOS Stream**:\n\n    ```bash\n    dnf install epel-release\n    dnf update\n    dnf install git ansible python3-pip python3-netaddr jq rsync wget htop\n    pip3 install linode_api4 notario\n    ```\n\n  **Fedora**:\n\n    ```bash\n    dnf install git ansible python3-notario python3-pip python3-netaddr jq rsync htop wget\n    pip3 install linode_api4\n    ```\n\n  **Arch Linux**:\n\n    ```bash\n    pacman -Syu git ansible python3-netaddr python3-pip jq rsync htop wget\n    pip3 install notario linode_api4\n    ```\n\n* Clone ceph-linode:\n\n  ```bash\n  git clone https://github.com/batrick/ceph-linode.git\n  ```\n\n* Copy `cluster.json.sample` to `cluster.json` and modify it to have the\n  desired count and Linode plan for each daemon type. If you're planning to do\n  testing with CephFS, it is recommend to have 3+ MDS, 2+ clients, and 8+ OSDs.\n  The ansible playbook `playbooks/cephfs-setup.yml` will configure 4 OSDs to be\n  dedicated for the metadata pool. Keep in mind that the use of containerized\n  Ceph daemons requires more memory than bare-metal installations. It is\n  recommended to use at least 4GB for all daemons. OSDs require at least 8GB.\n\n\u003e :fire: **Note** :fire: The OSD memory target is always at least 4GB, otherwise set appropriately and automatically based on the available memory on the OSD. If you use smaller OSDs (4GB or smaller), then you must configure the memory target manually via changing the Ceph config.\n\n* Configure which Ceph version you want to deploy in `settings.yml`.\n\n* Start using:\n\n    ```bash\n    python3 linode.py launch\n    source ansible-env.bash\n    do_playbook cephadm.yml\n    ```\n\n## SSH to a particular machine\n\n```bash\n./ansible-ssh mon-000\n```\n\nOr any named node in the `linodes` JSON file.\n\n## Execute ansible commands against the cluster\n\n```bash\nsource ansible-env.bash\nans -m shell -a 'echo im an osd' osds\nans -m shell -a 'echo im an mds' mdss\nans -m shell -a 'echo im a client' clients\n...\n```\n\nYou can also easily execute playbooks:\n\n```bash\nsource ansible-env.bash\ndo_playbook foo.yml\n```\n\n## How-to nuke and repave your cluster:\n\nSometimes you want to start over from a clean slate. Destroying the cluster can\nincur unnecessary costs though as Linodes are billed by the hour, no matter how\nlittle of an hour you use. It is often cheaper to *nuke* the Linodes by\ndeleting all configurations, destroying all disks, etc.\n\nYou can manually nuke the cluster if you want using:\n\n```bash\npython3 linode.py nuke\n```\n\n## How-to destroy your cluster:\n\n```bash\npython3 linode.py destroy\n```\n\nThe script works by destroying all the Linodes that belong to the group named\nin the `LINODE_GROUP` file, created by `linode.py`.\n\nThis deletes EVERYTHING and stops any further billing.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatrick%2Fceph-linode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbatrick%2Fceph-linode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbatrick%2Fceph-linode/lists"}