From e3de4168e6a96095187b45b5b12bc12a40566873 Mon Sep 17 00:00:00 2001 From: Aravinth Manivannan Date: Sat, 9 Dec 2023 03:43:25 +0530 Subject: [PATCH] feat: publish ansible playbook manual --- content/docs/self-hosting/ansible.md | 50 ++++++++++++++++++++ content/docs/self-hosting/dependencies.md | 2 +- content/docs/self-hosting/docker.md | 2 +- content/docs/self-hosting/getting-started.md | 5 +- 4 files changed, 55 insertions(+), 4 deletions(-) create mode 100644 content/docs/self-hosting/ansible.md diff --git a/content/docs/self-hosting/ansible.md b/content/docs/self-hosting/ansible.md new file mode 100644 index 0000000..490cfbe --- /dev/null +++ b/content/docs/self-hosting/ansible.md @@ -0,0 +1,50 @@ +--- +title: "Using Ansible" +description: "Deploy mCaptcha software using Ansible playbooks" +lead: "Deploy mCaptcha software using Ansible playbooks" +date: 2023-12-03 15:14 +lastmod: 2023-12-09 03:09 +draft: false +images: [] +menu: + docs: + parent: "Self-Hosting" +weight: 533 +toc: true +--- + +Ansible playbooks to install mCaptcha are available [here](https://git.batsense.net/mCaptcha/iac). + +## Instructions + +### Installation + +1. Clone the repository: + +```bash +git clone https://git.batsense.net/mCaptcha/iac && cd iac +``` + +2. Create inventory file. You should have SSH access to the remote + machine, and the user must have `sudo` privileges. Example inventory + file: + + ```ini + [mcaptcha_hosts] + "mcaptcha_hosts" + ansible_host= ansible_user= + ``` + + It is important that the group name be `mcaptcha_hosts`. + +3. Configure installation by editing [ansible/vars/mcaptcha/vars.yml](https://git.batsense.net/mCaptcha/iac/src/branch/master/ansible/vars/mcaptcha/vars.yml). Most parameters have defaults, and the required parameters are annotated. +4. Run playbook: + +```bash + ansible-playbook -i path/to/inventory-file -f 10 ./ansible/mcaptcha.yml +``` + +### Update + +1. Pull changes from Git repository +2. Rerun playbook diff --git a/content/docs/self-hosting/dependencies.md b/content/docs/self-hosting/dependencies.md index a600cbb..2ea57b3 100644 --- a/content/docs/self-hosting/dependencies.md +++ b/content/docs/self-hosting/dependencies.md @@ -11,7 +11,7 @@ images: [] menu: docs: parent: "Self-Hosting" -weight: 534 +weight: 535 toc: true --- diff --git a/content/docs/self-hosting/docker.md b/content/docs/self-hosting/docker.md index bfbc648..a21845f 100644 --- a/content/docs/self-hosting/docker.md +++ b/content/docs/self-hosting/docker.md @@ -8,7 +8,7 @@ images: [] menu: docs: parent: "Self-Hosting" -weight: 533 +weight: 534 toc: true --- diff --git a/content/docs/self-hosting/getting-started.md b/content/docs/self-hosting/getting-started.md index 1a9f2af..f5a4b1b 100644 --- a/content/docs/self-hosting/getting-started.md +++ b/content/docs/self-hosting/getting-started.md @@ -17,5 +17,6 @@ toc: true There are two main ways to self-host mCaptcha: -1. [Bare metal](./bare-metal) -2. [With Docker](./docker) +1. [Bare metal](../bare-metal) +2. [With Docker](../docker) +2. [With Ansible](../ansible)