-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
14 changed files
with
149 additions
and
6 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
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,71 @@ | ||
--- | ||
|
||
# Setup GlusterFS as local mount on each node | ||
# Install glusterfs-client | ||
- name: Add new apt source | ||
become: yes | ||
apt_repository: | ||
repo: ppa:gluster/glusterfs-{{ glusterd_version }} | ||
filename: gluster.list | ||
state: present | ||
when: ansible_os_family == 'Debian' | ||
|
||
# Install glusterfs-clients | ||
- name: Add an RPM signing key, uses whichever key is at the URL | ||
become: yes | ||
rpm_key: | ||
key: http://download.gluster.org/pub/gluster/glusterfs/{{ glusterd_version }}/rsa.pub | ||
state: present | ||
when: ansible_os_family == 'RedHat' | ||
|
||
- name: Add new yum source | ||
yum_repository: | ||
name: glusterfs | ||
description: glusterfs YUM repo | ||
baseurl: https://download.gluster.org/pub/gluster/glusterfs/{{ glusterd_version }}/LATEST/RHEL/glusterfs-rhel8.repo | ||
state: present | ||
when: ansible_os_family == 'RedHat' | ||
|
||
- name: Update repositories cache and install "glusterfs-client" and other required package | ||
become: yes | ||
package: | ||
name: "{{item}}" | ||
update_cache: yes | ||
state: present | ||
loop: | ||
- "glusterfs-client" | ||
|
||
|
||
# Check if GlusterFS is already mounted, if yes, unmount it | ||
- name: Unmount GlusterFS if already mounted | ||
become: yes | ||
mount: | ||
path: /root/hlft-store | ||
state: unmounted | ||
|
||
# Remove the local mount point folder, if it exists, so that we get the right permissions everytime | ||
- name: Remove Mount Point | ||
become: yes | ||
file: | ||
path: /root/hlft-store | ||
state: absent | ||
|
||
# Create the local mount point on each node for S3FS mount | ||
- name: Create Mount Point | ||
become: yes | ||
become_user: "root" | ||
file: | ||
path: /root/hlft-store | ||
state: directory | ||
owner: "root" | ||
group: "root" | ||
mode: 0750 | ||
|
||
# Mount the volume on /root/myfiles | ||
- name: Mount Gluster volume | ||
become: yes | ||
mount: | ||
path: /root/hlft-store | ||
src: "{{ gluster_cluster_host0 }}:/{{gluster_cluster_volume}}" | ||
fstype: glusterfs | ||
state: mounted |
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
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,59 @@ | ||
# Semaphore config instructions | ||
## Pre-requisites: | ||
- Ensure that **ansible-semaphore is set up**. Please see [https://github.com/ansible-semaphore/semaphore] for further details on setting up ansible-semaphore. | ||
Once ansible-semaphore is installed, you can verify it by accessing its url. | ||
|
||
## ansible-semaphore Instructions: | ||
|
||
- **1) Create Access keys** - Click "Key Store" from the side-menu and click "create key" on top right corner | ||
- **Github ssh key** - ssh key of the github repository to be used | ||
- **Remote Machines ssh keys** - ssh key to access the resource machines of the cloud provider | ||
|
||
![alt text](../../images/semaphore_1_create_key.png) | ||
|
||
- **2) Import github repository** - Click "Playbook Repositories" from the side-menu and click "create repository" on top right corner | ||
- Import the **fabric_as_code** using the **Github ssh key** created in step 1 | ||
|
||
![alt text](../../images/semaphore_2_import_repository.png) | ||
|
||
- **3) Update Inventory** - Click "Inventory" from the side-menu and click "create inventory" on top right corner | ||
- Create one inventory for **Remote machines** using the **Remote Machines ssh keys** created in step 1 | ||
|
||
**Remote machine inventory example :** | ||
|
||
![alt text](../../images/semaphore_3_create_remote_inventory.png) | ||
|
||
|
||
- **Edit Remote machine inventory -** click "edit inventory" on the **remote machine's inventory** and update the ip addresses of the machines. | ||
|
||
![alt text](../../images/semaphore_3_edit_remote_machine_inventory.png) | ||
|
||
- **4) Create Task Templates** - Click "Task Templates" from the side-menu and click "new template" on top right corner | ||
- Create 11 Task Templates for the 11 playbooks as shown in the figure below: | ||
|
||
![alt text](../../images/semaphore_4_task_list.png) | ||
|
||
|
||
- **Extra CLI arugments for 013.mount_fs.yml task -** ["-u","root","--extra-vars","gluster_cluster_host0='164.90.198.91' gluster_cluster_volume='gfs0'"] | ||
|
||
- Replace "root" as per the username having root access in the remote machines. | ||
- Replace "164.90.198.91" with one of the glusterfs machine's ip address. | ||
|
||
![alt text](../../images/semaphore_4_mountfs_task.png) | ||
|
||
- **Extra CLI arugments for all other tasks -** ["-u","root"] (Replace "root" as per the username having root access in the remote machines) | ||
|
||
![alt text](../../images/semaphore_4_all_other_tasks.png) | ||
|
||
- **5) Run Tasks** | ||
- Run all of the 11 Tasks one by one. | ||
- Click "run" green button on the right corner of the each tasks | ||
- Click "run" green button on the bottom right corner of the "create task" pop up | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|