{"id":13501793,"url":"https://github.com/SatelliteQE/satellite6-upgrade","last_synced_at":"2025-03-29T09:31:30.010Z","repository":{"id":19510808,"uuid":"87206526","full_name":"SatelliteQE/satellite6-upgrade","owner":"SatelliteQE","description":"Satellite 6 upgrade related tools","archived":true,"fork":false,"pushed_at":"2024-06-17T18:58:33.000Z","size":881,"stargazers_count":8,"open_issues_count":36,"forks_count":23,"subscribers_count":26,"default_branch":"master","last_synced_at":"2024-10-31T20:41:14.934Z","etag":null,"topics":["foreman","katello","redhat-qe","satellite6","satellite6qe"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SatelliteQE.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-04-04T15:52:14.000Z","updated_at":"2024-07-22T12:18:50.000Z","dependencies_parsed_at":"2023-02-17T12:40:14.976Z","dependency_job_id":"17dc140e-675c-470e-882a-401f398ac56f","html_url":"https://github.com/SatelliteQE/satellite6-upgrade","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatelliteQE%2Fsatellite6-upgrade","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatelliteQE%2Fsatellite6-upgrade/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatelliteQE%2Fsatellite6-upgrade/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SatelliteQE%2Fsatellite6-upgrade/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SatelliteQE","download_url":"https://codeload.github.com/SatelliteQE/satellite6-upgrade/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246167452,"owners_count":20734381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["foreman","katello","redhat-qe","satellite6","satellite6qe"],"created_at":"2024-07-31T22:01:50.541Z","updated_at":"2025-03-29T09:31:29.729Z","avatar_url":"https://github.com/SatelliteQE.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# Satellite6-upgrade\n\nSatellite6 upgrade contains a set of tools that helps to perform various upgrade specific scenarios and\nmoreover, it helps to validate data between pre and post upgrade to ensure data integrity after upgrade.\n\n**The major tasks of Satellite6 upgrade are:**\n\n1. Create and delete satellite/capsule instances using RHEVM templates/Openstack images\n2. Upgrade Satellite6, Capsule instances spawn from RHEVM templates and\nclients generated through docker\n3. In case user has its own existing satellite/capsule and clients setup and wants to perform upgrade then\nSatellite6 upgrade has the capability to perform upgrade on user provided setups\n4. Performs data validation post upgrade to ensure the entities created before upgrade\nexists post upgrade as well\n\n**Supported Upgrade Paths are:**\n\nProduct | Major Version | zStream\n--------|----------------|---------\nSatellite| 6.1 -\u003e 6.2 and 6.2-\u003e 6.3  | 6.1 -\u003e 6.1 and 6.2 -\u003e 6.2\nCapsule | 6.1 -\u003e 6.2 and 6.2-\u003e 6.3 | 6.1 -\u003e 6.1 and 6.2 -\u003e 6.2\nClients | 6.1 -\u003e 6.2 and 6.2-\u003e 6.3 | 6.1 -\u003e 6.1 and 6.2 -\u003e 6.2\n\n## Installation\n\n Satellite6-Upgrade depends on ```pycurl``` being installed, but installing it,\n specially on a virtual environment is not straight forward. You must run the\n [pycurl install script](https://github.com/SatelliteQE/robottelo-ci/blob/master/scripts/pip-install-pycurl.sh) in order to have ```pycurl``` installed properly.\n\nFinally, python packages listed in ```requirements.txt``` must be installed before\nsatellite6-upgrade can be used:\n\n    pip install -r requirements.txt\n\n## Basic Usage Examples\n\n### Create Satellite/Capsule Instance from RHEVM template\nTo create a live satellite/capsule instance from RHEVM template:\n*Pre-Conditions: The template should have a satellite/capsule populated in it already.*\n\n    RHEV_USER=\u003cuser@domain\u003e RHEV_PASSWD=\u003cpasswd\u003e RHEV_URL='https://\u003crhev_url:port\u003e/api'\n    fab create_rhevm_instance:\u003cnew_instance_name\u003e,\u003ctemplate_name\u003e,\u003cdatacenter\u003e,\u003cquota\u003e,\n    \u003ccluster\u003e,\u003ctimeout_in_minutes\u003e\n\n### Delete Satellite/Capule Instance from RHEVM template\nTo delete a satellite/capsule instance from RHEVM template:\n*Pre-Condition - The instance should be already created*\n\n    RHEV_USER=\u003cuser@domain\u003e RHEV_PASSWD=\u003cpasswd\u003e RHEV_URL='https://\u003crhev_url:port\u003e/api'\n    fab delete_rhevm_instance:\u003cnew_instance_name\u003e,\u003ctimeout_in_minutes\u003e\n\n## Upgrade\n\n**Following are the upgrade type we support:**\n\n1. Satellite\n    * Upgrades only Satellite and NOT its capsule nor clients\n2. Capsule\n    * Upgrades Capsule and its associated Satellite and NOT clients\n3. Clients\n    * Upgrades Clients and its associated Satellite and NOT capsule\n4. Longrun\n    * Upgrades Satellite, Capsules and clients\n\nWe would need different environment variables and fab commands depends on Upgrade Types.\n\nAs we look in usage examples above, the command is consisted of mainly two parts:\n1. ```Environment variables```\nAgain, environment variables required for each upgrade type has been divided into\nparts and its subparts, those are:\n    * Common Environment Variables required for all types of upgrade\n    * Environment Variables required for specific type of upgrade\n        * Downstream Environment Variables\n        * CDN Environment Variable\n        * RHEVM Environment Variables\n        * User Setup Environment Variables\n2. ```fab commands```\nAfter Setting Environment Variables in Shell, We are good to run fab commands that will run upgrades on setup.\n\n### Environment Variables:\n#### Common Environment Variables required for all types and combinations of upgrade\n\n    1. FROM_VERSION=\u003cpreSat_ver\u003e TO_VERSION=\u003cnextSat_ver\u003e OS=\u003crhel6|rhel7\u003e\n    2. Set FROM_VERSION and TO_VERSION to same current satellite version for Z-Stream Upgrade\n\n#### Environment Variables required for specific type of upgrade\n\n##### SATELLITE UPGRADE\n**Environment Variables for only Satellite Upgrade**\n\n**Downstream Environment Variables**\n\n    BASE_URL=\u003csatellite_downstream_base_url_from_snap\u003e\n\n**CDN Environment Variables**\n\n    Dont set BASE_URL environment variable\n\n**RHEVM Environment Variables**\n\n    RHEV_SAT_IMAGE=\u003csat_image\u003e RHEV_SAT_HOST=\u003crhev_sat_hostname\u003e\n    RHEV_USER=\u003crhev_user\u003e RHEV_PASSWD=\u003crhev_passwd\u003e RHEV_URL=\u003crhev_url:443/api\u003e\n    RHN_USERNAME=\u003crhn_user\u003e RHN_POOLID=\u003crhn_pool\u003e RHN_PASSWORD=\u003crhn_pass\u003e\n\n**User Setup Environment Variables**\n\n    1. SATELLITE_HOSTNAME=\u003csatellite_hostname\u003e\n    2. Don't set any RHEVM Environment Variable\n\n##### CAPSULE UPGRADE\n**Environment Variables for both Satellite and Capsule Upgrade**\n\n**Downstream Environment Variables**\n\n    1. CAPSULE_URL=\u003ccapsule_downstream_url_from_snap\u003e RHEV_CAPSULE_AK=\u003cak_name_for_capsule_subscription\u003e\n    2. Satellite Downstream environment Variables\n\n**CDN Environment Variables**\n\n    1. Don't set BASE_URL and CAPSULE_URL environment variable\n    2. RHEV_CAPSULE_AK=\u003cak_name_for_capsule_subscription\u003e\n\n**RHEVM Environment Variables**\n\n    1. RHEV_CAP_IMAGE=\u003ccap_image_name\u003e RHEV_CAP_HOST=\u003crhev_cap_hostname\u003e\n    RHEV_USER=\u003crhev_user\u003e RHEV_PASSWD=\u003crhev_passwd\u003e RHEV_URL=\u003crhev_url:443/api\u003e\n    RHN_USERNAME=\u003crhn_user\u003e RHN_POOLID=\u003crhn_pool\u003e RHN_PASSWORD=\u003crhn_pass\u003e\n    2. Satellite RHEVM environment variables\n\n**User Setup Environment Variables**\n\n    1. CAPSULE_HOSTNAMES=\u003ccaps_hostname1, caps_hostname2, ...\u003e\n    2. Don't set any RHEVM Environment Variable\n    3. Satellite User Setup environment Variables\n\n##### CLIENTS UPGRADE\n**Environment Variables for both Satellite and Client Upgrade**\n\n**Downstream Environment Variables**\n\n    1. TOOLS_URL_RHEL7=\u003cclient_rhel7_downstream_url\u003e TOOLS_URL_RHEL6=\u003cclient_rhel6_downstream_url\u003e\n    RHEV_CLIENT_AK_RHEL7=\u003crhel7_ak_name_for_client_subscription\u003e\n    RHEV_CLIENT_AK_RHEL6=\u003crhel6_ak_name_for_client_subscription\u003e\n    2. Satellite Downstream environment Variables\n\n**CDN Environment Variables**\n\n    1. Dont set BASE_URL, TOOLS_URL_RHEL7 and TOOLS_URL_RHEL6 environment variable\n    2. RHEV_CLIENT_AK_RHEL7=\u003crhel7_ak_name_for_client_subscription\u003e\n    RHEV_CLIENT_AK_RHEL6=\u003crhel6_ak_name_for_client_subscription\u003e\n\n**RHEVM and Docker Environment Variables**\n\n    1. RHEV_USER=\u003crhev_user\u003e RHEV_PASSWD=\u003crhev_passwd\u003e RHEV_URL=\u003crhev_url:443/api\u003e\n    RHN_USERNAME=\u003crhn_user\u003e RHN_POOLID=\u003crhn_pool\u003e RHN_PASSWORD=\u003crhn_pass\u003e\n    DOCKER_VM=\u003cip_of_vm_where_rhel6_rhel7_docker_images_installed\u003e\n    CLIENTS_COUNT=\u003cnumber_of_clients_to_generate_equally_on_rhel_6_and_7\u003e\n    2. Satellite RHEVM environment variables\n\n**User Setup Environment Variables**\n\n    1. CLIENT6_HOSTS=\u003cclient6_1, client6_2, ...\u003e\n    CLIENT7_HOSTS=\u003cclient7_1, client7_2, ...\u003e\n    2. Don't set any RHEVM and Docker Environment Variable\n    3. Satellite User Setup environment Variables\n\n##### LONGRUN UPGRADE:\n**Environment Variables for Satellite, Capsule and Clients Upgrade**\n\n**Downstream Environment Variables**\n\n    Satellite, Capsule and Clients Downstream Environment Variables\n\n**CDN Environment Variables**\n\n    1. Don't Set BASE_URL, CAPSULE_URL, TOOLS_URL_RHEL7 and TOOLS_URL_RHEL6 environment variables\n    2. Capsule and Clients CDN Environment variables\n\n**RHEVM and Docker Environment Variables**\n\n    Satellite, Capsule and Clients RHEVM environment variables\n\n**User Setup Environment Variables**\n\n    1. Don't set any RHEVM and Docker Environment Variable\n    2. Satellite, Capsule and Clients User Setup Environment Variables\n\n### Fab Commands for Setup and Upgrade Execution\nThese fab commands sets up the pre-requisites for upgrade and runs upgrade on satellite, capsule and clients.\n\nPre-Condition:\n    - If RHEVM Setup, the ssh key of your machine should be added to the RHEVM images of satellite/capsule\n    - If User setup, the ssh key of your machine should be added to user satellite, capsule and clients\n\n**NOTE: To run upgrade, one needs to run both ```setup``` and ```upgrade``` commands listed below.**\n\n##### SATELLITE UPGRADE\n**Satellite Upgrade will only upgrade Satellite, NOT Capsule and NOT Clients**\n\n    Setup : fab setup_products_for_upgrade:satellite,\u003cos: rhel6|rhel7\u003e\n    Upgrade: fab product_upgrade:satellite\n\n##### CAPSULE UPGRADE\n**Capsule Upgrade will only upgrade Satellite and Capsule, NOT Clients**\n\n    Setup : fab setup_products_for_upgrade:capsule,\u003cos: rhel6|rhel7\u003e\n    Upgrade: fab product_upgrade:capsule\n\n##### CLIENTS UPGRADE\n**Clients Upgrade will only upgrade Satellite and Clients, NOT Capsule**\n\n    Setup : fab setup_products_for_upgrade:client,\u003cos: rhel6|rhel7\u003e\n    Upgrade: fab product_upgrade:client\n\n##### LONGRUN UPGRADE\n**Longrun Upgrade will upgrade Satellite, Capsule and Clients**\n\n    Setup : fab -u root setup_products_for_upgrade:longrun,\u003cos: rhel6|rhel7\u003e\n    fab product_upgrade:longrun\n\n## Post Upgrade Satellite Entity Verification\nSatellite6-upgrade provides a facility to check if the entities before upgrade are existing/retained post upgrade.\n\nIts very simple, We collect the data before upgrade and post upgrade from satellite and then we compare each entity.\nAnd display the results on stdout as well as XML file of reports will be generated, which further can be used.\n\nThis solely depends on ```pytest``` python package. So make sure that is installed.\n\nTo run the Satellite Post Upgrade Entity Verification, follow below steps :\n1. Set ```RUN_EXISTANCE_TESTS=true``` environment variable, with the environment variables for upgrade and\n   before setup and upgrade fab commands.\n2. After Upgrade is Completed Successfully, for post upgrade entity verification results run following command :\n    ```\n    py.test --junit-xml=reports.xml --continue-on-collection-errors upgrade_tests/test_existance_relations/\n    ```\nThe results will be displayed on stdout and reports.xml file will be generate after all entities verification.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSatelliteQE%2Fsatellite6-upgrade","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FSatelliteQE%2Fsatellite6-upgrade","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FSatelliteQE%2Fsatellite6-upgrade/lists"}