├── CHANGELOG.adoc ├── LICENSE ├── README.md ├── config ├── CF │ ├── 90_no_network.cfg │ ├── ifcfg-eth0 │ └── ifcfg-eth2 ├── RHV │ └── Hosts │ │ └── fake-qemu.conf ├── custom_manifest.json ├── custom_manifest_commands.txt ├── default_SSA_profile.yaml ├── default_SSA_profile_commands.txt ├── hosts ├── manifest.json └── update_manifest.txt ├── doc ├── README.adoc ├── images │ ├── add_vsphere_provider_01.png │ ├── add_vsphere_provider_02.png │ ├── add_vsphere_provider_03.png │ ├── add_vsphere_provider_04.png │ ├── add_vsphere_provider_05.png │ ├── add_vsphere_provider_06.png │ ├── add_vsphere_provider_07.png │ ├── add_vsphere_provider_08.png │ ├── add_vsphere_provider_09.png │ ├── app-ticketmonster-running.png │ ├── architecture_diagram.png │ ├── blueprint.png │ ├── cloudforms-configure_ssa-01.png │ ├── cloudforms-configure_ssa-02.png │ ├── cloudforms-configure_ssa-03.png │ ├── cloudforms-configure_ssa-04.png │ ├── cloudforms-configure_ssa-05.png │ ├── cloudforms-configure_ssa-06.png │ ├── cloudforms-configure_ssa-06b.png │ ├── cloudforms-configure_ssa-07.png │ ├── cloudforms-configure_ssa-08.png │ ├── cloudforms-configure_ssa-09.png │ ├── cloudforms_check_virtualization_provider_01.png │ ├── cloudforms_check_virtualization_provider_02.png │ ├── cloudforms_check_virtualization_provider_03.png │ ├── cloudforms_check_virtualization_provider_04.png │ ├── cloudforms_login.png │ ├── firefox_ssh_tunnel_vcenter.png │ ├── localhost_proxy_config.png │ ├── migration_analytics_WAT_01.png │ ├── migration_analytics_WAT_02.png │ ├── migration_analytics_WAT_03.png │ ├── migration_analytics_WAT_04.png │ ├── migration_analytics_WAT_06.png │ ├── migration_analytics_WAT_07.png │ ├── migration_analytics_WAT_08.png │ ├── migration_analytics_WAT_09.png │ ├── migration_analytics_examination_01.png │ ├── migration_analytics_examination_02.png │ ├── migration_analytics_examination_03.png │ ├── migration_analytics_examination_04.png │ ├── migration_analytics_examination_05.png │ ├── migration_analytics_examination_06.png │ ├── migration_analytics_examination_07.png │ ├── migration_analytics_examination_08.png │ ├── migration_analytics_examination_09.png │ ├── reset_cloudforms_01.png │ ├── reset_cloudforms_02.png │ ├── reset_cloudforms_03.png │ ├── reset_cloudforms_04.png │ ├── ssh_tunnel.png │ ├── ssl_cert_warning.png │ ├── vsphere_checks_01.png │ ├── vsphere_checks_02.png │ ├── vsphere_checks_03.png │ └── vsphere_checks_04.png ├── migration_analytics-appliance_deployment_chapter.adoc ├── migration_analytics-configure_ssa.adoc ├── migration_analytics-enable_menu.adoc ├── migration_analytics-installation_and_user_guide.adoc ├── migration_analytics-lab_guide.adoc ├── migration_analytics-manual_data_extraction.md ├── migration_analytics-port_tunneling.adoc └── migration_analytics-user_chapter.adoc ├── payloads ├── cfme_inventory-20190829-16128-internal_lab_final_format.tar.gz ├── cfme_inventory-20190909-demolab_withSSA.tar.gz ├── cfme_inventory-20190912-demolab_withSSA.tar.gz ├── cfme_inventory-20200204-demolab_SSA_packages.tar.gz ├── cfme_inventory-20200302-demolab_withSSA.tar.gz ├── cfme_inventory20190802-8879-191pxg8_noSSA.tar.gz ├── cfme_inventory20190807-32152-jimd0q_large_dataset_10k_vms.tar.gz ├── cfme_inventory_2020-02-04_sample.json ├── keating-20190926_1304-214.tar.gz ├── keating-payload-20200604_1242-314.tar.gz ├── keating-payload-20200818_1448-155.tar.gz └── payload-generator │ ├── README.md │ ├── hosttemplate1.json │ ├── hosttemplate2.json │ ├── hosttemplate3.json │ ├── hosttemplate4.json │ ├── keating.sh │ └── mastertemplate.json └── playbooks ├── ansible_hosts ├── loops ├── loop_cluster0_vm.yml ├── loop_cluster1_vm.yml ├── loop_db_vm.yml ├── loop_freebsd_vm.yml ├── loop_hana_vm.yml ├── loop_jboss0_vm.yml ├── loop_jboss1_vm.yml ├── loop_lb_vm.yml ├── loop_mssql_vm.yml ├── loop_oracledb_vm.yml ├── loop_tomcat_vm.yml ├── loop_weblogic_vm.yml └── loop_websphere_vm.yml ├── prepare.yml ├── roles ├── chrony │ └── prepare │ │ ├── README.md │ │ ├── defaults │ │ └── main.yml │ │ ├── files │ │ ├── chrony.conf │ │ └── hosts │ │ ├── handlers │ │ └── main.yml │ │ ├── meta │ │ └── main.yml │ │ ├── tasks │ │ └── main.yml │ │ ├── tests │ │ ├── inventory │ │ └── test.yml │ │ └── vars │ │ └── main.yml ├── prepare │ ├── README.md │ ├── defaults │ │ └── main.yml │ ├── files │ │ ├── base_infra_migration.repo │ │ └── hosts │ ├── handlers │ │ └── main.yml │ ├── meta │ │ └── main.yml │ ├── tasks │ │ └── main.yml │ ├── tests │ │ ├── inventory │ │ └── test.yml │ └── vars │ │ └── main.yml └── unconfigure_cf │ ├── README.md │ ├── meta │ └── main.yml │ └── tasks │ └── main.yml ├── start_vms.yml ├── start_vms_vars.yml.example ├── stop_vms.yml └── unconfigure_cf.yml /CHANGELOG.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | 5 | == Migration Analytics 1.0 GA 6 | 7 | :numbered: 8 | 9 | 10 | == Changelog 11 | Changes in the Tranining and Demo environments Migration Analytics 1.0 beta 12 | 13 | * [1.0] 2020-05-07 14 | - Bumped to 1.0 GA 15 | - Updated CloudForms to 5.0.5 16 | 17 | * [0.38] 2020-03-10 18 | - Added files for detection of Insights in RHEL 19 | 20 | * [0.37] 2020-03-03 21 | - Improved CF reset and cleanup 22 | 23 | * [0.36] 2020-03-02 24 | - Fix issue with start_vms 25 | 26 | * [0.35] 2020-03-02 27 | - Exchanged keys for CF. 28 | - Updated local github cloned repo in workstation 29 | 30 | * [0.34] 2020-02-27 31 | - Updated CFME to version 5.11.4.-0 (CF 5.0.4) 32 | 33 | * [0.33] 2020-0r24-17 34 | - Updated SSA data gathered 35 | 36 | * [0.32] 2020-02-13 37 | - Fixed ansible hosts file 38 | 39 | * [0.31] 2020-02-12 40 | - Added ssh keys for `labuser` for Summit 41 | 42 | * [0.30] 2020-02-11 43 | - Clean up unconfigure_cf 44 | - Removing obsolete files in workstation 45 | 46 | * [0.29] 2020-02-04 47 | - Updated manifest 48 | - Updated default profile 49 | 50 | * [0.28] 2020-01-23 51 | - Run SSA on all VMs 52 | 53 | * [0.27] 2020-01-22 54 | - Updated CFME to version 5.11.1.2-1 (eq CF 5.0 GA) 55 | 56 | * [0.26] 2019-09-06 57 | - Clean ups. 58 | - Updated startup and stop sequence to include clustervms 59 | 60 | * [0.25] 2019-09-04 61 | - Added cluster0 and cluster1 CentOS VMs with shared disk and Pacemaker. 62 | 63 | * [0.24] 2019-09-03 64 | - Added stop_vms.yml procedure. 65 | - Added 3 iSCSI targets to storage. 66 | - Added iSCSI datastore to vSphere. 67 | - Added iSCSI RDM to jboss0 and jboss1. 68 | - Added guest tools to FreeBSD. 69 | 70 | * [0.23] 2019-09-02 71 | - Improved CF cleanup procedure. 72 | - Lab guide procedure complete. 73 | 74 | * [0.22] 2019-08-29 75 | - Improvements to autostart procedure. 76 | - Fixes to Windows MSSQL VM. 77 | 78 | * [0.21] 2019-08-29 79 | - Update CF to 5.11.0.22 80 | - Configured SSA and MA menu 81 | - Added more VMs to startup sequence 82 | 83 | * [0.20] 2019-08-28 84 | - Improved start_vms playbooks. 85 | - Added WebSphere VM. 86 | - Moved all VMs to a NFS 4.1 share on the same server. Renamed Datastores. 87 | 88 | * [0.19] 89 | - Added disklib libs to CF. 90 | 91 | * [0.18] 92 | - redeployed weblogic with common paths. 93 | - Updated start_vms script. 94 | 95 | * [0.17] 96 | - Split with IMS. 97 | - Remove RHV and OSP. 98 | - Updated CFME to 5.11.0.19. 99 | - Cleaning exports in storage. 100 | - Removed weblogic (to be redeployed with proper paths) 101 | 102 | * [0.16] 103 | - Recovered last BP save due to OSP fault. 104 | - Imported MSSQL Windows DB. 105 | - Splitting blueprint for MA and IMS. 106 | 107 | * [0.15] 2019-08-16 108 | - Added weblogic. 109 | - Added template for RHEL7. 110 | - Fixes to internal repos 111 | - Rearranged playbooks 112 | 113 | 114 | * [0.14] 2019-08-12 115 | - Started adding weblogic VM. 116 | - Tested adding Ansible playbooks. they require updating CF. 117 | - Updating CF to 5.11.0.18. 118 | - Added DNS interface for network 10.10.0.x. 119 | 120 | * [0.12] 2019-08-08 121 | - Added a conversion_host instance to OSP 122 | - Attached to CFME and installed conversion tools. 123 | 124 | * [0.11] 2019-08-05 125 | - Smart State Analysis profile created. link:doc/migration_analytics-configure_ssa.adoc[Instructions here]. 126 | 127 | * [0.10] 2019-08-02 128 | - Added cleanup for tomcat service. 129 | - Updated CF to 5.11.0.17. 130 | - Added Oracle DB VM. Reconfigured root pass and network. 131 | - Added MSSQL on Linux DB. Reconfigured network. 132 | 133 | * [0.9] 2019-08-01 134 | - Added endpoint for tomcat. 135 | - Changed password policy in vSphere. 136 | - Changed password for admin@vsphere.local. 137 | - Added workstation keys to esx hosts. 138 | - Some minor cleanups. 139 | 140 | * [0.8] - 2019-07-29 141 | - Added OSP provider. 142 | - Reconfigured Tomcat VM. 143 | - Added autostart for VMs in ESXi. 144 | 145 | * [0.7] - 2019-07-23 146 | - Fixed 4.3 issues with CPU. 147 | - Configured conversion host for RHV. 148 | 149 | * [0.6b] 150 | - CF updated to: cfme-5.11.0.15-1 151 | - RHV 4.3 updated. 152 | 153 | * [0.5] 154 | - Added CentOS VM. 155 | - Updated admin@vsphere.local password policy. 156 | 157 | * [0.4] 158 | - Added local accounts to vCenter. 159 | - Updated vCenter. 160 | - Upgraded RHV to 4.3. 161 | - Updated app VMs to RHEL 7.6 162 | 163 | * [0.3] 164 | - Created VM for HANA. 165 | - Added localos users "root" and "admin" to Administrators group 166 | 167 | * [0.2] 168 | - Configured VLANs and and networks in vSphere 169 | 170 | * [0.1] 171 | - Initial instance with vSphere 6.7 172 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright [yyyy] [name of copyright owner] 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Migration Analytics by Red Hat 2 | 3 | This repo will host the documentation for the Traning and Demo environments related to the Red Hat Migration Analytics. 4 | 5 | Please, report issues with documentation and/or lab in the [issues](issues) section of this repo. Feel free to propose updates and changes in the [pull request](pulls) section, preferrably as ansible playbooks and/or ASCII doc files. 6 | 7 | ## Video recording demo 8 | [![Migration Analytics Video](https://img.youtube.com/vi/Wf5BwZNkQiA/0.jpg)](https://www.youtube.com/watch?v=Wf5BwZNkQiA) 9 | 10 | ## Go ahead, get your hands dirty! 11 | 12 | * [Migration Analytics - Lab Guides](doc) 13 | 14 | ## More resources 15 | This effort is part of the Red Hat Migration and Modernization Solutions. 16 | 17 | * Check source code being developed here: http://project-xavier.io 18 | * Migration Analytics Product Page: https://red.ht/migration-analytics 19 | * Migration Analytics Official Documentation: https://access.redhat.com/documentation/en-us/migration_analytics/ 20 | * Demo and Training environment [CHANGELOG](CHANGELOG.adoc) 21 | * Frequently Asked Questions: https://www.redhat.com/en/resources/migration-analytics-service-faq 22 | * Mailing list: migrate at redhat dot com 23 | -------------------------------------------------------------------------------- /config/CF/90_no_network.cfg: -------------------------------------------------------------------------------- 1 | # /etc/cloud/cloud.cfg.d/90_no_network.cfg 2 | # Disable cloud-init network config. Misbehaves with DHCP 3 | network: { config: disabled } 4 | 5 | -------------------------------------------------------------------------------- /config/CF/ifcfg-eth0: -------------------------------------------------------------------------------- 1 | # Created by cloud-init on instance boot automatically, do not edit. 2 | # 3 | BOOTPROTO=dhcp 4 | DEVICE=eth0 5 | HWADDR=2c:c2:60:72:b7:cd 6 | ONBOOT=yes 7 | TYPE=Ethernet 8 | USERCTL=no 9 | -------------------------------------------------------------------------------- /config/CF/ifcfg-eth2: -------------------------------------------------------------------------------- 1 | BOOTPROTO=NONE 2 | DEVICE=eth2 3 | HWADDR=2c:c2:60:6a:93:c7 4 | ONBOOT=yes 5 | TYPE=Ethernet 6 | USERCTL=no 7 | IPADDR=10.10.0.99 8 | NETMASK=255.255.255.0 9 | -------------------------------------------------------------------------------- /config/RHV/Hosts/fake-qemu.conf: -------------------------------------------------------------------------------- 1 | # file /etc/vdsm/vdsm.conf.d/fake-qemu.conf 2 | # Deployed on RHEL hosts for RHV to bypass CPU detection issues 3 | [vars] 4 | fake_kvm_support=true 5 | -------------------------------------------------------------------------------- /config/custom_manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "cfme_version": "5.11", 3 | "manifest": { 4 | "version": "1.0.0", 5 | "core": { 6 | "MiqDatabase": { 7 | "id": null, 8 | "guid": null, 9 | "region_number": null, 10 | "region_description": null 11 | }, 12 | "Zone": { 13 | "id": null, 14 | "name": null 15 | } 16 | }, 17 | "ManageIQ::Providers::Openstack::CloudManager": { 18 | "id": null, 19 | "name": null, 20 | "type": null, 21 | "guid": null, 22 | "api_version": null, 23 | "emstype_description": null, 24 | "hostname": null, 25 | "vms": { 26 | "id": null, 27 | "name": null, 28 | "description": null, 29 | "type": null, 30 | "uid_ems": null, 31 | "cpu_cores_per_socket": null, 32 | "cpu_total_cores": null, 33 | "disks_aligned": null, 34 | "ems_ref": null, 35 | "has_rdm_disk": null, 36 | "power_state": null, 37 | "ram_size_in_bytes": null, 38 | "retired": null, 39 | "v_datastore_path": null, 40 | "operating_system": { 41 | "product_type": null, 42 | "product_name": null, 43 | "distribution": null 44 | }, 45 | "guest_applications": { 46 | "name": null, 47 | "version": null, 48 | "typename": null, 49 | "arch": null, 50 | "release": null 51 | }, 52 | "hardware": { 53 | "id": null, 54 | "guest_os_full_name": null, 55 | "disks": { 56 | "id": null, 57 | "device_name": null, 58 | "device_type": null, 59 | "disk_type": null, 60 | "filename": null, 61 | "free_space": null, 62 | "mode": null, 63 | "size": null, 64 | "size_on_disk": null 65 | }, 66 | "nics": { 67 | "id": null, 68 | "device_name": null, 69 | "device_type": null, 70 | "address": null, 71 | "model": null, 72 | "uid_ems": null, 73 | "network": { 74 | "id": null, 75 | "ipaddress": null, 76 | "hostname": null 77 | } 78 | } 79 | }, 80 | "files": { 81 | "id": null, 82 | "name": null, 83 | "contents": null 84 | }, 85 | "system_services": { 86 | "id": null, 87 | "name": null, 88 | "typename": null 89 | } 90 | } 91 | }, 92 | "ManageIQ::Providers::Redhat::InfraManager": { 93 | "id": null, 94 | "name": null, 95 | "type": null, 96 | "guid": null, 97 | "api_version": null, 98 | "emstype_description": null, 99 | "hostname": null, 100 | "vms": { 101 | "id": null, 102 | "name": null, 103 | "description": null, 104 | "type": null, 105 | "uid_ems": null, 106 | "cpu_cores_per_socket": null, 107 | "cpu_total_cores": null, 108 | "disks_aligned": null, 109 | "ems_ref": null, 110 | "has_rdm_disk": null, 111 | "host": { 112 | "ems_ref": null 113 | }, 114 | "power_state": null, 115 | "ram_size_in_bytes": null, 116 | "retired": null, 117 | "v_datastore_path": null, 118 | "operating_system": { 119 | "product_type": null, 120 | "product_name": null, 121 | "distribution": null 122 | }, 123 | "guest_applications": { 124 | "name": null, 125 | "version": null, 126 | "typename": null, 127 | "arch": null, 128 | "release": null 129 | }, 130 | "hardware": { 131 | "id": null, 132 | "guest_os_full_name": null, 133 | "disks": { 134 | "id": null, 135 | "device_name": null, 136 | "device_type": null, 137 | "disk_type": null, 138 | "filename": null, 139 | "free_space": null, 140 | "mode": null, 141 | "size": null, 142 | "size_on_disk": null 143 | }, 144 | "nics": { 145 | "id": null, 146 | "device_name": null, 147 | "device_type": null, 148 | "address": null, 149 | "model": null, 150 | "uid_ems": null, 151 | "network": { 152 | "id": null, 153 | "ipaddress": null, 154 | "hostname": null 155 | } 156 | } 157 | }, 158 | "files": { 159 | "id": null, 160 | "name": null, 161 | "contents": null 162 | }, 163 | "system_services": { 164 | "id": null, 165 | "name": null, 166 | "typename": null 167 | } 168 | }, 169 | "ems_clusters": { 170 | "id": null, 171 | "name": null, 172 | "uid_ems": null, 173 | "ems_ref": null, 174 | "ha_enabled": null, 175 | "drs_enabled": null, 176 | "effective_cpu": null, 177 | "effective_memory": null, 178 | "v_parent_datacenter": null 179 | }, 180 | "hosts": { 181 | "id": null, 182 | "name": null, 183 | "type": null, 184 | "hostname": null, 185 | "ipaddress": null, 186 | "power_state": null, 187 | "guid": null, 188 | "uid_ems": null, 189 | "ems_ref": null, 190 | "mac_address": null, 191 | "maintenance": null, 192 | "vmm_vendor": null, 193 | "vmm_version": null, 194 | "vmm_product": null, 195 | "vmm_buildnumber": null, 196 | "archived": null, 197 | "cpu_cores_per_socket": null, 198 | "cpu_total_cores": null, 199 | "ems_cluster": { 200 | "ems_ref": null 201 | }, 202 | "hardware": { 203 | "memory_mb": null 204 | } 205 | }, 206 | "storages": { 207 | "id": null, 208 | "ems_ref": null, 209 | "name": null, 210 | "location": null, 211 | "store_type": null, 212 | "total_space": null, 213 | "free_space": null, 214 | "uncommitted": null, 215 | "storage_domain_type": null, 216 | "host_storages": { 217 | "ems_ref": null, 218 | "host": { 219 | "ems_ref": null 220 | } 221 | } 222 | } 223 | }, 224 | "ManageIQ::Providers::Vmware::InfraManager": { 225 | "id": null, 226 | "name": null, 227 | "type": null, 228 | "guid": null, 229 | "api_version": null, 230 | "emstype_description": null, 231 | "hostname": null, 232 | "vms": { 233 | "id": null, 234 | "name": null, 235 | "description": null, 236 | "type": null, 237 | "uid_ems": null, 238 | "cpu_cores_per_socket": null, 239 | "cpu_total_cores": null, 240 | "disks_aligned": null, 241 | "ems_ref": null, 242 | "has_rdm_disk": null, 243 | "cpu_affinity": null, 244 | "memory_hot_add_enabled": null, 245 | "cpu_hot_add_enabled": null, 246 | "cpu_hot_remove_enabled": null, 247 | 248 | "host": { 249 | "ems_ref": null 250 | }, 251 | "power_state": null, 252 | "ram_size_in_bytes": null, 253 | "retired": null, 254 | "v_datastore_path": null, 255 | "operating_system": { 256 | "product_type": null, 257 | "product_name": null, 258 | "distribution": null 259 | }, 260 | "guest_applications": { 261 | "name": null, 262 | "version": null, 263 | "typename": null, 264 | "arch": null, 265 | "release": null 266 | }, 267 | "hardware": { 268 | "id": null, 269 | "guest_os_full_name": null, 270 | "disks": { 271 | "id": null, 272 | "device_name": null, 273 | "device_type": null, 274 | "disk_type": null, 275 | "filename": null, 276 | "free_space": null, 277 | "mode": null, 278 | "size": null, 279 | "size_on_disk": null 280 | }, 281 | "nics": { 282 | "id": null, 283 | "device_name": null, 284 | "device_type": null, 285 | "address": null, 286 | "model": null, 287 | "uid_ems": null, 288 | "network": { 289 | "id": null, 290 | "ipaddress": null, 291 | "hostname": null 292 | } 293 | } 294 | }, 295 | "files": { 296 | "id": null, 297 | "name": null, 298 | "contents": null 299 | }, 300 | "system_services": { 301 | "id": null, 302 | "name": null, 303 | "typename": null 304 | } 305 | }, 306 | "ems_extensions": { 307 | "id": null, 308 | "ems_ref": null, 309 | "key": null, 310 | "company": null, 311 | "label": null, 312 | "summary": null, 313 | "version": null 314 | }, 315 | "ems_licenses": { 316 | "id": null, 317 | "ems_ref": null, 318 | "name": null, 319 | "license_edition": null, 320 | "total_licenses": null, 321 | "used_licenses": null 322 | }, 323 | "ems_clusters": { 324 | "id": null, 325 | "name": null, 326 | "uid_ems": null, 327 | "ems_ref": null, 328 | "ha_enabled": null, 329 | "drs_enabled": null, 330 | "effective_cpu": null, 331 | "effective_memory": null, 332 | "v_parent_datacenter": null 333 | }, 334 | "hosts": { 335 | "id": null, 336 | "name": null, 337 | "type": null, 338 | "hostname": null, 339 | "ipaddress": null, 340 | "power_state": null, 341 | "guid": null, 342 | "uid_ems": null, 343 | "ems_ref": null, 344 | "mac_address": null, 345 | "maintenance": null, 346 | "vmm_vendor": null, 347 | "vmm_version": null, 348 | "vmm_product": null, 349 | "vmm_buildnumber": null, 350 | "archived": null, 351 | "cpu_cores_per_socket": null, 352 | "cpu_total_cores": null, 353 | "ems_cluster": { 354 | "ems_ref": null 355 | }, 356 | "hardware": { 357 | "memory_mb": null 358 | } 359 | }, 360 | "storages": { 361 | "id": null, 362 | "ems_ref": null, 363 | "name": null, 364 | "location": null, 365 | "store_type": null, 366 | "total_space": null, 367 | "free_space": null, 368 | "uncommitted": null, 369 | "storage_domain_type": null, 370 | "host_storages": { 371 | "ems_ref": null, 372 | "host": { 373 | "ems_ref": null 374 | } 375 | } 376 | } 377 | } 378 | } 379 | } 380 | -------------------------------------------------------------------------------- /config/custom_manifest_commands.txt: -------------------------------------------------------------------------------- 1 | Get the manifest 2 | 3 | curl --user username@redhat.com https://cloud.redhat.com/api/topological-inventory/cfme/manifest/5.11 > custom_manifest.json 4 | 5 | You can then create the payload as we did before from Adam’s instructions, i.e. 6 | 7 | # vmdb 8 | $ rails c 9 | payload = Cfme::CloudServices::DataCollector.collect(JSON.parse(File.read("custom_manifest.json")), ManageIQ::Providers::Vmware::InfraManager.first) 10 | Cfme::CloudServices::DataPackager.package(payload) 11 | => #Pathname:/tmp/cfme_inventory20190723-2921-iqjrho.tar.gz 12 | -------------------------------------------------------------------------------- /config/default_SSA_profile.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | name: default 3 | description: VM Default 4 | set_type: ScanItemSet 5 | guid: 6 | read_only: 7 | set_data: 8 | mode: Vm 9 | owner_type: 10 | owner_id: 11 | userid: 12 | group_id: 13 | definition: 14 | - name: default_nteventlog 15 | guid: 16 | item_type: nteventlog 17 | definition: 18 | content: 19 | - :name: Application 20 | :filter: 21 | :message: 22 | :level: warn 23 | :rec_count: 0 24 | :source: 25 | :num_days: 2 26 | - :name: Security 27 | :filter: 28 | :message: 29 | :level: warn 30 | :rec_count: 31 | :source: 32 | :num_days: 2 33 | - :name: System 34 | :filter: 35 | :message: 36 | :level: warn 37 | :rec_count: 0 38 | :source: 39 | :num_days: 2 40 | filename: 41 | file_mtime: 42 | prod_default: 43 | mode: 44 | - name: default_registry 45 | guid: 46 | item_type: registry 47 | definition: 48 | content: 49 | - depth: 0 50 | hive: HKLM 51 | value: Enabled 52 | key: SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\PatternManager\Schedule 53 | - depth: 0 54 | hive: HKLM 55 | value: Type 56 | key: SOFTWARE\INTEL\LANDesk\VirusProtect6\CurrentVersion\PatternManager\Schedule 57 | - depth: 0 58 | hive: HKLM 59 | value: Destination 60 | key: SOFTWARE\InterSect Alliance\AuditService\Network 61 | - depth: 0 62 | hive: HKLM 63 | value: CurrentVersion 64 | key: SOFTWARE\JavaSoft\Java Runtime Environment 65 | - depth: 0 66 | hive: HKLM 67 | value: EnableDCOM 68 | key: SOFTWARE\Microsoft\Ole 69 | - depth: 0 70 | hive: HKLM 71 | value: DCOM Protocols 72 | key: SOFTWARE\Microsoft\Rpc 73 | - depth: 0 74 | hive: HKLM 75 | value: Ports 76 | key: SOFTWARE\Microsoft\Rpc\Internet 77 | - depth: 0 78 | hive: HKLM 79 | value: Version 80 | key: SOFTWARE\Microsoft\Updates\Windows 2000\SP5\KB958644\Filelist\0 81 | - depth: 0 82 | hive: HKLM 83 | value: Version 84 | key: SOFTWARE\Microsoft\Updates\Windows XP\SP4\KB958644\Filelist\0 85 | - depth: 0 86 | hive: HKLM 87 | value: DefaultUserName 88 | key: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon 89 | - depth: 0 90 | hive: HKLM 91 | value: AutoAdminLogon 92 | key: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon 93 | - depth: 0 94 | hive: HKLM 95 | value: SecurityTypes 96 | key: SOFTWARE\RealVNC\WinVNC4 97 | - depth: 0 98 | hive: HKLM 99 | value: PortNumber 100 | key: SOFTWARE\RealVNC\WinVNC4 101 | - depth: 0 102 | hive: HKLM 103 | value: UserPasswdVerifier 104 | key: SOFTWARE\RealVNC\WinVNC4 105 | - depth: 0 106 | hive: HKLM 107 | value: NtLogon_Config 108 | key: SOFTWARE\RealVNC\WinVNC4 109 | - depth: 0 110 | hive: HKLM 111 | value: Start 112 | key: SYSTEM\CurrentControlSet\Services\Alerter 113 | - depth: 0 114 | hive: HKLM 115 | value: Start 116 | key: SYSTEM\CurrentControlSet\Services\Browser 117 | - depth: 0 118 | hive: HKLM 119 | value: Start 120 | key: SYSTEM\CurrentControlSet\Services\ClipSrv 121 | - depth: 0 122 | hive: HKLM 123 | value: Start 124 | key: SYSTEM\CurrentControlSet\Services\DFS 125 | - depth: 0 126 | hive: HKLM 127 | value: Start 128 | key: SYSTEM\CurrentControlSet\Services\DHCP 129 | - depth: 0 130 | hive: HKLM 131 | value: Start 132 | key: SYSTEM\CurrentControlSet\Services\DHCPServer 133 | - depth: 0 134 | hive: HKLM 135 | value: Start 136 | key: SYSTEM\CurrentControlSet\Services\DesktopOnCallService 137 | - depth: 0 138 | hive: HKLM 139 | value: RestrictGuestAccess 140 | key: SYSTEM\CurrentControlSet\Services\Eventlog\Application 141 | - depth: 0 142 | hive: HKLM 143 | value: RestrictGuestAccess 144 | key: SYSTEM\CurrentControlSet\Services\Eventlog\Security 145 | - depth: 0 146 | hive: HKLM 147 | value: RestrictGuestAccess 148 | key: SYSTEM\CurrentControlSet\Services\Eventlog\System 149 | - depth: 0 150 | hive: HKLM 151 | value: Start 152 | key: SYSTEM\CurrentControlSet\Services\Fax 153 | - depth: 0 154 | hive: HKLM 155 | value: Start 156 | key: SYSTEM\CurrentControlSet\Services\LicenseService 157 | - depth: 0 158 | hive: HKLM 159 | value: Start 160 | key: SYSTEM\CurrentControlSet\Services\LmHosts 161 | - depth: 0 162 | hive: HKLM 163 | value: Start 164 | key: SYSTEM\CurrentControlSet\Services\MSDTC 165 | - depth: 0 166 | hive: HKLM 167 | value: Start 168 | key: SYSTEM\CurrentControlSet\Services\Messenger 169 | - depth: 0 170 | hive: HKLM 171 | value: DSA Database file 172 | key: SYSTEM\CurrentControlSet\Services\NTDS\Parameters 173 | - depth: 0 174 | hive: HKLM 175 | value: Start 176 | key: SYSTEM\CurrentControlSet\Services\NetLogon 177 | - depth: 0 178 | hive: HKLM 179 | value: Start 180 | key: SYSTEM\CurrentControlSet\Services\NtmsSvc 181 | - depth: 0 182 | hive: HKLM 183 | value: Start 184 | key: SYSTEM\CurrentControlSet\Services\PolicyAgent 185 | - depth: 0 186 | hive: HKLM 187 | value: Start 188 | key: SYSTEM\CurrentControlSet\Services\RSVP 189 | - depth: 0 190 | hive: HKLM 191 | value: ListenOnINternet 192 | key: SYSTEM\CurrentControlSet\Services\RpcSs 193 | - depth: 0 194 | hive: HKLM 195 | value: Bind 196 | key: SYSTEM\CurrentControlSet\Services\Rpc\Linkage 197 | - depth: 0 198 | hive: HKLM 199 | value: Start 200 | key: SYSTEM\CurrentControlSet\Services\SCardDrv 201 | - depth: 0 202 | hive: HKLM 203 | value: Start 204 | key: SYSTEM\CurrentControlSet\Services\SNMP 205 | - depth: 0 206 | hive: HKLM 207 | value: Start 208 | key: SYSTEM\CurrentControlSet\Services\SNMPTRAP 209 | - depth: 0 210 | hive: HKLM 211 | value: Start 212 | key: SYSTEM\CurrentControlSet\Services\ServicesTlntSvr 213 | - depth: 0 214 | hive: HKLM 215 | value: Start 216 | key: SYSTEM\CurrentControlSet\Services\TermService 217 | - depth: 0 218 | hive: HKLM 219 | value: Start 220 | key: SYSTEM\CurrentControlSet\Services\TrkWks 221 | - depth: 0 222 | hive: HKLM 223 | value: Start 224 | key: SYSTEM\CurrentControlSet\Services\UPS 225 | - depth: 0 226 | hive: HKLM 227 | value: Start 228 | key: SYSTEM\CurrentControlSet\Services\UtilMan 229 | - depth: 0 230 | hive: HKLM 231 | value: Start 232 | key: SYSTEM\CurrentControlSet\Services\W32Time 233 | - depth: 0 234 | hive: HKLM 235 | value: Description 236 | key: SYSTEM\CurrentControlSet\Services\W32Time 237 | - depth: 0 238 | hive: HKLM 239 | value: DisplayName 240 | key: SYSTEM\CurrentControlSet\Services\W32Time 241 | - depth: 0 242 | hive: HKLM 243 | value: AnnounceFlags 244 | key: SYSTEM\CurrentControlSet\Services\W32Time\Config 245 | - depth: 0 246 | hive: HKLM 247 | value: MaxNegPhaseCorrection 248 | key: SYSTEM\CurrentControlSet\Services\W32Time\Config 249 | - depth: 0 250 | hive: HKLM 251 | value: SpecialPollInterval 252 | key: SYSTEM\CurrentControlSet\Services\W32Time\NtpClient 253 | - depth: 0 254 | hive: HKLM 255 | value: Enabled 256 | key: SYSTEM\CurrentControlSet\Services\W32Time\NtpServer 257 | - depth: 0 258 | hive: HKLM 259 | value: NtpServer 260 | key: SYSTEM\CurrentControlSet\Services\W32Time\Parameters 261 | - depth: 0 262 | hive: HKLM 263 | value: Type 264 | key: SYSTEM\CurrentControlSet\Services\W32Time\Parameters 265 | - depth: 0 266 | hive: HKLM 267 | value: Start 268 | key: SYSTEM\CurrentControlSet\Services\WZCSVC 269 | - depth: 0 270 | hive: HKLM 271 | value: Start 272 | key: SYSTEM\CurrentControlSet\Services\WinMgmt 273 | - depth: 0 274 | hive: HKLM 275 | value: Start 276 | key: SYSTEM\CurrentControlSet\Services\cisvc 277 | - depth: 0 278 | hive: HKLM 279 | value: Start 280 | key: SYSTEM\CurrentControlSet\Services\cron 281 | - depth: 0 282 | hive: HKLM 283 | value: Start 284 | key: SYSTEM\CurrentControlSet\Services\dmserver 285 | - depth: 0 286 | hive: HKLM 287 | value: Start 288 | key: SYSTEM\CurrentControlSet\Services\mnmsrvc 289 | - depth: 0 290 | hive: HKLM 291 | value: Start 292 | key: SYSTEM\CurrentControlSet\Services\sshd 293 | - depth: 0 294 | hive: HKLM 295 | value: Start 296 | key: SYSTEM\CurrentControlSet\Services\wuauserv 297 | filename: 298 | file_mtime: 299 | prod_default: 300 | mode: 301 | - name: default_file 302 | guid: 303 | item_type: file 304 | definition: 305 | stats: 306 | - target: "/etc/*.conf" 307 | - target: "/etc/.ibm/registry/InstallationManager.dat" 308 | - target: "/etc/group" 309 | content: true 310 | - target: "/etc/hosts" 311 | - target: "/etc/oraInst.loc" 312 | - target: "/etc/redhat-access-insights/machine-id" 313 | - target: "/opt/mssql/bin/mssql-conf" 314 | - target: "/u01/app/oraInventory" 315 | - target: "/usr/sap/hostctrl/exe/saphostctrl" 316 | - target: c:/windows/system32/*.scr 317 | - target: c:/windows/system32/msi*.* 318 | - target: c:/windows/system32/netapi32.dll 319 | - target: /etc/oraInst.loc 320 | content: true 321 | - target: /u01/app/oraInventory 322 | - target: /opt/mssql/bin/mssql-conf 323 | - target: /usr/sap/hostctrl/exe/saphostctrl 324 | - target: /etc/.ibm/registry/InstallationManager.dat 325 | - target: /opt/IBM/WebSphere/AppServer 326 | - target: /opt/IBM/WebSphere/AppServer/profiles/AppSrv01 327 | - target: /opt/rh/eap7/root/usr/share/wildfly/domain/configuration/domain.xml 328 | - target: /opt/rh/eap7/root/usr/share/wildfly/standalone/configuration/standalone.xml 329 | - target: /opt/tomcat/bin/catalina.sh 330 | - target: /opt/tomcat/conf/server.xml 331 | - target: /u01/app/oracle/domains/base/bin/startNodeManager.sh 332 | - target: /u01/app/oracle/domains/base/startWebLogic.sh 333 | - target: /home/oracle/oraInventory 334 | - target: /u01/app/oracle/domains/base/config/config.xml 335 | - target: /var/lib/pgsql/data/postgresql.conf 336 | filename: 337 | file_mtime: 338 | prod_default: 339 | mode: 340 | - name: default_category 341 | guid: 342 | item_type: category 343 | definition: 344 | content: 345 | - target: accounts 346 | - target: services 347 | - target: software 348 | - target: system 349 | - target: vmconfig 350 | - target: vmevents 351 | filename: 352 | file_mtime: 353 | prod_default: 354 | mode: 355 | -------------------------------------------------------------------------------- /config/default_SSA_profile_commands.txt: -------------------------------------------------------------------------------- 1 | In VMDB dir ... (get there by runing 'vmdb' as root) 2 | 3 | 4 | To export run: 5 | 6 | bundle exec rake evm:export:scan_profiles -- --directory exports 7 | 8 | To import run: 9 | 10 | bundle exec rake evm:import:scan_profiles -- --source exports/default.yaml 11 | -------------------------------------------------------------------------------- /config/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 2 | ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 3 | 4 | 192.168.0.10 workstation.example.com workstation 5 | 10.9.0.10 workstation-9.example.com workstation-9 6 | 10.10.0.10 workstation-10.example.com workstation-10 7 | 8 | 192.168.0.254 storage.example.com storage 9 | 192.168.0.100 cf.example.com cf 10 | 192.168.0.51 esx1.example.com esx1 11 | 192.168.0.52 esx2.example.com esx2 12 | 192.168.0.50 vcenter.example.com vcenter 13 | 14 | 10.9.0.100 app.example.com app 15 | 10.10.0.7 rhel7.example.com rhel7 16 | 10.10.0.8 shareddisk1.example.com shareddisk1 17 | 10.10.0.9 shareddisk2.example.com shareddisk2 18 | 10.10.0.12 freebsd.example.com freebsd 19 | 10.10.0.100 lb.example.com lb 20 | 10.10.0.110 jboss0.example.com jboss0 21 | 10.10.0.111 jboss1.example.com jboss1 22 | 10.10.0.120 db.example.com db 23 | 10.10.0.130 hana.example.com hana 24 | 10.10.0.160 oracledb.example.com oracledb 25 | 10.10.0.180 tomcat.example.com tomcat 26 | 10.10.0.181 weblogic.example.com weblogic 27 | 10.10.0.182 websphere.example.com websphere 28 | 10.10.0.190 mssql.example.com mssql 29 | -------------------------------------------------------------------------------- /config/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "cfme_version": "5.11", 3 | "manifest": { 4 | "version": "1.0.0", 5 | "core": { 6 | "MiqDatabase": { 7 | "id": null, 8 | "guid": null, 9 | "region_number": null, 10 | "region_description": null 11 | }, 12 | "Zone": { 13 | "id": null, 14 | "name": null 15 | } 16 | }, 17 | "ManageIQ::Providers::OpenStack::CloudManager": { 18 | "id": null, 19 | "name": null, 20 | "type": null, 21 | "guid": null, 22 | "api_version": null, 23 | "emstype_description": null, 24 | "hostname": null, 25 | "vms": { 26 | "id": null, 27 | "name": null, 28 | "description": null, 29 | "type": null, 30 | "uid_ems": null, 31 | "cpu_cores_per_socket": null, 32 | "cpu_total_cores": null, 33 | "disks_aligned": null, 34 | "ems_ref": null, 35 | "has_rdm_disk": null, 36 | "power_state": null, 37 | "ram_size_in_bytes": null, 38 | "retired": null, 39 | "v_datastore_path": null, 40 | "operating_system": { 41 | "product_type": null, 42 | "product_name": null, 43 | "distribution": null 44 | }, 45 | "hardware": { 46 | "id": null, 47 | "guest_os_full_name": null, 48 | "disks": { 49 | "id": null, 50 | "device_name": null, 51 | "device_type": null, 52 | "disk_type": null, 53 | "filename": null, 54 | "free_space": null, 55 | "mode": null, 56 | "size": null, 57 | "size_on_disk": null 58 | }, 59 | "nics": { 60 | "id": null, 61 | "device_name": null, 62 | "device_type": null, 63 | "address": null, 64 | "model": null, 65 | "uid_ems": null, 66 | "network": { 67 | "id": null, 68 | "ipaddress": null, 69 | "hostname": null 70 | } 71 | } 72 | }, 73 | "files": { 74 | "id": null, 75 | "name": null, 76 | "contents": null 77 | }, 78 | "system_services": { 79 | "id": null, 80 | "name": null, 81 | "typename": null 82 | } 83 | } 84 | }, 85 | "ManageIQ::Providers::Redhat::InfraManager": { 86 | "id": null, 87 | "name": null, 88 | "type": null, 89 | "guid": null, 90 | "api_version": null, 91 | "emstype_description": null, 92 | "hostname": null, 93 | "vms": { 94 | "id": null, 95 | "name": null, 96 | "description": null, 97 | "type": null, 98 | "uid_ems": null, 99 | "cpu_cores_per_socket": null, 100 | "cpu_total_cores": null, 101 | "disks_aligned": null, 102 | "ems_ref": null, 103 | "has_rdm_disk": null, 104 | "host": { 105 | "ems_ref": null 106 | }, 107 | "power_state": null, 108 | "ram_size_in_bytes": null, 109 | "retired": null, 110 | "v_datastore_path": null, 111 | "operating_system": { 112 | "product_type": null, 113 | "product_name": null, 114 | "distribution": null 115 | }, 116 | "hardware": { 117 | "id": null, 118 | "guest_os_full_name": null, 119 | "disks": { 120 | "id": null, 121 | "device_name": null, 122 | "device_type": null, 123 | "disk_type": null, 124 | "filename": null, 125 | "free_space": null, 126 | "mode": null, 127 | "size": null, 128 | "size_on_disk": null 129 | }, 130 | "nics": { 131 | "id": null, 132 | "device_name": null, 133 | "device_type": null, 134 | "address": null, 135 | "model": null, 136 | "uid_ems": null, 137 | "network": { 138 | "id": null, 139 | "ipaddress": null, 140 | "hostname": null 141 | } 142 | } 143 | }, 144 | "files": { 145 | "id": null, 146 | "name": null, 147 | "contents": null 148 | }, 149 | "system_services": { 150 | "id": null, 151 | "name": null, 152 | "typename": null 153 | } 154 | }, 155 | "ems_clusters": { 156 | "id": null, 157 | "name": null, 158 | "uid_ems": null, 159 | "ems_ref": null, 160 | "ha_enabled": null, 161 | "drs_enabled": null, 162 | "effective_cpu": null, 163 | "effective_memory": null 164 | }, 165 | "hosts": { 166 | "id": null, 167 | "name": null, 168 | "type": null, 169 | "hostname": null, 170 | "ipaddress": null, 171 | "power_state": null, 172 | "guid": null, 173 | "uid_ems": null, 174 | "ems_ref": null, 175 | "mac_address": null, 176 | "maintenance": null, 177 | "vmm_vendor": null, 178 | "vmm_version": null, 179 | "vmm_product": null, 180 | "vmm_buildnumber": null, 181 | "archived": null, 182 | "cpu_cores_per_socket": null, 183 | "cpu_total_cores": null, 184 | "ems_cluster": { 185 | "ems_ref": null 186 | }, 187 | "hardware": { 188 | "memory_mb": null 189 | } 190 | }, 191 | "storages": { 192 | "id": null, 193 | "name": null, 194 | "location": null, 195 | "store_type": null, 196 | "total_space": null, 197 | "free_space": null, 198 | "uncommitted": null, 199 | "storage_domain_type": null, 200 | "host_storages": { 201 | "ems_ref": null, 202 | "host": { 203 | "ems_ref": null 204 | } 205 | } 206 | } 207 | }, 208 | "ManageIQ::Providers::Vmware::InfraManager": { 209 | "id": null, 210 | "name": null, 211 | "type": null, 212 | "guid": null, 213 | "api_version": null, 214 | "emstype_description": null, 215 | "hostname": null, 216 | "vms": { 217 | "id": null, 218 | "name": null, 219 | "description": null, 220 | "type": null, 221 | "uid_ems": null, 222 | "cpu_cores_per_socket": null, 223 | "cpu_total_cores": null, 224 | "disks_aligned": null, 225 | "ems_ref": null, 226 | "has_rdm_disk": null, 227 | "host": { 228 | "ems_ref": null 229 | }, 230 | "power_state": null, 231 | "ram_size_in_bytes": null, 232 | "retired": null, 233 | "v_datastore_path": null, 234 | "operating_system": { 235 | "product_type": null, 236 | "product_name": null, 237 | "distribution": null 238 | }, 239 | "hardware": { 240 | "id": null, 241 | "guest_os_full_name": null, 242 | "disks": { 243 | "id": null, 244 | "device_name": null, 245 | "device_type": null, 246 | "disk_type": null, 247 | "filename": null, 248 | "free_space": null, 249 | "mode": null, 250 | "size": null, 251 | "size_on_disk": null 252 | }, 253 | "nics": { 254 | "id": null, 255 | "device_name": null, 256 | "device_type": null, 257 | "address": null, 258 | "model": null, 259 | "uid_ems": null, 260 | "network": { 261 | "id": null, 262 | "ipaddress": null, 263 | "hostname": null 264 | } 265 | } 266 | }, 267 | "files": { 268 | "id": null, 269 | "name": null, 270 | "contents": null 271 | }, 272 | "system_services": { 273 | "id": null, 274 | "name": null, 275 | "typename": null 276 | } 277 | }, 278 | "ems_extensions": { 279 | "id": null, 280 | "ems_ref": null, 281 | "key": null, 282 | "company": null, 283 | "label": null, 284 | "summary": null, 285 | "version": null 286 | }, 287 | "ems_licenses": { 288 | "id": null, 289 | "ems_ref": null, 290 | "name": null, 291 | "license_edition": null, 292 | "total_licenses": null, 293 | "used_licenses": null 294 | }, 295 | "ems_clusters": { 296 | "id": null, 297 | "name": null, 298 | "uid_ems": null, 299 | "ems_ref": null, 300 | "ha_enabled": null, 301 | "drs_enabled": null, 302 | "effective_cpu": null, 303 | "effective_memory": null 304 | }, 305 | "hosts": { 306 | "id": null, 307 | "name": null, 308 | "type": null, 309 | "hostname": null, 310 | "ipaddress": null, 311 | "power_state": null, 312 | "guid": null, 313 | "uid_ems": null, 314 | "ems_ref": null, 315 | "mac_address": null, 316 | "maintenance": null, 317 | "vmm_vendor": null, 318 | "vmm_version": null, 319 | "vmm_product": null, 320 | "vmm_buildnumber": null, 321 | "archived": null, 322 | "cpu_cores_per_socket": null, 323 | "cpu_total_cores": null, 324 | "ems_cluster": { 325 | "ems_ref": null 326 | }, 327 | "hardware": { 328 | "memory_mb": null 329 | } 330 | }, 331 | "storages": { 332 | "id": null, 333 | "name": null, 334 | "location": null, 335 | "store_type": null, 336 | "total_space": null, 337 | "free_space": null, 338 | "uncommitted": null, 339 | "storage_domain_type": null, 340 | "host_storages": { 341 | "ems_ref": null, 342 | "host": { 343 | "ems_ref": null 344 | } 345 | } 346 | } 347 | } 348 | } 349 | } 350 | -------------------------------------------------------------------------------- /config/update_manifest.txt: -------------------------------------------------------------------------------- 1 | [root@cf-REPL vmdb]# curl --user mperezco@redhat.com https://cloud.redhat.com/api/topological-inventory/cfme/manifest/5.11 > /var/www/miq/vmdb/manifest.json 2 | /opt/rh/cfme-gemset/bundler/gems/cfme-migration_analytics-91229e2ea6e2/config/default-manifest.json 3 | -------------------------------------------------------------------------------- /doc/README.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | :imagesdir: images 5 | 6 | == Red Hat Solutions: Migration Analytics 1.0 GA 7 | 8 | Migration Analytics is based in the field experience of the Cloud Migration Factory. The tooling required is now included as features in differend projects (and products) to implement the VM migration tasks. The solution includes also proffesional services, training and much more please check link:http://red.ht/possibilities[http://red.ht/possibilities] for more info. This documentation is intended to be used to learn about the technical implementation of the solution, or demo it. 9 | 10 | === Migration Analytics v1.0 GA Lab Guide 11 | 12 | . link:migration_analytics-lab_guide.adoc[Migration Analytics 1.0 GA Lab Guide] 13 | 14 | === Migration Analytics v1.0 GA Supporting Documents 15 | . link:migration_analytics-configure_ssa.adoc[Configure Smart State Analysis in CloudForms 5.0] 16 | . link:migration_analytics-manual_data_extraction.md[Perform Manual Data Extraction in CloudForms 5.0] 17 | . link:migration_analytics-port_tunneling.adoc[SSH port tunneling to access the Environment] 18 | -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_01.png -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_02.png -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_03.png -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_04.png -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_05.png -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_06.png -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_07.png -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_08.png -------------------------------------------------------------------------------- /doc/images/add_vsphere_provider_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/add_vsphere_provider_09.png -------------------------------------------------------------------------------- /doc/images/app-ticketmonster-running.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/app-ticketmonster-running.png -------------------------------------------------------------------------------- /doc/images/architecture_diagram.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/architecture_diagram.png -------------------------------------------------------------------------------- /doc/images/blueprint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/blueprint.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-01.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-02.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-03.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-04.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-05.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-06.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-06b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-06b.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-07.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-08.png -------------------------------------------------------------------------------- /doc/images/cloudforms-configure_ssa-09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms-configure_ssa-09.png -------------------------------------------------------------------------------- /doc/images/cloudforms_check_virtualization_provider_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms_check_virtualization_provider_01.png -------------------------------------------------------------------------------- /doc/images/cloudforms_check_virtualization_provider_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms_check_virtualization_provider_02.png -------------------------------------------------------------------------------- /doc/images/cloudforms_check_virtualization_provider_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms_check_virtualization_provider_03.png -------------------------------------------------------------------------------- /doc/images/cloudforms_check_virtualization_provider_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms_check_virtualization_provider_04.png -------------------------------------------------------------------------------- /doc/images/cloudforms_login.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/cloudforms_login.png -------------------------------------------------------------------------------- /doc/images/firefox_ssh_tunnel_vcenter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/firefox_ssh_tunnel_vcenter.png -------------------------------------------------------------------------------- /doc/images/localhost_proxy_config.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/localhost_proxy_config.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_WAT_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_WAT_01.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_WAT_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_WAT_02.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_WAT_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_WAT_03.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_WAT_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_WAT_04.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_WAT_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_WAT_06.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_WAT_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_WAT_07.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_WAT_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_WAT_08.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_WAT_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_WAT_09.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_01.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_02.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_03.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_04.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_05.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_05.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_06.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_06.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_07.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_08.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_08.png -------------------------------------------------------------------------------- /doc/images/migration_analytics_examination_09.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/migration_analytics_examination_09.png -------------------------------------------------------------------------------- /doc/images/reset_cloudforms_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/reset_cloudforms_01.png -------------------------------------------------------------------------------- /doc/images/reset_cloudforms_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/reset_cloudforms_02.png -------------------------------------------------------------------------------- /doc/images/reset_cloudforms_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/reset_cloudforms_03.png -------------------------------------------------------------------------------- /doc/images/reset_cloudforms_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/reset_cloudforms_04.png -------------------------------------------------------------------------------- /doc/images/ssh_tunnel.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/ssh_tunnel.png -------------------------------------------------------------------------------- /doc/images/ssl_cert_warning.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/ssl_cert_warning.png -------------------------------------------------------------------------------- /doc/images/vsphere_checks_01.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/vsphere_checks_01.png -------------------------------------------------------------------------------- /doc/images/vsphere_checks_02.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/vsphere_checks_02.png -------------------------------------------------------------------------------- /doc/images/vsphere_checks_03.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/vsphere_checks_03.png -------------------------------------------------------------------------------- /doc/images/vsphere_checks_04.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/doc/images/vsphere_checks_04.png -------------------------------------------------------------------------------- /doc/migration_analytics-appliance_deployment_chapter.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | :imagesdir: images 5 | 6 | ifdef::env-github[] 7 | :tip-caption: :bulb: 8 | :note-caption: :information_source: 9 | :important-caption: :heavy_exclamation_mark: 10 | :caution-caption: :fire: 11 | :warning-caption: :warning: 12 | endif::[] 13 | 14 | == Migration Analytics 1.0 GA - Appliance Deployment 15 | 16 | :numbered: 17 | 18 | == Introduction 19 | 20 | To obtain a deploy a Red Hat CloudForms appliance, and make it run on VMware you may want to follow link:https://access.redhat.com/documentation/en-us/red_hat_cloudforms/5.0/html/installing_red_hat_cloudforms_on_red_hat_virtualization/index[the official CloudForms documentation]. 21 | 22 | === Add vSphere Provider 23 | 24 | We will login in CloudForms using the appliance default credentials, being the user `admin` and using the default appliance password (*smartvm*). 25 | 26 | image::add_vsphere_provider_01.png[Add vSphere provider to CloudForms] 27 | 28 | . We click on *Add provider*. If the menu doesn't show up, we can go there by clicking on *Compute -> Infrastructure -> Providers*. 29 | + 30 | image::add_vsphere_provider_02.png[Add vSphere provider to CloudForms] 31 | 32 | . We add all the data for the new infrastructure provider: 33 | + 34 | * Name: "vSphere" 35 | * Type: "VMware vCenter" 36 | * Hostname: "vcenter.example.com" 37 | * Username: "administrator@vsphere.local" 38 | * Password: ... the provided one 39 | + 40 | image::add_vsphere_provider_03.png[Add vSphere provider to CloudForms] 41 | 42 | . Once we click on *validate* we can ensure that the credentials are OK and we can proceed to click the *Add* at the bottom of the page. 43 | + 44 | image::add_vsphere_provider_04.png[Add vSphere provider to CloudForms] 45 | 46 | . We reach to the point where the *Insfrastructure Provider* has been added 47 | + 48 | image::add_vsphere_provider_05.png[Add vSphere provider to CloudForms] 49 | 50 | . Now we shall add the credentials to access hosts. We go to *Compute -> Infrastructure -> Hosts* 51 | + 52 | image::add_vsphere_provider_06.png[Add vSphere provider to CloudForms] 53 | 54 | . We select both hosts and click on *Configuration -> Edit Selected Items* 55 | + 56 | image::add_vsphere_provider_07.png[Add vSphere provider to CloudForms] 57 | 58 | . Then we add the credentials being *Username* `root` and the provided password. 59 | + 60 | image::add_vsphere_provider_08.png[Add vSphere provider to CloudForms] 61 | 62 | . We get the credentials saved successfuly 63 | + 64 | image::add_vsphere_provider_09.png[Add vSphere provider to CloudForms] 65 | 66 | === Configure SmartState Analysis 67 | [WARNING] 68 | Since the appliance was already previously configured for Smart State Analysis, the vddk library and associated tasks with it exist. The steps below are used when configuring a brand new appliance. 69 | 70 | . Install the VMware VDDK onto the CFME appliance. (Instructions also available here https://www.tigeriq.co/sddk-on-vsphere-6/ ). First copy the *VMware-vix-disklib* from the `workstation` folder to `cf`: 71 | + 72 | ---- 73 | [root@workstation-repl ~]# scp /root/Downloads/VMware-vix-disklib-stable.tar.gz cf:/root/ 74 | VMware-vix-disklib-stable.tar.gz 100% 19MB 86.0MB/s 00:00 75 | ---- 76 | 77 | . SSH into `cf` and *untar* the file 78 | + 79 | ---- 80 | [root@cf-REPL ~]# tar xzvf VMware-vix-disklib-stable.tar.gz 81 | [Output removed] 82 | ---- 83 | 84 | . Create lib folder and copy content there: 85 | + 86 | ---- 87 | [root@cf-REPL ~]# mkdir -p /usr/lib/vmware-vix-disklib 88 | [root@cf-REPL ~]# cd vmware-vix-disklib-distrib 89 | [root@cf-REPL vmware-vix-disklib-distrib]# cp -r bin64 /usr/lib/vmware-vix-disklib/ 90 | [root@cf-REPL vmware-vix-disklib-distrib]# cp -r lib64 /usr/lib/vmware-vix-disklib/ 91 | [root@cf-REPL vmware-vix-disklib-distrib]# cp -r include /usr/lib/vmware-vix-disklib/ 92 | ---- 93 | 94 | . Create symbolic links to make them available and load them: 95 | + 96 | ---- 97 | [root@cf-REPL ~]# ln -s /usr/lib/vmware-vix-disklib/lib64/libvixDiskLib.so /usr/lib/libvixDiskLib.so 98 | [root@cf-REPL ~]# ln -s /usr/lib/vmware-vix-disklib/lib64/libvixDiskLib.so.6 /usr/lib/libvixDiskLib.so.6 99 | [root@cf-REPL ~]# ldconfig 100 | ---- 101 | 102 | . Check they are added correctly 103 | + 104 | ---- 105 | [root@cf-REPL ~]# ldconfig -p | grep vix 106 | libvixDiskLib.so.6 (libc6,x86-64) => /lib/libvixDiskLib.so.6 107 | libvixDiskLib.so (libc6,x86-64) => /lib/libvixDiskLib.so 108 | ---- 109 | 110 | . Now, we have to configure Smart State Analysis in CloudForms. We move to the UI in http://cf.example.com 111 | 112 | . We go to *Compute -> Infrastructure -> Hosts* and add ‘Default’ (root) credentials for each hypervisor, e.g. 113 | + 114 | image::cloudforms-configure_ssa-01.png[Configure Smart State Analysis 1] 115 | + 116 | image::cloudforms-configure_ssa-02.png[Configure Smart State Analysis 2] 117 | + 118 | When the host credentials are set correctly, a green ‘tick’ will appear in the bottom-right quadrant of the host’s tile icon. 119 | + 120 | [WARNING] 121 | If it's not possible to add credentials for the ESXi hosts (or there are too many hosts with different credentials), VM scanning can still be performed using an authentication token provided by the vCenter. To configure this, set scan_via_host to be false in Configuration → Advanced settings: 122 | + 123 | ---- 124 | :coresident_miqproxy: 125 | :scan_via_host: false 126 | ---- 127 | 128 | . Check that both the SmartProxy and SmartState Analysis workers are enabled (on) in *Configuration -> Settings -> Server*: 129 | + 130 | image::cloudforms-configure_ssa-03.png[Configure Smart State Analysis 3] 131 | 132 | . In *Configuration -> Settings*, copy the ‘sample’ analysis profile: 133 | + 134 | image::cloudforms-configure_ssa-04.png[Configure Smart State Analysis 4] 135 | 136 | . Call the new profile ‘default’ (it must be this name): 137 | + 138 | image::cloudforms-configure_ssa-05.png[Configure Smart State Analysis 5] 139 | 140 | . Now go to the ‘File’ tab of the new analysis profile: 141 | + 142 | image::cloudforms-configure_ssa-06.png[Configure Smart State Analysis 6] 143 | + 144 | Add new entries for the files that should be collected for Migration Analytics. Collect Contents should be false by default but true for /etc/group and /etc/oraInst.loc: 145 | + 146 | ---- 147 | C:/Program Files/Microsoft SQL Server/110 148 | C:/Program Files/Microsoft SQL Server/120 149 | C:/Program Files/Microsoft SQL Server/130 150 | C:/Program Files/Microsoft SQL Server/140 151 | C:/Program Files/IBM/WebSphere/AppServer 152 | /etc/group 153 | /etc/oraInst.loc 154 | /u01/app/oraInventory 155 | /opt/mssql/bin/mssql-conf 156 | /usr/sap/hostctrl/exe/saphostctrl 157 | /etc/.ibm/registry/InstallationManager.dat 158 | /opt/IBM/WebSphere/AppServer 159 | /opt/IBM/WebSphere/AppServer/profiles/AppSrv01 160 | /opt/rh/eap7/root/usr/share/wildfly/domain/configuration/domain.xml 161 | /opt/rh/eap7/root/usr/share/wildfly/standalone/configuration/standalone.xml 162 | /opt/tomcat/bin/catalina.sh 163 | /opt/tomcat/conf/server.xml 164 | /u01/app/oracle/domains/base/bin/startNodeManager.sh 165 | /u01/app/oracle/domains/base/startWebLogic.sh 166 | /home/oracle/oraInventory 167 | /u01/app/oracle/domains/base/config/config.xml 168 | /var/lib/pgsql/data/postgresql.conf 169 | ---- 170 | 171 | 172 | 173 | . Add the "VM SmartState Analysis profile” to the VMware provider: 174 | + 175 | image::cloudforms-configure_ssa-07.png[Configure Smart State Analysis 7] 176 | + 177 | image::cloudforms-configure_ssa-08.png[Configure Smart State Analysis 8] 178 | + 179 | [NOTE] 180 | When a control policy has been successfully added to the provider a gold ‘shield’ icon will appear on the provider’s tile icon. 181 | 182 | . Tag any VMs that shouldn’t be analyzed with the exclusions/do_not_analyze tag (Mainly Windows VMs running stateless applications such as Exchange server, possibly other databases). Snapshotting such VMs may cause data corruption. 183 | 184 | . Optionally (for large environments) increase the following values in Configuration -> Advanced settings to allow for more concurrent scans: 185 | + 186 | ---- 187 | :coresident_miqproxy: 188 | :concurrent_per_ems: 1 189 | :concurrent_per_host: 1 190 | ---- 191 | + 192 | . Optionally (for very large multi-1000 VM environments) increase the number of VM Analysis Collector workers, or add further appliances and set the SmartProxy Affinity to delegate scanning of certain Hosts & Datastores to specific CFME appliances. 193 | 194 | .. For a one-off scan, select one/several/all VMs in the Compute -> Infrastructure -> Virtual Machines page and click Configuration -> Perform SmartState Analysis 195 | 196 | .. For a scheduled scan, add a “VM Analysis” schedule to Configuration -> Settings -> Schedules 197 | 198 | . Monitor the status of the scans in the → Tasks page of the WebUI, and/or using the last_scan_on, last_scan_attempt_on and last_sync_on attributes on a VM object. Scanning can take up to 1 minute per VM. The "VM SmartState Analysis profile” should also tag VMs with operations/analysis_failed or operations/analysis_success as appropriate. 199 | + 200 | When an SSA of a VM has completed successfully, the VM details page will have more information, i.e. 201 | + 202 | image::cloudforms-configure_ssa-09.png[Configure Smart State Analysis 9] 203 | 204 | === Enable Migration Analytics Menu 205 | 206 | . In the CloudForms UI, navigate to Settings using the ⚙️ icon in the upper-right 207 | 208 | . Click the Advanced tab. Find the `prototype` section, and under `migration_analytics` in this section, change `enabled` from false to true 209 | ```diff 210 | :prototype: 211 | :migration_analytics: 212 | - :enabled: false 213 | + :enabled: true 214 | ``` 215 | 216 | . Click Save 217 | 218 | . SSH in the Cloudforms VM 219 | ---- 220 | # ssh cf.example.com 221 | ---- 222 | 223 | . Restart the service 224 | ---- 225 | # systemctl restart evmserverd.service 226 | ---- 227 | 228 | == Examining VMware environment with Migration Analytics 229 | 230 | . Access CloudForms through it's URL http://cf.example.com and login using `admin` username and the provided password. 231 | 232 | + 233 | image::cloudforms_login.png[CloudForms Login] 234 | 235 | . Go to *Compute -> Infrastructure -> Providers* 236 | + 237 | image::cloudforms_check_virtualization_provider_01.png[Check Virt Provider] 238 | 239 | . Select *vSphere* and click on *Authentication -> Re-Check Authentication Status*. This will confirm that the credentials work with the current infra. 240 | + 241 | image::cloudforms_check_virtualization_provider_02.png[Check Virt Provider] 242 | 243 | . While the check is being performed, go to *Configuration -> Refresh Relationships and Power States* to get a fresh status of the running VMs 244 | + 245 | image::cloudforms_check_virtualization_provider_03.png[Check Virt Provider] 246 | + 247 | image::cloudforms_check_virtualization_provider_04.png[Check Virt Provider] 248 | 249 | . Now that the infrastructure is completely refreshed, we will extract data from it. Go to menu *Migration -> Migration Analytics*. 250 | + 251 | image::migration_analytics_examination_01.png[Migration Analytics Examination] 252 | 253 | . Click on *Get started* button 254 | + 255 | image::migration_analytics_examination_02.png[Migration Analytics Examination] 256 | 257 | . After the plugin has checked providers you will be taken to a summary page with all available providers. If you click on *vSphere* you will see a summary data of that provider. 258 | + 259 | image::migration_analytics_examination_03.png[Migration Analytics Examination] 260 | 261 | . Now let's click on *Collect inventory data* 262 | + 263 | image::migration_analytics_examination_04.png[Migration Analytics Examination] 264 | + 265 | image::migration_analytics_examination_05.png[Migration Analytics Examination] 266 | 267 | . Select Provider *vSphere* 268 | + 269 | image::migration_analytics_examination_06.png[Migration Analytics Examination] 270 | 271 | . Select *Detailed data*, as the current appliance is configured to run Smart State Analysis. Click *Continue* 272 | + 273 | image::migration_analytics_examination_07.png[Migration Analytics Examination] 274 | 275 | . Inventory collection will be complete. A file has been delivered in the filesystem of `cf.example.com`, in this case is the file `/tmp/cfme_inventory-20190829-2305-mvl6xy.tar.gz`. We will copy it manually. We may *return to summary* 276 | 277 | To copy the file to you local machine we first must copy it to your laptop or local machine: 278 | 279 | ---- 280 | $ scp root@192.168.0.100:/tmp/cfme_inventory-20190904-2341-1h3vafb.tar.gz . 281 | ---- 282 | 283 | image::migration_analytics_examination_08.png[Migration Analytics Examination] 284 | 285 | Now we can review the data, and upload them to the Migration Analytics application in cloud.redhat.com following the link:migration_analytics-user_guide.adoc[Migration Analytics User Guide] 286 | 287 | 288 | -------------------------------------------------------------------------------- /doc/migration_analytics-configure_ssa.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | :imagesdir: images 5 | 6 | == Migration Analytics 1.0 GA - Configure Smart State Analysis 7 | 8 | :numbered: 9 | 10 | 11 | . Install the VMware VDDK onto the CFME appliance. Follow the instructions here: https://www.tigeriq.co/sddk-on-vsphere-6/ 12 | 13 | . Add ‘Default’ (root) credentials for each hypervisor, e.g. 14 | 15 | image::cloudforms-configure_ssa-01.png[Configure Smart State Analysis 1] 16 | 17 | image::cloudforms-configure_ssa-02.png[Configure Smart State Analysis 2] 18 | 19 | When the host credentials are set correctly, a green ‘tick’ will appear in the bottom-right quadrant of the host’s tile icon. 20 | 21 | If it's not possible to add credentials for the ESXi hosts (or there are too many hosts with different credentials), VM scanning can still be performed using an authentication token provided by the vCenter. To configure this, set scan_via_host to be false in Configuration → Advanced settings: 22 | 23 | ---- 24 | :coresident_miqproxy: 25 | :scan_via_host: false 26 | ---- 27 | 28 | . Check that both the SmartProxy and SmartState Analysis workers are enabled (on) in Configuration → Settings → Server: 29 | 30 | image::cloudforms-configure_ssa-03.png[Configure Smart State Analysis 3] 31 | 32 | . In Configuration → Settings, copy the ‘sample’ analysis profile: 33 | 34 | image::cloudforms-configure_ssa-04.png[Configure Smart State Analysis 4] 35 | 36 | Call the new profile ‘default’ (it must be this name): 37 | 38 | image::cloudforms-configure_ssa-05.png[Configure Smart State Analysis 5] 39 | 40 | . Now go to the ‘File’ tab of the new analysis profile: 41 | 42 | image::cloudforms-configure_ssa-06.png[Configure Smart State Analysis 6] 43 | 44 | Add new entries for the files that should be collected for Migration Analytics: 45 | 46 | ---- 47 | C:/Program Files/Microsoft SQL Server/110 48 | C:/Program Files/Microsoft SQL Server/120 49 | C:/Program Files/Microsoft SQL Server/130 50 | C:/Program Files/Microsoft SQL Server/140 51 | C:/Program Files/IBM/WebSphere/AppServer 52 | /etc/group 53 | /etc/oraInst.loc 54 | /u01/app/oraInventory 55 | /opt/mssql/bin/mssql-conf 56 | /usr/sap/hostctrl/exe/saphostctrl 57 | /etc/.ibm/registry/InstallationManager.dat 58 | /opt/IBM/WebSphere/AppServer 59 | /opt/IBM/WebSphere/AppServer/profiles/AppSrv01 60 | ---- 61 | 62 | Extra entries 63 | 64 | ---- 65 | /opt/rh/eap7/root/usr/share/wildfly/domain/configuration/domain.xml 66 | /opt/rh/eap7/root/usr/share/wildfly/standalone/configuration/standalone.xml 67 | /opt/tomcat/bin/catalina.sh 68 | /opt/tomcat/conf/server.xml 69 | /u01/app/oracle/domains/base/bin/startNodeManager.sh 70 | /u01/app/oracle/domains/base/startWebLogic.sh 71 | /home/oracle/oraInventory 72 | /u01/app/oracle/domains/base/config/config.xml 73 | /var/lib/pgsql/data/postgresql.conf 74 | ---- 75 | 76 | 77 | Collect Contents should be false by default but true for /etc/group and /etc/oraInst.loc 78 | 79 | . Add the "VM SmartState Analysis profile” to the VMware provider: 80 | 81 | image::cloudforms-configure_ssa-07.png[Configure Smart State Analysis 7] 82 | 83 | image::cloudforms-configure_ssa-08.png[Configure Smart State Analysis 8] 84 | 85 | When a control policy has been successfully added to the provider a gold ‘shield’ icon will appear on the provider’s tile icon. 86 | 87 | . Tag any VMs that shouldn’t be analyzed with the exclusions/do_not_analyze tag (Mainly Windows VMs running stateless applications such as Exchange server, possibly other databases). Snapshotting such VMs may cause data corruption. 88 | 89 | . Optionally (for large environments) increase the following values in Configuration → Advanced settings to allow for more concurrent scans: 90 | 91 | :coresident_miqproxy: 92 | :concurrent_per_ems: 1 93 | :concurrent_per_host: 1 94 | 95 | . Optionally (for very large multi-1000 VM environments) increase the number of VM Analysis Collector workers, or add further appliances and set the SmartProxy Affinity to delegate scanning of certain Hosts & Datastores to specific CFME appliances. 96 | 97 | .. For a one-off scan, select one/several/all VMs in the Compute → Infrastructure → Virtual Machines page and click Configuration → Perform SmartState Analysis 98 | 99 | For a scheduled scan, add a “VM Analysis” schedule to Configuration → Settings → Schedules 100 | 101 | . Monitor the status of the scans in the → Tasks page of the WebUI, and/or using the last_scan_on, last_scan_attempt_on and last_sync_on attributes on a VM object. Scanning can take up to 1 minute per VM. The "VM SmartState Analysis profile” should also tag VMs with operations/analysis_failed or operations/analysis_success as appropriate. 102 | 103 | When an SSA of a VM has completed successfully, the VM details page will have more information, i.e. 104 | 105 | image::cloudforms-configure_ssa-09.png[Configure Smart State Analysis 9] 106 | 107 | -------------------------------------------------------------------------------- /doc/migration_analytics-enable_menu.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | :imagesdir: images 5 | 6 | == Migration Analytics 0.1 beta - Enable CF menu 7 | 8 | :numbered: 9 | 10 | * In the CloudForms UI, navigate to Settings using the ⚙️ icon in the upper-right 11 | 12 | * Click the Advanced tab 13 | 14 | * Find the `prototype` section, and under `migration_analytics` in this section, change `enabled` from false to true 15 | ```diff 16 | :prototype: 17 | :migration_analytics: 18 | - :enabled: false 19 | + :enabled: true 20 | ``` 21 | 22 | * Click Save 23 | 24 | * SSH in the Cloudforms VM 25 | ---- 26 | # ssh cf.example.com 27 | ---- 28 | 29 | * Restart the service 30 | ---- 31 | # systemctl restart evmserverd.service 32 | ---- 33 | 34 | -------------------------------------------------------------------------------- /doc/migration_analytics-installation_and_user_guide.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | :imagesdir: images 5 | 6 | ifdef::env-github[] 7 | :tip-caption: :bulb: 8 | :note-caption: :information_source: 9 | :important-caption: :heavy_exclamation_mark: 10 | :caution-caption: :fire: 11 | :warning-caption: :warning: 12 | endif::[] 13 | 14 | == Migration Analytics 1.0 GA - Installation and User Guide 15 | 16 | :numbered: 17 | 18 | == Welcome 19 | 20 | Welcome to *Migration Analytics*. This set of tools and services will help you assess the workloads in your environment, and understand the business and technical considerations, for migrating them to Red Hat’s platforms. It will do it by analyzing your environment and, using Red Hat’s data and analytics, and providing information and recommendations that are going to help you better evaluate the business and technical value involved. 21 | 22 | == Architecture 23 | 24 | The architecture of the Migration Analytics is hybrid, as it counts on having a tool (or tools) to examine the IT environment and collect basic data from it, and a cloud service to analyze the data and provide recommendations. 25 | 26 | An example of the workflow can be depicted as it follows: 27 | 28 | image::architecture_diagram.png[Architecture Diagram] 29 | 30 | Migration Analytics uses a custom plugin within Red Hat CloudForms to examine the environment. This plugin helps obtain the data, and download it as a single file, so it can be reviewed, and then uploaded to be analyzed. 31 | 32 | [NOTE] 33 | Upcoming versions of Migration Analytics will be able to upload the data directly, as long as the appliance has access to internet. 34 | 35 | 36 | In order to analyze data, we will use the Migration Analytics application running as SaaS on cloud.redhat.com. This tool will help us obtain the following reports to better understand the cost, risk and effort required to perform the migration: 37 | 38 | * Initial Savings Estimation 39 | * Workload Migration Summary 40 | * Workload Migration Inventory 41 | 42 | == Next steps 43 | 44 | Request an evaluation subscription here: link:https://access.redhat.com/products/red-hat-cloudforms-migrations/evaluation[Red Hat CloudForms Evaluation Subscription Form] 45 | 46 | To deploy and configure Red Hat CloudForms to examine the environment read the following guide: 47 | 48 | * link:migration_analytics-appliance_deployment_chapter.adoc[Migration Analytics Appliance Deployment Chapter] 49 | 50 | To analize the obtained data in Migration Analytics service in cloud.redhat.com read the following guide: 51 | 52 | * link:migration_analytics-user_chapter.adoc[Migration Analytics User Interface Chapter] 53 | 54 | 55 | -------------------------------------------------------------------------------- /doc/migration_analytics-lab_guide.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | :imagesdir: images 5 | 6 | ifdef::env-github[] 7 | :tip-caption: :bulb: 8 | :note-caption: :information_source: 9 | :important-caption: :heavy_exclamation_mark: 10 | :caution-caption: :fire: 11 | :warning-caption: :warning: 12 | endif::[] 13 | 14 | == Migration Analytics 1.0 GA - Lab Guide 15 | 16 | :numbered: 17 | 18 | == Introduction 19 | 20 | This Lab is built to help better understand the status of a running environment in order to assess, plan and execute a migration from a proprietary environment to an open source one. In order to do so, there are two tools built to help obtain and process data, initially focused on the Virtualization layer, but working to introspect the Operating System as well as the Applications. 21 | 22 | [NOTE] 23 | If you are interested in migrating applications, please check the link:https://developers.redhat.com/products/rhamt/overview[Red Hat Application Migration Toolkit] 24 | 25 | Migration Analytics uses a custom plugin within Red Hat CloudForms to examine the environment. This plugin helps obtain the data, and download it as a single file, so it can be reviewed, and then uploaded to be analyzed. 26 | 27 | [NOTE] 28 | Upcoming versions of Migration Analytics will be able to upload the data directly, as long as the appliance has access to internet. 29 | 30 | 31 | In order to analyze data, we will use the Migration Analytics application running as SaaS on cloud.redhat.com. This tool will help us obtain the following reports to better understand the cost, risk and effort required to perform the migration: 32 | 33 | * Initial Savings Estimation 34 | * Workload Migration Summary 35 | * Workload Migration Inventory 36 | 37 | .Goal 38 | * The goal of this lab is to obtain a set of data from a running environment, review it, upload it to be analyzed, and understand the benefits of the outcome provided in order to better assess and drive a migration. 39 | 40 | == Overview 41 | 42 | The environment to be used for this lab provides a running VMware vSphere environment with different workloads on it. It also includes a deployed and configured Red Hat CloudForms instance, with the Migration Analytics plugin configured to obtain data from it. 43 | 44 | In this environment the following configuration steps are already completed: 45 | 46 | * Enabled Migration Analytics plugin in CloudForms 47 | * Added the `vSphere` virtualization provider in CloudForms 48 | * Provide credentials for virtualization providers and hosts in CloudForms 49 | * Configured Smart State Analysis in CloudForms 50 | * Configured Ansible, an ansible hosts file, in `workstation` and, exchanged ssh keys (`/root/.ssh/id_rsa`) with all running machines. 51 | 52 | [NOTE] 53 | These steps are reproduced later on in the lab, so the user can learn how a full deployment is done. 54 | 55 | Required versions of products used: 56 | 57 | [cols="1,1",options="header"] 58 | |======= 59 | |Product |Version 60 | |CloudForms |5.0.5+ 61 | |VMware vSphere |6.0+ (6.7 used) 62 | |======= 63 | 64 | The Migration Analytics service, that will help us analyze the data extracted (a.k.a. "payload") is running in link:https://cloud.redhat.com/[cloud.redhat.com/]. It is a set of applications running on the OpenShift that powers it. 65 | 66 | [NOTE] 67 | The tool uses Red Hat Decision Manager, Red Hat AMQ (Kafka), Red Hat FUSE, 3Scale and other opensource tools to run. For more information, and access to all code, please check link:https://project-xavier.io[project-xavier.io]. 68 | 69 | == Requirements to access and perform this lab 70 | 71 | === Base requirements 72 | 73 | * A computer with access to the Internet :-) 74 | * SSH client 75 | * Firefox, or Chromium / Chrome 76 | 77 | [WARNING] 78 | In modern versions of Firefox (>60) an TLS negotiation issue may happen that will take aprox 40 seconds until timeout, before it let you access the CloudForms interface. This is due an issue with Firefox cert storage. You may create a new profile for it (with `firefox --ProfileManager`), or regenerate the cert storages by stopping it, moving `cert9.db` and `cert8.db` to an archive place and start firefox again. 79 | 80 | [WARNING] 81 | Grammarly plugin for Chrome is known to cause problems when managing CloudForms. If you use it, please deactivate it while doing this lab. 82 | 83 | === Obtaining or enabling access credentials 84 | 85 | This lab could be performed in a classroom (whether virtual or physical), in which case the proctors running the lab will provide instructions on how to get your own instance. 86 | 87 | If you plan to run it on a personal basis to learn, demo or simply "taste it" you may take these points into account: 88 | 89 | . First time login?, forgot login or password? Go to https://www.opentlc.com/account (Note, your username should NOT have an *@* in it.) 90 | 91 | . Red Hat Partners can also request access to the Red Hat Product Demo System (link:https://rhpds.redhat.com[RHPDS]) by sending an email to open-program@redhat.com. 92 | 93 | . Passwords to the services: `r3dh4t1!`. If you can't access it please contact GPTE or the link:https://mojo.redhat.com/community/marketing/vertical-marketing/horizontal-solutions/people[Horizontal Solutions Team]. 94 | 95 | == Environment 96 | 97 | A full new migration environment is deployed on every request. To make the environment unique a 4 character identifier is assigned to it (i.e. `1e37`), this identifier is referred in this documentation as *YOUR-GUID*. 98 | 99 | * Systems 100 | 101 | The migration environment consists of the following systems: 102 | 103 | image::blueprint.png[Blueprint] 104 | 105 | [cols="1,1,1,2",options="header"] 106 | |======= 107 | | Hostname | Internal IP | External name | Description 108 | |`workstation.example.com` |`192.168.0.10` | workstation-.rhpds.opentlc.com |Jump host and Ansible host 109 | |`storage.example.com` |`192.168.0.254` | N/A | NFS and iSCSI server 110 | |`cf.example.com` |`192.168.0.100` | cf-.rhpds.opentlc.com |CloudForms server 111 | |`vcenter.example.com` |`192.168.0.50` | N/A |VMware vCenter server 112 | |`esx1.example.com` |`192.168.0.51` | N/A |ESXi hypervisor 113 | |`esx2.example.com` |`192.168.0.52` | N/A |ESXi hypervisor 114 | |======= 115 | 116 | The architecture of the Migration Analytics environment and workflow can be depicted as it follows: 117 | 118 | image::architecture_diagram.png[Architecture Diagram] 119 | 120 | * Networks 121 | 122 | Networks used in the environment: 123 | 124 | [cols="1,1,2",options="header"] 125 | |======= 126 | | Network Name | IP range | Description 127 | | `Admin` | `192.168.x.x/16` | General administration and storage network. 128 | | `Service` | `10.10.0.x/24` | Internal network for the apps to connect to other apps. For example for `lb` (Load Balancer) to JBoss EAP and to `db`. 129 | | `Service-DMZ` | `10.9.0.x/24` | External DMZ network to publish external services. 130 | |======= 131 | 132 | * Virtual Machines 133 | 134 | This deployment of the migration environment includes the following VMs provisioned in the vSphere environment in order to be migrated: 135 | 136 | [cols="1,1,2",options="header"] 137 | |======= 138 | | Name | IPs | Description 139 | | `cluster0.example.com` | 10.10.0.8 | Red Hat Enterprise Linux 7 host running Pacemaker cluster software 140 | | `cluster1.example.com` | 10.10.0.9 | Red Hat Enterprise Linux 7 host running Pacemaker cluster software 141 | | `jboss0.example.com` | 10.10.0.110 | Red Hat Enterprise Linux 7 host running JBoss EAP, connected to the `Service` network for ticket-monster. 142 | | `jboss1.example.com` | 10.10.0.111 | Red Hat Enterprise Linux 7 host running JBoss EAP, connected to the `Service` network for ticket-monster. 143 | | `lb.example.com` | 10.10.0.100 , 10.9.0.100 | Red Hat Enterprise Linux 7 host running JBoss Core Service Apache HTTP server configured with mod_cluster to proxy traffic to `jboss0` and `jboss1`, connected to the `Service` and `Servicer-DMZ` networks for ticket-monster. 144 | | `db.example.com` | 10.10.0.120 | Red Hat Enterprise Linux 7 host running PostgreSQL providing service to `jboss0` and `jboss1` through the `Service` network for ticket-monster. 145 | | `freebsd.example.com` | 10.10.0.100 | FreeBSD 12 connected through the `Service` network. 146 | | `hana.example.com` | 10.10.0.150 | Red Hat Enterprise Linux 7 SAP HANA Express through the `Service` network. 147 | | `tomcat.example.com` | 10.10.0.180 | CentOS 7 host running Apache Tomcat 8 server through the `Service` network. 148 | | `weblogic.example.com` | 10.10.0.181 | Red Hat Enterprise Linux 7 host running Oracle Weblogic 12 server through the `Service` network. 149 | | `websphere.example.com` | 10.10.0.182 | Red Hat Enterprise Linux 7 host running IBM WebSphere 8 server through the `Service` network. 150 | | `oracledb.example.com` | 10.10.0.160 | CentOS 7 host running Apache Tomcat 8 server through the `Service` network. 151 | | `mssql.example.com` | 10.10.0.190 | Red Hat Enterprise Linux 7 host running Microsoft SQL server through the `Service` network. 152 | | `wmssql.example.com` | 10.10.0.191 | Microsoft Windows host running Microsoft SQL server through the `Service` network. 153 | |======= 154 | 155 | == Getting Started 156 | 157 | === Accessing the environment 158 | 159 | **Guided Lab** 160 | 161 | . Once the environment is up and running, and we have it assigned to ourselves, we use SSH to test access to it, by connecting to the `workstation`. The SSH path is provided in the GUID grabber tool. 162 | + 163 | ---- 164 | $ ssh labuser@workstation-.rhpds.opentlc.com 165 | ---- 166 | + 167 | . Once you check that you can connect to workstation, become `root` using `sudo`: 168 | + 169 | ---- 170 | $ sudo -i 171 | ---- 172 | 173 | Now that you have accessed the `workstation` machine and become `root`, you can check the rest of the infrastructure. 174 | 175 | 176 | **Self request via RHPDS** 177 | 178 | . Once the environment is up and running, and we have it assigned to ourselves, we use SSH to test access to it, by connecting to the `workstation` using your OPENTLC login name and private SSH key. 179 | 180 | * Using a Unix/Linux system: 181 | + 182 | ---- 183 | $ ssh -i /path/to/private_key @workstation-.rhpds.opentlc.com 184 | ---- 185 | 186 | * Example for user 'batman' and GUID '1e37', using the default ssh private key: 187 | + 188 | ---- 189 | $ ssh -i ~/.ssh/id_rsa batman-redhat.com@workstation-1e37.rhpds.opentlc.com 190 | Last login: Mon Aug 26 05:03:34 2019 from workstation.example.com 191 | [batman-redhat.com@workstation-1e37 ~]$ 192 | ---- 193 | 194 | . Once you check that you can connect to workstation, become `root` using the provided password: 195 | + 196 | ---- 197 | $ sudo -i 198 | ---- 199 | 200 | Now that you have accessed the `workstation` machine and become `root`, you can check the rest of the infrastructure. 201 | 202 | === Checking infrastructure status 203 | 204 | . Check the status of the infrastructure running the environment, from the `workstation`, using ansible: 205 | + 206 | ---- 207 | # ansible infra -m ping 208 | ---- 209 | + 210 | This command establishes a SSH connection to all the infrastructure machines in the environment, defined as `infra` in `/etc/ansible/hosts` which are: vCenter and ESXi servers, storage and workstation, as well as CloudForms. If the machines are being built of booted up, they will show as unreachable. In case the machines are up an running a success message, per each, will show up. 211 | This is an example of a success message for the VM `cf.example.com`: 212 | + 213 | ---- 214 | cf.example.com | SUCCESS => { 215 | "changed": false, 216 | "ping": "pong" 217 | } 218 | ---- 219 | + 220 | [WARNING] 221 | As this environment is generated and powered up for you in a cloud environment, some resources may suffer from issues or delays depending on the status of the cloud its running on. You may need to wait until everything is up and running, and manually start up or reboot some of them. Follow carefully the upcoming steps to ensure your lab is in a proper running status. 222 | 223 | . Let's manually check that CloudForms is running by establishing an SSH connection to it (from workstation) and take a look at `automation.log`: 224 | + 225 | ---- 226 | [root@workstation-repl ~]# ssh cf 227 | Welcome to the Appliance Console 228 | 229 | For a menu, please type: appliance_console 230 | Web console: https://cf.example.com:9090/ or https://192.168.0.100:9090/ 231 | 232 | Last login: Mon Aug 26 07:08:05 2019 from 192.168.0.10 233 | [root@cf ~]# tail -f /var/www/miq/vmdb/log/automation.log 234 | ---- 235 | + 236 | [TIP] 237 | The log entries are very long, so it helps if you stretch this window as wide as possible. 238 | 239 | Before checking the vSphere environment we have to set up a tunnel to the running environment. 240 | 241 | [WARNING] 242 | You must log out from the SSH session to go to the next section. 243 | 244 | === Creating an SSH tunnel to the Environment 245 | 246 | To access all the resources, from our browser, the same way we would do it being connected directly to the management network, we are going to create a *SSH tunnel* from our working laptop to the `workstation` machine. This is the diagram of how it will work (explained below): 247 | 248 | image::ssh_tunnel.png[SSH tunnel for Proxy] 249 | 250 | * Our `laptop` connects to `workstation` via ssh 251 | * SSH is instructed to listen on `localhost:3128` in the `laptop` 252 | * SSH takes all the traffic from `localhost:3128` in the `laptop` to `localhost:3128` in the `workstation` 253 | * There is a squid proxy service listening in `localhost:3128` in the `workstation` 254 | * The browser in the `laptop` is configured to use the proxy in `localhost:3128` ... and all the traffic will be sent to the squid proxy in the `workstation`, including the DNS queries. 255 | * The browser can point now to any service using the internal name (i.e. https://vcenter.example.com ) ... let's do it! 256 | 257 | Time to move ahead. 258 | 259 | **Guided Lab** 260 | 261 | . Let's fire up SSH in your workstation but this time with the "tunnel" option `-L localhost:3128:localhost:3128` 262 | + 263 | ---- 264 | $ ssh -L localhost:3128:localhost:3128 labuser@workstation-.rhpds.opentlc.com 265 | ---- 266 | 267 | . Running it shall simply provide a shell prompt. This an example on how it would look like: 268 | + 269 | ---- 270 | $ ssh -L localhost:3128:localhost:3128 labuser@workstation-.rhpds.opentlc.com 271 | Last login: Mon Aug 26 05:03:34 2019 from workstation.example.com 272 | [labuser@workstation-1e37 ~]$ 273 | ---- 274 | + 275 | [NOTE] 276 | A private SSH key may be provided by the proctor running the lab 277 | 278 | **Self guided using RHPDS** 279 | 280 | . Let's fire up SSH in your workstation but this time with the "tunnel" option `-L localhost:3128:localhost:3128` 281 | + 282 | ---- 283 | $ ssh -i /path/to/private_key -L localhost:3128:localhost:3128 @workstation-.rhpds.opentlc.com 284 | ---- 285 | 286 | . Running it shall simply provide a shell prompt. This an example on how it would look like: 287 | + 288 | ---- 289 | $ ssh -i ~/.ssh/id_rsa -L localhost:3128:localhost:3128 batman-redhat.com@workstation-1e37.rhpds.opentlc.com 290 | Last login: Mon Aug 26 05:03:34 2019 from workstation.example.com 291 | [batman-redhat.com@workstation-1e37 ~]$ 292 | ---- 293 | 294 | **COMMON** 295 | 296 | . In order to use the new SSH tunnel now listening on port 3128 on your machine, your Firefox browser will need to be configured to use the tunnel as a proxy address. Since this will re-direct ALL broswer activity through the lab proxy, if you are using Firefox for anything other than this lab it is recommended that you first create a new Firefox profile. This will allow you to set a proxy address for the new profile which will not interfere with normal use of your browser and may prevent other issues with the lab. 297 | + 298 | If using Linux, enter this command at the prompt, and follow the instructions: 299 | + 300 | ---- 301 | firefox --new-instance --ProfileManager 302 | ---- 303 | + 304 | - Be sure to uncheck "Use Selected Profile Without Asking At Startup" before launching the new profile. 305 | - Full instructions for creating a new profile are published here: https://developer.mozilla.org/en-US/docs/Mozilla/Firefox/Multiple_profiles 306 | - You can use the same instructions to delete the profile later on when you have finished with the lab. 307 | 308 | . Now by configuring the browser to access proxy in `localhost` port `3128` for all protocols, we will be running it as if it was directly inside the environment, consuming the internal DNS names. Internal DNS names used the domain `example.com`. Configure the proxy, for this use case, following this example: 309 | + 310 | image::localhost_proxy_config.png[Localhost Proxy Config] 311 | 312 | . Time to point our browser to an internal URL ... http://vcenter.example.com 313 | + 314 | image::firefox_ssh_tunnel_vcenter.png[Firefox accessing vCenter using a tunnel] 315 | + 316 | [WARNING] 317 | If you haven't managed to make this work, please do not hesitate asking for help. It will be key to proceed with the rest of the lab. 318 | 319 | === Checking vSphere status 320 | 321 | . The vSphere environment has been instantiated for us in the cloud and we will be using *nested virtualization* so, the performance may not be as good as in a full baremetal environment. Let's login in the WebUI: 322 | + 323 | image::vsphere_checks_01.png[Access vCenter UI] 324 | 325 | . Use the administrator username which is `administrator@vsphere.local` and the provided password. 326 | + 327 | image::vsphere_checks_02.png[Login in SSO UI] 328 | 329 | . Once in the vCenter UI, click on the *Hosts and Clusters* icon (1), then select *VMCluster* (2) and last, *Reset to Green* all the warnings shown 330 | + 331 | image::vsphere_checks_03.png[Reset to Green] 332 | 333 | . VMs should have been started by the `start_vms` script in `workstation`. In case some VMs are stopped you may manually start them by selecting it and clicking on the *play* icon 334 | + 335 | image::vsphere_checks_04.png[Press play] 336 | + 337 | [NOTE] 338 | you can also check the status of the `start_vms` script by looking at the ansible log in `workstation` 339 | + 340 | ---- 341 | # tail -f /var/log/ansible.log 342 | ---- 343 | 344 | Now the environment is ready to move ahead. We can verify that the VMs in vSphere are up by checking that the Ticket Monster app is running: 345 | 346 | * Point your browser to http://app.example.com and check it is running: 347 | + 348 | image::app-ticketmonster-running.png[Ticket Monster app running] 349 | [NOTE] 350 | You must accept all of the self-signed SSL certificates. 351 | + 352 | image::ssl_cert_warning.png[SSL Cert Warning] 353 | 354 | == Examining VMware environment with Migration Analytics 355 | 356 | The *Workload Examination Toolkit* is being built within CloudForms to help examine the VMware environment and provide a set of data to analyze it. The initial steps will be taken with a preconfigured environment, which later on will be reset to a "just deployed" state to practice how to configure it. 357 | 358 | . Access CloudForms through it's URL http://cf.example.com and login using `admin` username and the provided password. 359 | + 360 | image::cloudforms_login.png[CloudForms Login] 361 | 362 | . Go to *Compute -> Infrastructure -> Providers* 363 | + 364 | image::cloudforms_check_virtualization_provider_01.png[Check Virt Provider] 365 | 366 | . Select *vSphere* and click on *Authentication -> Re-Check Authentication Status*. This will confirm that the credentials work with the current infra. 367 | + 368 | image::cloudforms_check_virtualization_provider_02.png[Check Virt Provider] 369 | 370 | . While the check is being performed, go to *Configuration -> Refresh Relationships and Power States* to get a fresh status of the running VMs 371 | + 372 | image::cloudforms_check_virtualization_provider_03.png[Check Virt Provider] 373 | + 374 | image::cloudforms_check_virtualization_provider_04.png[Check Virt Provider] 375 | 376 | . Now that the infrastructure is completely refreshed, we will extract data from it. Go to menu *Migration -> Migration Analytics*. 377 | + 378 | image::migration_analytics_examination_01.png[Migration Analytics Examination] 379 | 380 | . Click on *Get started* button 381 | + 382 | image::migration_analytics_examination_02.png[Migration Analytics Examination] 383 | 384 | . After the plugin has checked providers you will be taken to a summary page with all available providers. If you click on *vSphere* you will see a summary data of that provider. 385 | + 386 | image::migration_analytics_examination_03.png[Migration Analytics Examination] 387 | 388 | . Now let's click on *Collect inventory data* 389 | + 390 | image::migration_analytics_examination_04.png[Migration Analytics Examination] 391 | + 392 | image::migration_analytics_examination_05.png[Migration Analytics Examination] 393 | 394 | . Select Provider *vSphere* 395 | + 396 | image::migration_analytics_examination_06.png[Migration Analytics Examination] 397 | 398 | . Select *Detailed data*, as the current appliance is configured to run Smart State Analysis. Click *Continue* 399 | + 400 | image::migration_analytics_examination_07.png[Migration Analytics Examination] 401 | 402 | . Inventory collection will be complete. Click on *Download Inventory File* to get the payload file. 403 | + 404 | image::migration_analytics_examination_08.png[Migration Analytics Examination] 405 | + 406 | image::migration_analytics_examination_09.png[Migration Analytics Examination] 407 | 408 | === Analyzing the Data from Examination with the Workload Analysis Tool 409 | 410 | Once we have the data we proceed to analyze it in our Software as a Service offering, the Workload Analysis Tool, which is part of cloud.redhat.com 411 | 412 | . We access https://cloud.redhat.com/ . We select in *Migration Services*, the entry *Migration Analytics* 413 | + 414 | image::migration_analytics_WAT_01.png[Workload Analysis Tool] 415 | 416 | . Once in the *Migration Analytics* app, we click on *Create* 417 | + 418 | image::migration_analytics_WAT_02.png[Workload Analysis Tool] 419 | 420 | . We select the payload file to be analyzed. We may want to use this link:https://github.com/RedHatDemos/RHS-Migration_Analytics/blob/master/payloads/cfme_inventory-20200302-demolab_withSSA.tar.gz?raw=true[sample file] that contains a sample of the hosts and VMs in the lab environment. We choose our *Report Name* and provide a *Report Description*. It is important to include the growth rate expected, as well as the planned migration per year. 421 | + 422 | image::migration_analytics_WAT_03.png[Workload Analysis Tool] 423 | 424 | . The file gets uploaded 425 | + 426 | image::migration_analytics_WAT_04.png[Workload Analysis Tool] 427 | 428 | . Once the report is created we can click on its name to access it 429 | + 430 | image::migration_analytics_WAT_06.png[Workload Analysis Tool] 431 | 432 | . The first thing we see is the *Initial Savings Estimation* report with a set of numbers providing a high level approach to the expected savings based on the data retrieved from the infrastructure. 433 | + 434 | image::migration_analytics_WAT_07.png[Workload Analysis Tool] 435 | 436 | . Clicking on *Workload Migration Summary* we can see (TODO) a report providing information on the efforts required to perform the migrations as well as more detailed data on the workloads to help plan further. 437 | + 438 | image::migration_analytics_WAT_08.png[Workload Analysis Tool] 439 | 440 | . Clicking on *Workload Migration Inventory* provides a detailed list of the Virtual Machines to be migrated, with information on the workload, the operating system, as well as the estimated effort and recommended targets. This will help proceed with the detailed plan of the migration 441 | + 442 | image::migration_analytics_WAT_09.png[Workload Analysis Tool] 443 | 444 | 445 | == Configuring CloudForms to run as Migration Analytics Workload Examination Toolkit 446 | 447 | To deploy a CloudForms appliance on VMware you may want to follow link:https://access.redhat.com/documentation/en-us/migration_analytics/1.0/html/migration_analytics_guide/installing_and_configuring_red_hat_cloudforms_for_migration_analytics[the official documentation]. 448 | 449 | === CloudForms Reset 450 | 451 | Once the overview is done, we can proceed to SSH to the `workstation` in a new session to not break your tunnels that were previously setup. Then change to the `root` user. 452 | 453 | ---- 454 | # ssh -i /path/to/private_key @workstation-.rhpds.opentlc.com 455 | # sudo su - 456 | ---- 457 | 458 | We continue by running, in `workstation`, the playbook to unconfigure the deployed CloudForms: 459 | 460 | ---- 461 | # cd /root/RHS-Migration_Analytics/playbooks/ 462 | # ansible-playbook unconfigure_cf.yml 463 | ---- 464 | 465 | . The playbook will stop the CloudForms services, will reset the database, and restart the services. 466 | + 467 | image::reset_cloudforms_01.png[Launch CF reset playbook] 468 | 469 | . After CloudForms database reset, the users will be removed and the `admin` will have the *password reset* to the default appliance password (*smartvm*). We shall change that default password to the provided one by clicking in `update password` in the CloudForms login screen and filling up the new password fields: 470 | + 471 | image::reset_cloudforms_03.png[Launch CF reset playbook] 472 | + 473 | image::reset_cloudforms_04.png[Launch CF reset playbook] 474 | 475 | === Add vSphere Provider 476 | 477 | We will login in CloudForms using the credentials we have just set in the previous step. If the password remains unchanged, we shall use appliance default credentials, being the user `admin` and using the password (*smartvm*). 478 | 479 | image::add_vsphere_provider_01.png[Add vSphere provider to CloudForms] 480 | 481 | . We click on *Add provider*. If the menu doesn't show up, we can go there by clicking on *Compute -> Infrastructure -> Providers*. 482 | + 483 | image::add_vsphere_provider_02.png[Add vSphere provider to CloudForms] 484 | 485 | . We add all the data for the new infrastructure provider: 486 | + 487 | * Name: "vSphere" 488 | * Type: "VMware vCenter" 489 | * Hostname: "vcenter.example.com" 490 | * Username: "administrator@vsphere.local" 491 | * Password: ... the provided one 492 | + 493 | image::add_vsphere_provider_03.png[Add vSphere provider to CloudForms] 494 | 495 | . Once we click on *validate* we can ensure that the credentials are OK and we can proceed to click the *Add* at the bottom of the page. 496 | + 497 | image::add_vsphere_provider_04.png[Add vSphere provider to CloudForms] 498 | 499 | . We reach the point where the *Infrastructure Provider* has been added 500 | + 501 | image::add_vsphere_provider_05.png[Add vSphere provider to CloudForms] 502 | 503 | . Now we shall add the credentials to access hosts. We go to *Compute -> Infrastructure -> Hosts* 504 | + 505 | image::add_vsphere_provider_06.png[Add vSphere provider to CloudForms] 506 | 507 | . We select both hosts and click on *Configuration -> Edit Selected Items* 508 | + 509 | image::add_vsphere_provider_07.png[Add vSphere provider to CloudForms] 510 | 511 | . Then we add the credentials being *Username* `root` and the provided password. 512 | + 513 | image::add_vsphere_provider_08.png[Add vSphere provider to CloudForms] 514 | 515 | . We get the credentials saved successfuly 516 | + 517 | image::add_vsphere_provider_09.png[Add vSphere provider to CloudForms] 518 | 519 | [WARNING] 520 | If it's not possible to add credentials for the ESXi hosts (or there are too many hosts with different credentials), VM scanning can still be performed using an authentication token provided by the vCenter. To configure this, set scan_via_host to be false in Configuration → Advanced settings: 521 | 522 | ---- 523 | :coresident_miqproxy: 524 | :scan_via_host: false 525 | ---- 526 | 527 | === Configure SmartState Analysis 528 | [WARNING] 529 | Since the appliance was already previously configured for Smart State Analysis, the vddk library and associated tasks with it exist. The steps below are used when configuring a brand new appliance. 530 | 531 | You may want to take the easy way and use the avialable configuration script available here: https://access.redhat.com/articles/5001061 . We recommend doing it manually the first time to learn how it works. 532 | 533 | . Install the VMware VDDK onto the CFME appliance. First copy the *VMware-vix-disklib* from the `workstation` folder to `cf`: 534 | + 535 | ---- 536 | [root@workstation-repl ~]# scp /root/Downloads/VMware-vix-disklib-stable.tar.gz cf:/root/ 537 | VMware-vix-disklib-stable.tar.gz 100% 19MB 86.0MB/s 00:00 538 | ---- 539 | 540 | . SSH into `cf` and *untar* the file 541 | + 542 | ---- 543 | [root@cf-REPL ~]# tar xzvf VMware-vix-disklib-stable.tar.gz 544 | [Output removed] 545 | ---- 546 | 547 | . Create lib folder and copy content there: 548 | + 549 | ---- 550 | [root@cf-REPL ~]# mkdir -p /usr/lib/vmware-vix-disklib 551 | [root@cf-REPL ~]# cd vmware-vix-disklib-distrib 552 | [root@cf-REPL vmware-vix-disklib-distrib]# cp -rnv bin64 /usr/lib/vmware-vix-disklib/ 553 | [root@cf-REPL vmware-vix-disklib-distrib]# cp -rnv lib64 /usr/lib/vmware-vix-disklib/ 554 | [root@cf-REPL vmware-vix-disklib-distrib]# cp -rnv include /usr/lib/vmware-vix-disklib/ 555 | ---- 556 | 557 | . Create symbolic links to make them available and load them: 558 | + 559 | ---- 560 | [root@cf-REPL ~]# ln -s /usr/lib/vmware-vix-disklib/lib64/libvixDiskLib.so /usr/lib/libvixDiskLib.so 561 | [root@cf-REPL ~]# ln -s /usr/lib/vmware-vix-disklib/lib64/libvixDiskLib.so.6 /usr/lib/libvixDiskLib.so.6 562 | [root@cf-REPL ~]# ldconfig 563 | ---- 564 | 565 | . Check they are added correctly 566 | + 567 | ---- 568 | [root@cf-REPL ~]# ldconfig -p | grep vix 569 | libvixDiskLib.so.6 (libc6,x86-64) => /lib/libvixDiskLib.so.6 570 | libvixDiskLib.so (libc6,x86-64) => /lib/libvixDiskLib.so 571 | ---- 572 | 573 | . Now, we have to configure Smart State Analysis in CloudForms. We move to the UI in http://cf.example.com 574 | 575 | . Check that both the SmartProxy and SmartState Analysis workers are enabled (on). Click on the *gear icon* (Configuration) on the top right corner of the UI, and then go to *Settings -> Server*: 576 | + 577 | image::cloudforms-configure_ssa-03.png[Configure Smart State Analysis 3] 578 | 579 | . Check in *Configuration -> Settings* (remember, Configuration is the gear in the top right corner) that there is no `default` analysis profile. We will create the `default` analysis profile in a few steps. You may have a `host default` analysis profile configured and that is OK. You may examine the `sample` analysis profile to see what an analysis profile looks like: 580 | + 581 | image::cloudforms-configure_ssa-04.png[Configure Smart State Analysis 4] 582 | + 583 | [NOTE] 584 | In case you have a default profile, you may need to rename it, or remove it. 585 | 586 | . Now go to the cloudforms commandline in `cf` 587 | + 588 | ---- 589 | # ssh cf 590 | ---- 591 | 592 | . Obtain a preconfigured export of the `default` profile. We provide this one for you: 593 | + 594 | ---- 595 | # curl https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/master/config/default_SSA_profile.yaml > /root/default_SSA_profile.yaml 596 | ---- 597 | + 598 | [NOTE] 599 | This profile can be created by exporting the `sample` profile and editing it. 600 | 601 | . Import the `default` profile 602 | + 603 | ---- 604 | [root@cf-REPL ~]# vmdb 605 | [root@cf-REPL vmdb]# pwd 606 | /var/www/miq/vmdb 607 | [root@cf-REPL vmdb]# bundle exec rake evm:import:scan_profiles -- --source /root/default_SSA_profile.yaml 608 | ---- 609 | 610 | . Now you may want to go to *Configuration -> Settings* to review the new profile `default` (A reload of the page could be enough): 611 | + 612 | image::cloudforms-configure_ssa-05.png[Configure Smart State Analysis 5] 613 | 614 | . Now you may want to edit the `default` profile and check the `File` tab of it: 615 | + 616 | image::cloudforms-configure_ssa-06.png[Configure Smart State Analysis 6] 617 | + 618 | image::cloudforms-configure_ssa-06b.png[Configure Smart State Analysis 6] 619 | + 620 | 621 | . Go to *Compute -> Infrastructure -> Providers*. Select the `vSphere` provider and then go to *Policy -> Manage Policies* 622 | + 623 | image::cloudforms-configure_ssa-07.png[Configure Smart State Analysis 7] 624 | 625 | . Select *VM SmartState Analysis profile* to add it to the the VMware `vSphere` provider `vSphere`. Click *Save*: 626 | + 627 | image::cloudforms-configure_ssa-08.png[Configure Smart State Analysis 8] 628 | + 629 | [NOTE] 630 | When a control policy has been successfully added to the provider a gold ‘shield’ icon will appear on the provider’s tile icon. 631 | 632 | . Tag any VMs that shouldn’t be analyzed with the exclusions/do_not_analyze tag (Mainly Windows VMs running stateless applications such as Exchange server, possibly other databases). Snapshotting such VMs may cause data corruption. 633 | 634 | . Optionally (for large environments) increase the following values in Configuration -> Advanced settings to allow for more concurrent scans: 635 | + 636 | ---- 637 | :coresident_miqproxy: 638 | :concurrent_per_ems: 1 639 | :concurrent_per_host: 1 640 | ---- 641 | + 642 | . Optionally (for very large multi-1000 VM environments) increase the number of VM Analysis Collector workers, or add further appliances and set the SmartProxy Affinity to delegate scanning of certain Hosts & Datastores to specific CFME appliances. 643 | 644 | .. For a one-off scan, select one/several/all VMs in the Compute -> Infrastructure -> Virtual Machines page and click Configuration -> Perform SmartState Analysis 645 | 646 | .. For a scheduled scan, add a “VM Analysis” schedule to Configuration -> Settings -> Schedules 647 | 648 | . Monitor the status of the scans in the → Tasks page of the WebUI, and/or using the last_scan_on, last_scan_attempt_on and last_sync_on attributes on a VM object. Scanning can take up to 1 minute per VM. The "VM SmartState Analysis profile” should also tag VMs with operations/analysis_failed or operations/analysis_success as appropriate. 649 | + 650 | When an SSA of a VM has completed successfully, the VM details page will have more information, i.e. 651 | + 652 | image::cloudforms-configure_ssa-09.png[Configure Smart State Analysis 9] 653 | 654 | === Run new examination 655 | 656 | Now the environment is ready to run another examination. You could go back to the beginning of this guide to do so. :-) 657 | 658 | 659 | -------------------------------------------------------------------------------- /doc/migration_analytics-manual_data_extraction.md: -------------------------------------------------------------------------------- 1 | # Obtaining manually a payload for Migration Analytics 2 | 3 | * SSH into CloudForms VM 4 | ``` 5 | # ssh cf.example.com 6 | ``` 7 | * Move to the CloudForms rails app folder 8 | ``` 9 | # vmdb 10 | ``` 11 | * Obtain the `manifest.json` file with the configuration of the data extraction 12 | ``` 13 | # curl https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/master/config/manifest.json 2>/dev/null > manifest.json 14 | ``` 15 | * Enter the rails console 16 | ``` 17 | # rails c 18 | ``` 19 | * Call the extraction method 20 | ``` 21 | irb(main):001:0> payload = Cfme::CloudServices::DataCollector.collect(JSON.parse(File.read("manifest.json")), ManageIQ::Providers::Vmware::InfraManager.first) 22 | [Output removed] 23 | ``` 24 | * Save it to a file 25 | ``` 26 | irb(main):002:0> Cfme::CloudServices::DataPackager.package(payload) 27 | => # 28 | ``` 29 | 30 | * Copy the file to the /root folder 31 | ``` 32 | irb(main):002:0> system "cp /tmp/cfme_inventory20190826-12413-qq3dku.tar.gz /root/" 33 | => true 34 | ``` 35 | 36 | * Now exit the rails console. (Note: The temporary file will be removed) 37 | ``` 38 | irb(main):003:0> quit 39 | ``` 40 | -------------------------------------------------------------------------------- /doc/migration_analytics-port_tunneling.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | :imagesdir: images 5 | 6 | == Migration Analytics 1.0 GA - Lab Guide 7 | 8 | === Accessing the environment 9 | 10 | The environment can be accessed via ssh by connecting to the jump host or `workstation-.rhpds.opentlc.com` using ssh SSH, your OPENTLC login name and private SSH key. 11 | 12 | * Using a Unix/Linux system: 13 | + 14 | ---- 15 | $ ssh -i /path/to/private_key @workstation-.rhpds.opentlc.com 16 | ---- 17 | 18 | * Example for user 'batman' and GUID '1e37', using the default ssh private key: 19 | + 20 | ---- 21 | $ ssh -i ~/.ssh/id_rsa batman-redhat.com@workstation-1e37.rhpds.opentlc.com 22 | ---- 23 | 24 | * In the workstation there is a Proxy server (a.k.a. `squid`) that will use the internal DNS to work and reach all the internal machines. To use it, we can create an SSH tunnel that listens on `localhost` port `3128` 25 | + 26 | ---- 27 | $ ssh -i /path/to/private_key -L localhost:3128:localhost:3128 @workstation-.rhpds.opentlc.com 28 | ---- 29 | + 30 | [NOTE] 31 | This will redirect the port 3128 in our laptop to the port 3128 in the workstation where `squid` is listening 32 | + 33 | Now by configuring the browser to access proxy in `localhost` port `3128` for all protocols, we will be running it as if it was directly inside the environment, consumin the internal DNS names. 34 | + 35 | image::localhost_proxy_config.png[Localhost Proxy Config] 36 | + 37 | All the names `*.example.com` are accesible now via browser: 38 | [cols="1,1,2",options="header"] 39 | |======= 40 | | Hostname | Internal IP | Description 41 | |`workstation.example.com` |`192.168.0.10` | Jump host and Ansible host 42 | |`storage.example.com` |`192.168.0.254` | NFS server 43 | |`cf.example.com` |`192.168.0.100` | CloudForms server 44 | |`esx1.example.com` |`192.168.0.51` | ESXi hypervisor 45 | |`esx2.example.com` |`192.168.0.52` | ESXi hypervisor 46 | |`vcenter.example.com` |`192.168.0.50` |VMware vCenter server 47 | |======= 48 | 49 | -------------------------------------------------------------------------------- /doc/migration_analytics-user_chapter.adoc: -------------------------------------------------------------------------------- 1 | :scrollbar: 2 | :data-uri: 3 | :toc2: 4 | :imagesdir: images 5 | 6 | ifdef::env-github[] 7 | :tip-caption: :bulb: 8 | :note-caption: :information_source: 9 | :important-caption: :heavy_exclamation_mark: 10 | :caution-caption: :fire: 11 | :warning-caption: :warning: 12 | endif::[] 13 | 14 | == Migration Analytics 1.0 GA - Using the Analysis Tool 15 | 16 | :numbered: 17 | 18 | === Analyzing the Data from Examination with the Workload Analysis Tool 19 | 20 | Once we have the data we proceed to analyze it in our Software as a Service offering, the Workload Analysis Tool, which is part of cloud.redhat.com 21 | 22 | . We access https://cloud.redhat.com/ 23 | + 24 | image::migration_analytics_WAT_01.png[Workload Analysis Tool] 25 | 26 | . Once in the *Migration Analytics* app, we click on *Create* 27 | + 28 | image::migration_analytics_WAT_02.png[Workload Analysis Tool] 29 | 30 | . We select the payload file to be analyzed. We may want to use this link:https://github.com/RedHatDemos/RHS-Migration_Analytics/blob/master/payloads/cfme_inventory-20190912-demolab_withSSA.tar.gz?raw=true[sample file] that contains more hosts and VMs than the lab environment. We choose our *Report Name* and provide a *Report Description*. It is important ot include the growth rate expected, as well as the planned migration per year. 31 | + 32 | image::migration_analytics_WAT_03.png[Workload Analysis Tool] 33 | 34 | . The file gets uploaded 35 | + 36 | image::migration_analytics_WAT_04.png[Workload Analysis Tool] 37 | 38 | . A new entry appears while the reports are being generated. 39 | + 40 | image::migration_analytics_WAT_05.png[Workload Analysis Tool] 41 | 42 | . Once the report is created we can click on its name to access it 43 | + 44 | image::migration_analytics_WAT_06.png[Workload Analysis Tool] 45 | 46 | . The first thing we see is the *Initial Savings Estimation* report with a set of numbers providing a high level approach to the expected savings based on the data retrieved from the infrastructure. 47 | + 48 | image::migration_analytics_WAT_07.png[Workload Analysis Tool] 49 | 50 | . Clicking on *Workload Migration Summary* we can see (TODO) a report providing information on the efforts required to perform the migrations as well as more detailed data on the workloads to help plan further. 51 | + 52 | image::migration_analytics_WAT_08.png[Workload Analysis Tool] 53 | 54 | . Clicking on *Workload Migration Inventory* provides a detailed list of the Virtual Machines to be migrated, with information on the workload, the operating system, as well as the estimated effort and recommended targets. This will help proceed with the detailed plan of the migration 55 | + 56 | image::migration_analytics_WAT_09.png[Workload Analysis Tool] 57 | 58 | 59 | -------------------------------------------------------------------------------- /payloads/cfme_inventory-20190829-16128-internal_lab_final_format.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/cfme_inventory-20190829-16128-internal_lab_final_format.tar.gz -------------------------------------------------------------------------------- /payloads/cfme_inventory-20190909-demolab_withSSA.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/cfme_inventory-20190909-demolab_withSSA.tar.gz -------------------------------------------------------------------------------- /payloads/cfme_inventory-20190912-demolab_withSSA.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/cfme_inventory-20190912-demolab_withSSA.tar.gz -------------------------------------------------------------------------------- /payloads/cfme_inventory-20200204-demolab_SSA_packages.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/cfme_inventory-20200204-demolab_SSA_packages.tar.gz -------------------------------------------------------------------------------- /payloads/cfme_inventory-20200302-demolab_withSSA.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/cfme_inventory-20200302-demolab_withSSA.tar.gz -------------------------------------------------------------------------------- /payloads/cfme_inventory20190802-8879-191pxg8_noSSA.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/cfme_inventory20190802-8879-191pxg8_noSSA.tar.gz -------------------------------------------------------------------------------- /payloads/cfme_inventory20190807-32152-jimd0q_large_dataset_10k_vms.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/cfme_inventory20190807-32152-jimd0q_large_dataset_10k_vms.tar.gz -------------------------------------------------------------------------------- /payloads/keating-20190926_1304-214.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/keating-20190926_1304-214.tar.gz -------------------------------------------------------------------------------- /payloads/keating-payload-20200604_1242-314.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/keating-payload-20200604_1242-314.tar.gz -------------------------------------------------------------------------------- /payloads/keating-payload-20200818_1448-155.tar.gz: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/RedHatDemos/RHS-Migration_Analytics/0713f5c7fbda81447a50af8d190b097877cc8a84/payloads/keating-payload-20200818_1448-155.tar.gz -------------------------------------------------------------------------------- /payloads/payload-generator/README.md: -------------------------------------------------------------------------------- 1 | # Payload Generator 2 | 3 | Just as Thomas Patrick Keating forged amazing works of art so to does keating forge amazing json payload files for migration analytics demonstrations based on [Project Xavier](https://github.com/project-xavier). 4 | 5 | Based on the work by James Labocki in the following repo `https://github.com/jameslabocki/keating.git` 6 | 7 | to run it, execute the shell script with a required argument for the number of hosts to include in the payload 8 | 9 | ``` 10 | # ./keating.sh -h #Number_of_Hosts [-c #Number_of_CPUs] 11 | ``` 12 | 13 | Upload the .json payload to Migration Analytics in https://cloud.redhat.com/migrations/migration-analytics/ 14 | 15 | If you want to see how workloads are detected in [Project Xavier](https://github.com/project-xavier) you can review the [Flags](https://github.com/project-xavier/xavier-analytics/blob/master/src/main/resources/org/jboss/xavier/analytics/rules/workload/inventory/Flags.drl) and [Workloads](https://github.com/project-xavier/xavier-analytics/blob/master/src/main/resources/org/jboss/xavier/analytics/rules/workload/inventory/Workloads.drl) rules files. 16 | 17 | 18 | -------------------------------------------------------------------------------- /payloads/payload-generator/keating.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Creates a payload file with certain number of hosts for migration analytics consumption 4 | # ./keating.sh -h 50 will create keating.json with 50 hosts in it 5 | 6 | # Uncomment for debugging. 7 | #set -x 8 | 9 | die () { 10 | echo >&2 "$@" 11 | exit 1 12 | } 13 | 14 | prepare_payload () { 15 | echo "preparing keating.json file to build a payload" 16 | echo "{" > keating.json 17 | } 18 | 19 | add_provider () { 20 | echo "adding mastertemplate.json to keating.json" 21 | cat mastertemplate.json >> keating.json 22 | } 23 | 24 | 25 | add_host () { 26 | i=1 27 | while [[ $i -le $TOTALHOSTS ]]; do 28 | random=$((1 + RANDOM % 4)) 29 | a="${i}1" 30 | b="${i}2" 31 | c="${i}3" 32 | d="${i}4" 33 | e="${i}5" 34 | f="${i}6" 35 | g="${i}7" 36 | h="${i}8" 37 | j="${i}9" 38 | # In place counter vor Hosts 39 | echo -ne "creating host ${i}"\\r 40 | sed -e "s/IDENTIFIER/$i/" \ 41 | -e "s/SHORTNAME/host-$i/" \ 42 | -e "s/VMID1/$a/" \ 43 | -e "s/VMNAME1/analytics-$a/" \ 44 | -e "s/VMEMS1/vm-$a/" \ 45 | -e "s/VMID2/$b/" \ 46 | -e "s/VMNAME2/nyc-$random-$b/" \ 47 | -e "s/VMEMS2/vm-$b/" \ 48 | -e "s/VMID3/$c/" \ 49 | -e "s/VMNAME3/bos--$c/" \ 50 | -e "s/VMEMS3/vm-$c/" \ 51 | -e "s/VMID4/$d/" \ 52 | -e "s/VMNAME4/bos-$random-$d/" \ 53 | -e "s/VMEMS4/vm-$d/" \ 54 | -e "s/VMID5/$e/" \ 55 | -e "s/VMNAME5/den-$e/" \ 56 | -e "s/VMEMS5/vm-$e/" \ 57 | -e "s/VMID6/$f/" \ 58 | -e "s/VMNAME6/web-$f/" \ 59 | -e "s/VMEMS6/vm-$f/" \ 60 | -e "s/VMID7/$g/" \ 61 | -e "s/VMNAME7/proto-$g/" \ 62 | -e "s/VMEMS7/vm-$g/" \ 63 | -e "s/VMID8/$h/" \ 64 | -e "s/VMNAME8/webapp-$random-$h/" \ 65 | -e "s/VMEMS8/vm-$h/" \ 66 | -e "s/VMID9/$j/" \ 67 | -e "s/VMNAME9/infra-$j/" \ 68 | -e "s/VMEMS9/vm-$j/" \ 69 | -e "s/DISKID/0$i/" \ 70 | -e "s/FQDN/host-$i.example.com/g" hosttemplate${random}.json >> keating.json 71 | i=$[$i+1] 72 | done 73 | # Adding new line to on-screen counter. 74 | echo 75 | } 76 | 77 | close_host_list () { 78 | echo "completing host and vm list format" 79 | echo " ]" >> keating.json 80 | echo " }" >> keating.json 81 | echo "removing last comma hack" 82 | #remove comma from the last host instance (cheap and fast method - and unexplainable :) 83 | sed -i '$x;$G;/\(.*\),/!H;//!{$!d}; $!x;$s//\1/;s/^\n//' keating.json 84 | } 85 | 86 | close_provider_list () { 87 | echo "}" >> keating.json 88 | } 89 | 90 | edit_cpu_data () { 91 | echo "editing cpu data" 92 | sed -i -e 's/"cpu_total_cores": 4,/"cpu_total_cores": '"$CPUCOUNT"',/g' keating.json 93 | } 94 | 95 | 96 | #Run parts: 97 | #exit if no arguemts are given 98 | if (( $# < 1 )); then 99 | die "./keating.sh -h #Number_of_Hosts [-c #Number_of_CPUs]" 100 | else 101 | POSITIONAL=() 102 | while [[ $# -gt 0 ]] 103 | do 104 | key="$1" 105 | 106 | case $key in 107 | -h|--hosts|--hypervisors) 108 | TOTALHOSTS="$2" 109 | shift # past argument 110 | shift # past value 111 | ;; 112 | -p|--providers) 113 | TOTALPROVIDERS="$2" 114 | shift # past argument 115 | shift # past value 116 | ;; 117 | -c|--cpu) 118 | CPUCOUNT="$2" 119 | shift # past argument 120 | shift # past value 121 | ;; 122 | *) # unknown option 123 | POSITIONAL+=("$1") # save it in an array for later 124 | shift # past argument 125 | ;; 126 | esac 127 | done 128 | set -- "${POSITIONAL[@]}" # restore positional parameters 129 | fi 130 | prepare_payload 131 | add_provider 132 | add_host 133 | close_host_list 134 | close_provider_list 135 | 136 | if (( $# > 1 )); then 137 | edit_cpu_data 138 | fi 139 | 140 | echo "compressing" 141 | tar -zcvf keating-payload-$(date '+%Y%m%d_%H%M')-$TOTALHOSTS.tar.gz keating.json 142 | rm -f keating.json 143 | -------------------------------------------------------------------------------- /payloads/payload-generator/mastertemplate.json: -------------------------------------------------------------------------------- 1 | "ManageIQ::Providers::Vmware::InfraManager": { 2 | "id": 2, 3 | "name": "VMware", 4 | "type": "ManageIQ::Providers::Vmware::InfraManager", 5 | "guid": "1efeb5bc-8c74-404c-b87c-a2f98798917c", 6 | "uid_ems": "c6339c4f-c58a-4dc5-afbf-49d7ed4fb2b3", 7 | "api_version": "6.5", 8 | "emstype_description": "VMware vCenter", 9 | "hostname": "vcenter.ma.mad.redhat.lan", 10 | "ems_licenses": [ 11 | { 12 | "id": 1, 13 | "ems_ref": "00000-00000-00000-00000-00000", 14 | "name": "Product Evaluation", 15 | "license_key": "00000-00000-00000-00000-00000", 16 | "license_edition": "eval", 17 | "total_licenses": 0, 18 | "used_licenses": null 19 | }, 20 | { 21 | "id": 2, 22 | "ems_ref": "12345-67890-18U9N-021HP-809KJ", 23 | "name": "VMware vCenter Server 6 Standard", 24 | "license_key": "0041L-4CKEL-18U9N-021HP-809KJ", 25 | "license_edition": "vc.standard.instance", 26 | "total_licenses": 600, 27 | "used_licenses": 100 28 | }, 29 | { 30 | "id": 3, 31 | "ems_ref": "12345-67890-N8U8T-0Y0R2-0JTNJ", 32 | "name": "VMware vSphere 6 Enterprise Plus", 33 | "license_key": "12345-67890-N8U8T-0Y0R2-0JTNJ", 34 | "license_edition": "esx.enterprisePlus.cpuPackage", 35 | "total_licenses": 6000, 36 | "used_licenses": 4000 37 | } 38 | ], 39 | "ems_extensions": [ 40 | { 41 | "id": 1, 42 | "ems_ref": "com.vmware.vim.sms", 43 | "key": "com.vmware.vim.sms", 44 | "company": "VMware Inc.", 45 | "label": "VMware vCenter Storage Monitoring Service", 46 | "version": "5.5" 47 | }, 48 | { 49 | "id": 2, 50 | "ems_ref": "com.vmware.vim.vsm", 51 | "key": "com.vmware.vim.vsm", 52 | "company": "VMware Inc.", 53 | "label": "vService Manager", 54 | "version": "6.5" 55 | }, 56 | { 57 | "id": 3, 58 | "ems_ref": "VirtualCenter", 59 | "key": "VirtualCenter", 60 | "company": null, 61 | "label": "VirtualCenter dynamic events and tasks", 62 | "version": "1.0" 63 | }, 64 | { 65 | "id": 4, 66 | "ems_ref": "com.vmware.vim.stats.report", 67 | "key": "com.vmware.vim.stats.report", 68 | "company": null, 69 | "label": "Performance charts built-in extension", 70 | "version": "1.0.0" 71 | }, 72 | { 73 | "id": 5, 74 | "ems_ref": "com.vmware.vim.sps", 75 | "key": "com.vmware.vim.sps", 76 | "company": "VMware Inc.", 77 | "label": "VMware vSphere Profile-driven Storage Service", 78 | "version": "5.0" 79 | }, 80 | { 81 | "id": 6, 82 | "ems_ref": "com.vmware.vim.vcha", 83 | "key": "com.vmware.vim.vcha", 84 | "company": null, 85 | "label": "description", 86 | "version": "1.0" 87 | }, 88 | { 89 | "id": 7, 90 | "ems_ref": "hostdiag", 91 | "key": "hostdiag", 92 | "company": null, 93 | "label": "description", 94 | "version": "1.0" 95 | }, 96 | { 97 | "id": 8, 98 | "ems_ref": "com.vmware.vim.ls", 99 | "key": "com.vmware.vim.ls", 100 | "company": "VMware, Inc.", 101 | "label": "License Services", 102 | "version": "5.0" 103 | }, 104 | { 105 | "id": 9, 106 | "ems_ref": "com.vmware.vim.eam", 107 | "key": "com.vmware.vim.eam", 108 | "company": "VMware Inc.", 109 | "label": "vSphere ESX Agent Manager", 110 | "version": "6.5" 111 | }, 112 | { 113 | "id": 10, 114 | "ems_ref": "com.vmware.rbd", 115 | "key": "com.vmware.rbd", 116 | "company": "VMware, Inc.", 117 | "label": "RuleEngine", 118 | "version": "6.5.0.63200" 119 | }, 120 | { 121 | "id": 11, 122 | "ems_ref": "com.vmware.vsan.health", 123 | "key": "com.vmware.vsan.health", 124 | "company": null, 125 | "label": "VMware vSAN Health Service", 126 | "version": "1.0.0" 127 | }, 128 | { 129 | "id": 12, 130 | "ems_ref": "com.vmware.vmcam", 131 | "key": "com.vmware.vmcam", 132 | "company": "VMware, Inc.", 133 | "label": "vSphere Authentication Proxy", 134 | "version": "6.0" 135 | }, 136 | { 137 | "id": 13, 138 | "ems_ref": "com.vmware.vcIntegrity", 139 | "key": "com.vmware.vcIntegrity", 140 | "company": null, 141 | "label": "VMware vSphere Update Manager Extension", 142 | "version": "6.5.0.39808" 143 | }, 144 | { 145 | "id": 14, 146 | "ems_ref": "com.vmware.ovf", 147 | "key": "com.vmware.ovf", 148 | "company": null, 149 | "label": "Open Virtualization Format Service", 150 | "version": "6.0" 151 | }, 152 | { 153 | "id": 15, 154 | "ems_ref": "com.vmware.vcenter.iso", 155 | "key": "com.vmware.vcenter.iso", 156 | "company": null, 157 | "label": "vSphere ISO Service", 158 | "version": "6.0" 159 | }, 160 | { 161 | "id": 16, 162 | "ems_ref": "com.vmware.cl", 163 | "key": "com.vmware.cl", 164 | "company": null, 165 | "label": "vSphere Content Library Service", 166 | "version": "6.0" 167 | } 168 | ], 169 | "ems_clusters": [ 170 | { 171 | "id": 1, 172 | "name": "V2V_Cluster", 173 | "type": null, 174 | "ems_ref": "domain-c26", 175 | "v_parent_datacenter": "V2V-DC" 176 | } 177 | ], 178 | "hosts": [ 179 | -------------------------------------------------------------------------------- /playbooks/ansible_hosts: -------------------------------------------------------------------------------- 1 | # This is the default ansible 'hosts' file. 2 | # It should live in /etc/ansible/hosts 3 | # 4 | # - Comments begin with the '#' character 5 | # - Blank lines are ignored 6 | # - Groups of hosts are delimited by [header] elements 7 | # - You can enter hostnames or ip addresses 8 | # - A hostname/ip can be a member of multiple groups 9 | 10 | [infra:children] 11 | infra_vsphere 12 | infra_other 13 | 14 | [infra_vsphere] 15 | esx1.example.com ansible_python_interpreter=/bin/python 16 | esx2.example.com ansible_python_interpreter=/bin/python 17 | vcenter.example.com ansible_python_interpreter=/usr/bin/python 18 | 19 | [infra_other] 20 | workstation.example.com ansible_python_interpreter=/usr/bin/python 21 | storage.example.com ansible_python_interpreter=/usr/bin/python 22 | cf.example.com ansible_python_interpreter=/usr/libexec/platform-python 23 | 24 | [vms] 25 | lb.example.com 26 | jboss0.example.com 27 | jboss1.example.com 28 | db.example.com 29 | tomcat.example.com 30 | hana.example.com 31 | oracledb.example.com 32 | mssql.example.com 33 | weblogic.example.com 34 | websphere.example.com 35 | 36 | -------------------------------------------------------------------------------- /playbooks/loops/loop_cluster0_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start cluster0 virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: cluster0 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for cluster0 running 14 | wait_for: 15 | port: 22 16 | host: cluster0.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off cluster0 virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: cluster0 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_cluster0_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_cluster1_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start cluster1 virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: cluster1 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for cluster1 running 14 | wait_for: 15 | port: 22 16 | host: cluster1.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off cluster1 virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: cluster1 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_cluster1_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_db_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start db virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: db 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for db running 14 | wait_for: 15 | port: 5432 16 | host: db.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | rescue: 21 | - name: Force off db virtual machine 22 | vmware_guest: 23 | hostname: "{{ vcenter_ip }}" 24 | username: "{{ vcenter_username }}" 25 | password: "{{ vcenter_password }}" 26 | validate_certs: False 27 | name: db 28 | state: poweredoff 29 | delegate_to: localhost 30 | ignore_errors: yes 31 | 32 | - pause: 33 | seconds: 10 34 | 35 | - name: Try again 36 | include_tasks: loop_db_vm.yml 37 | -------------------------------------------------------------------------------- /playbooks/loops/loop_freebsd_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start freebsd virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: freebsd 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for freebsd running 14 | wait_for: 15 | port: 22 16 | host: freebsd.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off freebsd virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: freebsd 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_freebsd_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_hana_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start hana virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: hana 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for hana running 14 | wait_for: 15 | port: 22 16 | host: hana.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off hana virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: hana 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_hana_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_jboss0_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start jboss0 virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: jboss0 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for jboss0 running 14 | wait_for: 15 | port: 8443 16 | host: jboss0.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | rescue: 21 | - name: Force off jboss0 virtual machine 22 | vmware_guest: 23 | hostname: "{{ vcenter_ip }}" 24 | username: "{{ vcenter_username }}" 25 | password: "{{ vcenter_password }}" 26 | validate_certs: False 27 | name: jboss0 28 | state: poweredoff 29 | delegate_to: localhost 30 | ignore_errors: yes 31 | 32 | - pause: 33 | seconds: 10 34 | 35 | - name: Try again 36 | include_tasks: loop_jboss0_vm.yml 37 | -------------------------------------------------------------------------------- /playbooks/loops/loop_jboss1_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start jboss1 virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: jboss1 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for jboss1 running 14 | wait_for: 15 | port: 8443 16 | host: jboss1.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | rescue: 21 | - name: Force off jboss1 virtual machine 22 | vmware_guest: 23 | hostname: "{{ vcenter_ip }}" 24 | username: "{{ vcenter_username }}" 25 | password: "{{ vcenter_password }}" 26 | validate_certs: False 27 | name: jboss1 28 | state: poweredoff 29 | delegate_to: localhost 30 | ignore_errors: yes 31 | 32 | - pause: 33 | seconds: 10 34 | 35 | - name: Try again 36 | include_tasks: loop_jboss1_vm.yml 37 | -------------------------------------------------------------------------------- /playbooks/loops/loop_lb_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start lb virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: lb 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for lb running 14 | wait_for: 15 | port: 443 16 | host: lb.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off lb virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: lb 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_lb_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_mssql_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start mssql virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: mssql_db 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for mssql running 14 | wait_for: 15 | port: 22 16 | host: mssql.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off mssql virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: mssql_db 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_mssql_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_oracledb_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start oracle virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: oracle_db 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for oracle running 14 | wait_for: 15 | port: 22 16 | host: oracledb.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off oracle virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: oracle_db 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_oracledb_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_tomcat_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start tomcat virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: tomcat 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for tomcat running 14 | wait_for: 15 | port: 8080 16 | host: tomcat.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off tomcat virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: tomcat 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_tomcat_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_weblogic_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start weblogic virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: weblogic 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for weblogic running 14 | wait_for: 15 | port: 7001 16 | host: weblogic.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off weblogic virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: weblogic 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_weblogic_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/loops/loop_websphere_vm.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - block: 3 | - name: Start websphere virtual machine 4 | vmware_guest: 5 | hostname: "{{ vcenter_ip }}" 6 | username: "{{ vcenter_username }}" 7 | password: "{{ vcenter_password }}" 8 | validate_certs: False 9 | name: websphere 10 | state: poweredon 11 | delegate_to: localhost 12 | 13 | - name: Check for websphere running 14 | wait_for: 15 | port: 22 16 | host: websphere.example.com 17 | delay: 3 18 | timeout: 90 19 | 20 | 21 | rescue: 22 | - name: Force off websphere virtual machine 23 | vmware_guest: 24 | hostname: "{{ vcenter_ip }}" 25 | username: "{{ vcenter_username }}" 26 | password: "{{ vcenter_password }}" 27 | validate_certs: False 28 | name: websphere 29 | state: poweredoff 30 | delegate_to: localhost 31 | ignore_errors: yes 32 | 33 | - pause: 34 | seconds: 10 35 | 36 | - name: Try again 37 | include_tasks: loop_websphere_vm.yml 38 | -------------------------------------------------------------------------------- /playbooks/prepare.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: all 3 | roles: 4 | - prepare 5 | -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for rhel -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/files/chrony.conf: -------------------------------------------------------------------------------- 1 | # Use public servers from the pool.ntp.org project. 2 | # Please consider joining the pool (http://www.pool.ntp.org/join.html). 3 | server 0.rhel.pool.ntp.org iburst 4 | server 1.rhel.pool.ntp.org iburst 5 | server 2.rhel.pool.ntp.org iburst 6 | server 3.rhel.pool.ntp.org iburst 7 | 8 | # Record the rate at which the system clock gains/losses time. 9 | driftfile /var/lib/chrony/drift 10 | 11 | # Allow the system clock to be stepped in the first three updates 12 | # if its offset is larger than 1 second. 13 | makestep 1.0 3 14 | 15 | # Enable kernel synchronization of the real-time clock (RTC). 16 | rtcsync 17 | 18 | # Enable hardware timestamping on all interfaces that support it. 19 | #hwtimestamp * 20 | 21 | # Increase the minimum number of selectable sources required to adjust 22 | # the system clock. 23 | #minsources 2 24 | 25 | # Allow NTP client access from local network. 26 | #allow 192.168.0.0/16 27 | 28 | # Serve time even if not synchronized to a time source. 29 | #local stratum 10 30 | 31 | # Specify file containing keys for NTP authentication. 32 | #keyfile /etc/chrony.keys 33 | 34 | # Specify directory for log files. 35 | logdir /var/log/chrony 36 | 37 | # Select which information is logged. 38 | #log measurements statistics tracking 39 | 40 | -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/files/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 2 | ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 3 | 4 | 192.168.0.10 workstation.example.com workstation 5 | 192.168.0.254 storage.example.com storage 6 | 192.168.0.100 cf.example.com cf 7 | 192.168.0.41 kvm1.example.com kvm1 8 | 192.168.0.42 kvm2.example.com kvm2 9 | 192.168.0.35 rhvm.example.com rhvm 10 | 192.168.0.51 esx1.example.com esx1 11 | 192.168.0.52 esx2.example.com esx2 12 | 192.168.0.50 vcenter.example.com vcenter 13 | 14 | 10.9.0.100 app.example.com app 15 | 10.10.0.100 lb.example.com lb 16 | 10.10.0.110 jboss0.example.com jboss0 17 | 10.10.0.111 jboss1.example.com jboss1 18 | 10.10.0.120 db.example.com db 19 | 20 | 192.168.0.60 director.example.com director 21 | 192.168.10.19 horizon.example.com horizon 22 | 10.100.0.111 controller.example.com controller 23 | 10.100.0.105 compute0.example.com compute0 24 | 10.100.0.107 compute1.example.com compute1 25 | 26 | -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for rhel 3 | 4 | - name: Start Chrony 5 | service: 6 | name: chronyd 7 | state: started 8 | 9 | - name: Restart Chrony 10 | service: 11 | name: chronyd 12 | state: restarted 13 | 14 | -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Miguel Pérez Colino 3 | description: Having fun with Ansible 4 | company: Red Hat 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: Apache 18 | 19 | min_ansible_version: 1.2 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # Optionally specify the branch Galaxy will use when accessing the GitHub 25 | # repo for this role. During role install, if no tags are available, 26 | # Galaxy will use this branch. During import Galaxy will access files on 27 | # this branch. If Travis integration is configured, only notifications for this 28 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 29 | # (usually master) will be used. 30 | #github_branch: 31 | 32 | # 33 | # platforms is a list of platforms, and each platform has a name and a list of versions. 34 | # 35 | # platforms: 36 | # - name: Fedora 37 | # versions: 38 | # - all 39 | # - 25 40 | # - name: SomePlatform 41 | # versions: 42 | # - all 43 | # - 1.0 44 | # - 7 45 | # - 99.99 46 | 47 | galaxy_tags: [] 48 | # List tags for your role here, one per line. A tag is a keyword that describes 49 | # and categorizes the role. Users find roles by searching for tags. Be sure to 50 | # remove the '[]' above, if you add tags to this list. 51 | # 52 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 53 | # Maximum 20 tags per role. 54 | 55 | dependencies: [] 56 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 57 | # if you add dependencies to this list. 58 | -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for rhel 3 | # 4 | 5 | - name: Copy hosts file 6 | copy: 7 | src: hosts 8 | dest: /etc/hosts 9 | backup: yes 10 | 11 | #- name: Disable external subs 12 | # command: 'subscription-manager repos --disable=*' 13 | # ignore_errors: yes 14 | # when: ansible_distribution == 'RedHat' 15 | 16 | - block: 17 | - name: Install Packages 18 | yum: 19 | name: '{{ item }}' 20 | state: present 21 | with_items: 22 | - bash-completion 23 | - vim 24 | - lsof 25 | 26 | - name: Update OS 27 | yum: 28 | name: '*' 29 | state: latest 30 | 31 | - name: Uninstall NTP 32 | yum: 33 | name: ntp 34 | state: absent 35 | 36 | - name: Install Chrony 37 | yum: 38 | name: chrony 39 | state: latest 40 | notify: 41 | - Start Chrony 42 | 43 | - name: Enable Chrony 44 | service: 45 | name: chronyd 46 | enabled: yes 47 | state: started 48 | 49 | - name: Copy Chrony config 50 | copy: 51 | src: chrony.conf 52 | dest: /etc/chrony.conf 53 | backup: yes 54 | notify: 55 | - Restart Chrony 56 | 57 | when: ansible_distribution == 'RedHat' 58 | -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - rhel -------------------------------------------------------------------------------- /playbooks/roles/chrony/prepare/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for rhel -------------------------------------------------------------------------------- /playbooks/roles/prepare/README.md: -------------------------------------------------------------------------------- 1 | Role Name 2 | ========= 3 | 4 | A brief description of the role goes here. 5 | 6 | Requirements 7 | ------------ 8 | 9 | Any pre-requisites that may not be covered by Ansible itself or the role should be mentioned here. For instance, if the role uses the EC2 module, it may be a good idea to mention in this section that the boto package is required. 10 | 11 | Role Variables 12 | -------------- 13 | 14 | A description of the settable variables for this role should go here, including any variables that are in defaults/main.yml, vars/main.yml, and any variables that can/should be set via parameters to the role. Any variables that are read from other roles and/or the global scope (ie. hostvars, group vars, etc.) should be mentioned here as well. 15 | 16 | Dependencies 17 | ------------ 18 | 19 | A list of other roles hosted on Galaxy should go here, plus any details in regards to parameters that may need to be set for other roles, or variables that are used from other roles. 20 | 21 | Example Playbook 22 | ---------------- 23 | 24 | Including an example of how to use your role (for instance, with variables passed in as parameters) is always nice for users too: 25 | 26 | - hosts: servers 27 | roles: 28 | - { role: username.rolename, x: 42 } 29 | 30 | License 31 | ------- 32 | 33 | BSD 34 | 35 | Author Information 36 | ------------------ 37 | 38 | An optional section for the role authors to include contact information, or a website (HTML is not allowed). 39 | -------------------------------------------------------------------------------- /playbooks/roles/prepare/defaults/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # defaults file for rhel -------------------------------------------------------------------------------- /playbooks/roles/prepare/files/base_infra_migration.repo: -------------------------------------------------------------------------------- 1 | # 2 | # File /etc/yum.repos.d/base_infra_migration.repo 3 | # Local base repos for enablement environment 4 | # 5 | [rhel-7-server-rpms] 6 | name=Local RHEL 7 7 | baseurl=http://storage.example.com/repos/rhel-7-server-rpms 8 | enabled=1 9 | gpgcheck=1 10 | 11 | [rhel-7-server-rh-common-rpms] 12 | name=Local RHV 4 management agents 13 | baseurl=http://storage.example.com/repos/rhel-7-server-rhv-4-mgmt-agent-rpms 14 | enabled=0 15 | gpgcheck=1 16 | 17 | [rhel-7-server-ansible-2-rpms] 18 | name=Local Ansible 2 19 | baseurl=http://storage.example.com/repos/rhel-7-server-ansible-2-rpms 20 | enabled=0 21 | gpgcheck=1 22 | 23 | [rhel-7-server-source-rpms] 24 | name=Local RHEL 7 Source 25 | baseurl=http://storage.example.com/repos/rhel-7-server-source-rpms 26 | enabled=0 27 | gpgcheck=1 28 | 29 | -------------------------------------------------------------------------------- /playbooks/roles/prepare/files/hosts: -------------------------------------------------------------------------------- 1 | 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 2 | ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 3 | 4 | 192.168.0.10 workstation.example.com workstation 5 | 10.9.0.10 workstation-9.example.com workstation-9 6 | 10.10.0.10 workstation-10.example.com workstation-10 7 | 8 | 192.168.0.254 storage.example.com storage 9 | 192.168.0.100 cf.example.com cf 10 | 192.168.0.41 kvm1.example.com kvm1 11 | 192.168.0.42 kvm2.example.com kvm2 12 | 192.168.0.35 rhvm.example.com rhvm 13 | 192.168.0.51 esx1.example.com esx1 14 | 192.168.0.52 esx2.example.com esx2 15 | 192.168.0.50 vcenter.example.com vcenter 16 | 17 | 10.9.0.100 app.example.com app 18 | 10.10.0.7 rhel7.example.com rhel7 19 | 10.10.0.8 shareddisk1.example.com shareddisk1 20 | 10.10.0.9 shareddisk2.example.com shareddisk2 21 | 10.10.0.12 freebsd.example.com freebsd 22 | 10.10.0.100 lb.example.com lb 23 | 10.10.0.110 jboss0.example.com jboss0 24 | 10.10.0.111 jboss1.example.com jboss1 25 | 10.10.0.120 db.example.com db 26 | 10.10.0.130 hana.example.com hana 27 | 10.10.0.160 oracledb.example.com oracledb 28 | 10.10.0.180 tomcat.example.com tomcat 29 | 10.10.0.181 weblogic.example.com weblogic 30 | 10.10.0.182 websphere.example.com websphere 31 | 10.10.0.190 mssql.example.com mssql 32 | 33 | 192.168.0.60 director.example.com director 34 | 192.168.10.19 horizon.example.com horizon 35 | 10.100.0.111 controller.example.com controller 36 | 10.100.0.105 compute0.example.com compute0 37 | 10.100.0.107 compute1.example.com compute1 38 | 39 | 192.168.0.151 conversion.example.com conversion 40 | 41 | 10.9.0.17 rhel76.example.com rhel76 42 | 10.10.0.13 cirros.example.com cirros 43 | -------------------------------------------------------------------------------- /playbooks/roles/prepare/handlers/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # handlers file for rhel 3 | 4 | - name: Start Chrony 5 | service: 6 | name: chronyd 7 | state: started 8 | 9 | - name: Restart Chrony 10 | service: 11 | name: chronyd 12 | state: restarted 13 | 14 | -------------------------------------------------------------------------------- /playbooks/roles/prepare/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Miguel Pérez Colino 3 | description: Having fun with Ansible 4 | company: Red Hat 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: Apache 18 | 19 | min_ansible_version: 1.2 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # Optionally specify the branch Galaxy will use when accessing the GitHub 25 | # repo for this role. During role install, if no tags are available, 26 | # Galaxy will use this branch. During import Galaxy will access files on 27 | # this branch. If Travis integration is configured, only notifications for this 28 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 29 | # (usually master) will be used. 30 | #github_branch: 31 | 32 | # 33 | # platforms is a list of platforms, and each platform has a name and a list of versions. 34 | # 35 | # platforms: 36 | # - name: Fedora 37 | # versions: 38 | # - all 39 | # - 25 40 | # - name: SomePlatform 41 | # versions: 42 | # - all 43 | # - 1.0 44 | # - 7 45 | # - 99.99 46 | 47 | galaxy_tags: [] 48 | # List tags for your role here, one per line. A tag is a keyword that describes 49 | # and categorizes the role. Users find roles by searching for tags. Be sure to 50 | # remove the '[]' above, if you add tags to this list. 51 | # 52 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 53 | # Maximum 20 tags per role. 54 | 55 | dependencies: [] 56 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 57 | # if you add dependencies to this list. 58 | -------------------------------------------------------------------------------- /playbooks/roles/prepare/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # tasks file for prepare 3 | # 4 | 5 | - name: Copy hosts file 6 | copy: 7 | src: hosts 8 | dest: /etc/hosts 9 | backup: yes 10 | 11 | - name: Disable external subs 12 | command: 'subscription-manager repos --disable=*' 13 | ignore_errors: yes 14 | when: ansible_distribution == 'RedHat' 15 | 16 | - block: 17 | - name: Install Packages 18 | yum: 19 | name: '{{ item }}' 20 | state: present 21 | with_items: 22 | - bash-completion 23 | - vim 24 | - lsof 25 | ignore_errors: yes 26 | 27 | - name: Update OS 28 | yum: 29 | name: '*' 30 | state: latest 31 | ignore_errors: yes 32 | 33 | when: ansible_distribution == 'RedHat' 34 | -------------------------------------------------------------------------------- /playbooks/roles/prepare/tests/inventory: -------------------------------------------------------------------------------- 1 | localhost 2 | 3 | -------------------------------------------------------------------------------- /playbooks/roles/prepare/tests/test.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: localhost 3 | remote_user: root 4 | roles: 5 | - rhel -------------------------------------------------------------------------------- /playbooks/roles/prepare/vars/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # vars file for rhel -------------------------------------------------------------------------------- /playbooks/roles/unconfigure_cf/README.md: -------------------------------------------------------------------------------- 1 | CloudForms Unconfigure Playbook 2 | ========= 3 | 4 | This playbook unconfigures a Cloudforms / ManageIQ appliace to leave it as just deployed (with DB configured). 5 | It takes care of properly unconfiguring the Ansible role in CloudForms 6 | 7 | Requirements 8 | ------------ 9 | 10 | Tested with Cloudforms 4.7 11 | 12 | Role Variables 13 | -------------- 14 | 15 | No variables required to run this playbook. 16 | CloudForms / ManageIQ requires the var "DISABLE_DATABASE_ENVIRONMENT_CHECK" to be set to 1. 17 | 18 | Dependencies 19 | ------------ 20 | 21 | No dependencies required 22 | 23 | Example Playbook 24 | ---------------- 25 | 26 | --- 27 | - hosts: cf.example.com 28 | roles: 29 | - unconfigure_cf 30 | 31 | vars: 32 | rails_env: 33 | DISABLE_DATABASE_ENVIRONMENT_CHECK: 1 34 | 35 | License 36 | ------- 37 | 38 | BSD 39 | 40 | Author Information 41 | ------------------ 42 | 43 | Miguel Pérez Colino @mperezco at GitHub, @mmmmmmpc at Twitter. 44 | -------------------------------------------------------------------------------- /playbooks/roles/unconfigure_cf/meta/main.yml: -------------------------------------------------------------------------------- 1 | galaxy_info: 2 | author: Miguel Pérez Colino 3 | description: Having fun with Ansible 4 | company: Red Hat 5 | 6 | # If the issue tracker for your role is not on github, uncomment the 7 | # next line and provide a value 8 | # issue_tracker_url: http://example.com/issue/tracker 9 | 10 | # Some suggested licenses: 11 | # - BSD (default) 12 | # - MIT 13 | # - GPLv2 14 | # - GPLv3 15 | # - Apache 16 | # - CC-BY 17 | license: Apache 18 | 19 | min_ansible_version: 1.2 20 | 21 | # If this a Container Enabled role, provide the minimum Ansible Container version. 22 | # min_ansible_container_version: 23 | 24 | # Optionally specify the branch Galaxy will use when accessing the GitHub 25 | # repo for this role. During role install, if no tags are available, 26 | # Galaxy will use this branch. During import Galaxy will access files on 27 | # this branch. If Travis integration is configured, only notifications for this 28 | # branch will be accepted. Otherwise, in all cases, the repo's default branch 29 | # (usually master) will be used. 30 | #github_branch: 31 | 32 | # 33 | # platforms is a list of platforms, and each platform has a name and a list of versions. 34 | # 35 | # platforms: 36 | # - name: Fedora 37 | # versions: 38 | # - all 39 | # - 25 40 | # - name: SomePlatform 41 | # versions: 42 | # - all 43 | # - 1.0 44 | # - 7 45 | # - 99.99 46 | 47 | galaxy_tags: [] 48 | # List tags for your role here, one per line. A tag is a keyword that describes 49 | # and categorizes the role. Users find roles by searching for tags. Be sure to 50 | # remove the '[]' above, if you add tags to this list. 51 | # 52 | # NOTE: A tag is limited to a single word comprised of alphanumeric characters. 53 | # Maximum 20 tags per role. 54 | 55 | dependencies: [] 56 | # List your role dependencies here, one per line. Be sure to remove the '[]' above, 57 | # if you add dependencies to this list. 58 | -------------------------------------------------------------------------------- /playbooks/roles/unconfigure_cf/tasks/main.yml: -------------------------------------------------------------------------------- 1 | --- 2 | # Unconfigure role for CloudForms 5.0+ 3 | # 4 | 5 | - name: Stop EVM services 6 | service: 7 | name: '{{ item }}' 8 | state: stopped 9 | with_items: 10 | - evm-watchdog.service 11 | - evmserverd.service 12 | 13 | - name: Reset CloudForms database 14 | command: rake evm:db:reset 15 | args: 16 | chdir: /var/www/miq/vmdb 17 | environment: '{{ rails_env }}' 18 | 19 | - name: Cleanup VDDK files 20 | file: 21 | path: '{{ item }}' 22 | state: absent 23 | with_items: 24 | - /usr/lib/libvixDiskLib.so 25 | - /usr/lib/libvixDiskLib.so.6 26 | - /usr/lib/vmware-vix-disklib/ 27 | ignore_errors: yes 28 | 29 | - name: Library reconfiguration after VDDK cleanup 30 | shell: /usr/sbin/ldconfig 31 | ignore_errors: yes 32 | 33 | - name: Start EVM services 34 | service: 35 | name: '{{ item }}' 36 | state: started 37 | with_items: 38 | - evm-watchdog.service 39 | - evmserverd.service 40 | 41 | -------------------------------------------------------------------------------- /playbooks/start_vms.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: workstation.example.com 3 | become: true 4 | tasks: 5 | - set_fact: 6 | conn_ok: false 7 | 8 | - name: Wait for NFS to be available 9 | wait_for: 10 | port: 2049 11 | host: storage.example.com 12 | delay: 10 13 | timeout: 1200 14 | 15 | - name: Wait for ESX and vCenter servers port 443 to be available 16 | wait_for: 17 | port: 443 18 | host: "{{ item }}" 19 | delay: 10 20 | timeout: 1200 21 | with_items: 22 | - esx1.example.com 23 | - esx2.example.com 24 | - vcenter.example.com 25 | 26 | - name: Wait for vCenter port 9443 to be available 27 | wait_for: 28 | port: 9443 29 | host: vcenter.example.com 30 | delay: 10 31 | timeout: 1200 32 | 33 | - name: Wait for vCenter port 5480 to be available 34 | wait_for: 35 | port: 5480 36 | host: vcenter.example.com 37 | delay: 10 38 | timeout: 1200 39 | 40 | - name: Wait for vCenter port 8084 to be available 41 | wait_for: 42 | port: 8084 43 | host: vcenter.example.com 44 | delay: 10 45 | timeout: 1200 46 | 47 | - name: Start db 48 | include_tasks: loops/loop_db_vm.yml 49 | 50 | - name: Start jboss0 51 | include_tasks: loops/loop_jboss0_vm.yml 52 | 53 | - name: Start jboss1 54 | include_tasks: loops/loop_jboss1_vm.yml 55 | 56 | - name: Start lb 57 | include_tasks: loops/loop_lb_vm.yml 58 | 59 | - name: Start tomcat 60 | include_tasks: loops/loop_tomcat_vm.yml 61 | 62 | - name: Start weblogic 63 | include_tasks: loops/loop_weblogic_vm.yml 64 | 65 | - name: Start websphere 66 | include_tasks: loops/loop_websphere_vm.yml 67 | 68 | - name: Start FreeBSD 69 | include_tasks: loops/loop_freebsd_vm.yml 70 | 71 | - name: Start HANA 72 | include_tasks: loops/loop_hana_vm.yml 73 | 74 | - name: Start MS SQL Server 75 | include_tasks: loops/loop_mssql_vm.yml 76 | 77 | - name: Start Oracle DB Server 78 | include_tasks: loops/loop_oracledb_vm.yml 79 | 80 | - name: Start Cluster0 81 | include_tasks: loops/loop_cluster0_vm.yml 82 | 83 | - name: Start Cluster1 84 | include_tasks: loops/loop_cluster1_vm.yml 85 | 86 | - name: Check powerstate on VMs 87 | vmware_guest: 88 | hostname: "{{ vcenter_ip }}" 89 | username: "{{ vcenter_username }}" 90 | password: "{{ vcenter_password }}" 91 | validate_certs: False 92 | name: "{{ item }}" 93 | state: poweredon 94 | delegate_to: localhost 95 | ignore_errors: yes 96 | with_items: 97 | - db 98 | - jboss0 99 | - jboss1 100 | - lb 101 | - tomcat 102 | - weblogic 103 | - websphere 104 | - freebsd 105 | - hana 106 | - mssql_db 107 | - oracle_db 108 | - wmssql_db 109 | - cluster0 110 | - cluster1 111 | -------------------------------------------------------------------------------- /playbooks/start_vms_vars.yml.example: -------------------------------------------------------------------------------- 1 | --- 2 | 3 | vcenter_ip: 4 | vcenter_username: 5 | vcenter_password: 6 | 7 | -------------------------------------------------------------------------------- /playbooks/stop_vms.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: workstation.example.com 3 | become: true 4 | tasks: 5 | - set_fact: 6 | conn_ok: false 7 | 8 | - name: Shutdown gracefully VMs 9 | vmware_guest: 10 | hostname: "{{ vcenter_ip }}" 11 | username: "{{ vcenter_username }}" 12 | password: "{{ vcenter_password }}" 13 | validate_certs: False 14 | name: "{{ item }}" 15 | state: shutdownguest 16 | delegate_to: localhost 17 | ignore_errors: yes 18 | with_items: 19 | - hana 20 | - mssql_db 21 | - oracle_db 22 | - wmssql_db 23 | - tomcat 24 | - weblogic 25 | - websphere 26 | - db 27 | - jboss0 28 | - jboss1 29 | - lb 30 | - freebsd 31 | - cluster0 32 | - cluster1 33 | -------------------------------------------------------------------------------- /playbooks/unconfigure_cf.yml: -------------------------------------------------------------------------------- 1 | --- 2 | - hosts: cf.example.com 3 | roles: 4 | - unconfigure_cf 5 | 6 | vars: 7 | rails_env: 8 | DISABLE_DATABASE_ENVIRONMENT_CHECK: 1 9 | 10 | --------------------------------------------------------------------------------