Debian Codegraph @

ansible_collections/ibm/storage_virtualize/playbooks/cluster_config_replication/README.md

raw symbols SCIP
1 # IBM FlashSystem Configuration Replication using Ansible
2
3 This suite of playbooks helps users to replicate an existing FlashSystem's configuration onto a new FlashSystem.
4
5 ## Table of Contents
6
7 - [Objective](#objective)
8 - [Prerequisites](#prerequisites)
9 - [Tasks Performed](#tasks-performed)
10 - [Playbooks Overview](#playbooks-overview)
11 - [Variables](#variables)
12
13 ## Objective
14
15 Replication of system configuration from one FlashSystem to another FlashSystem.
16
17 ## Prerequisites
18
19 - IBM Storage Virtualize ansible collection v2.2.0 or above must be installed.
20 - Python library jmespath must be installed.
21
22 ## Tasks Performed
23
24 - Set System name
25 - Set up NTP server
26 - Set up Timezone
27 - Set up DNS server
28 - Create Ownership groups
29 - Create Usergroups
30 - Create Users
31
32 ## Playbooks Overview
33
34 ### 1. extract_src_cluster_config.yml:
35 - This playbook is entry point, it takes `src_cluster_vars` file as an input and gathers cluster configuration and writes it onto `replication_vars` file in a format that can be consumed by `replicate_config_on_target_cluster.yml` playbook for replication.
36 - To run this playbook:
37 ```
38 ansible-playbook extract_src_cluster_config.yml
39 ```
40
41 ### 2. replicate_config_on_target_cluster.yml:
42 - This playbook should be run after running `extract_src_cluster_config.yml` playbook.
43 - This playbook takes `replication_vars` file generated by `extract_src_cluster_config.yml` playbook as an input and configures target system accordingly.
44 > [!Note]
45 > If `target_cluster_vars` file has been encrypted, use following command to run replicate_config_on_target_cluster.yml playbook-
46 > ```
47 > ansible-playbook replicate_config_on_target_cluster.yml --ask-vault-pass
48 > ```
49 > Enter password used in previous step to encrypt target_cluster_vars file
50
51 > [!Note]
52 > This playbook sets default password for users created on target system, user will be asked to change this default password on next login.
53
54 > [!IMPORTANT]
55 > If superuser is also being replicated, use the default password for next login.
56
57 **Usage:**
58 1. Replicate from one system to another exactly:
59 - Set source cluster details in src_cluster_vars
60 - Run playbook extract_src_cluster_config.yml
61 - Set target cluster details in target_cluster_vars
62 - Run playbook replicate_config_on_target_cluster.yml
63
64 2. Replicate from one system to another with few modifications:
65 - Set source cluster details in src_cluster_vars
66 - Run playbook extract_src_cluster_config.yml
67 - Edit config fields to be modified in replication_vars file
68 - Set target cluster details in target_cluster_vars
69 - Run playbook replicate_config_on_target_cluster.yml
70
71 3. Set-up system by customising config:
72 - Set config fields in replication_vars file
73 - Set target cluster details in target_cluster_vars
74 - Run playbook replicate_config_on_target_cluster.yml
75
76 ## Variables
77
78 ### 1. vars/src_cluster_vars:
79 - This file stores source cluster credentials, defines settable_fields required to extract from source cluster for specified entity, and formats raw extracted data to generate replication_vars file in desired format which will be provided as an input to `replicate_config_on_target_cluster.yml` playbook.
80 - Fields to be set by user:
81 ```
82 cluster_ip: Cluster IP source system
83 cluster_username: Username of source system
84 cluster_password: Password of source system
85 ```
86
87 ### 2. vars/target_cluster_vars:
88 - This file stores destination cluster credentials, which can be encrypted.
89 - Fields to be set by user:
90 ```
91 cluster_ip: Cluster IP target system
92 cluster_username: Username of target system
93 cluster_password: Password of target system
94 user_default_password: Default password to be set for newly created users
95 ```
96
97 > [!IMPORTANT]
98 > `user_default_password` value should be according to FlashSystem password policy
99 >
100 > To encrypt cluster_vars file:
101 > ```
102 > ansible-vault encrypt target_cluster_vars
103 > ```
104 > This command will prompt to set a password. Note the password entered at prompt, as it will be required while running playbooks
105 >
106 > To open/ edit this file later:
107 > ```
108 > ansible-vault edit target_cluster_vars
109 > ```
110
111 ## Authors
112
113 - Ajinkya Nanavati ([email protected])
114 - Devendra Mahajan ([email protected])
115 - Mohit Chitlange ([email protected])
116 - Vrinda Dhakad ([email protected])