https://github.com/SatelliteQE/satellite6-upgrade
Satellite 6 upgrade related tools
https://github.com/SatelliteQE/satellite6-upgrade
foreman katello redhat-qe satellite6 satellite6qe
Last synced: 6 months ago
JSON representation
Satellite 6 upgrade related tools
- Host: GitHub
- URL: https://github.com/SatelliteQE/satellite6-upgrade
- Owner: SatelliteQE
- License: gpl-3.0
- Archived: true
- Created: 2017-04-04T15:52:14.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2024-06-17T18:58:33.000Z (over 1 year ago)
- Last Synced: 2024-10-31T20:41:14.934Z (11 months ago)
- Topics: foreman, katello, redhat-qe, satellite6, satellite6qe
- Language: Python
- Size: 860 KB
- Stars: 8
- Watchers: 26
- Forks: 23
- Open Issues: 36
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Satellite6-upgrade
Satellite6 upgrade contains a set of tools that helps to perform various upgrade specific scenarios and
moreover, it helps to validate data between pre and post upgrade to ensure data integrity after upgrade.**The major tasks of Satellite6 upgrade are:**
1. Create and delete satellite/capsule instances using RHEVM templates/Openstack images
2. Upgrade Satellite6, Capsule instances spawn from RHEVM templates and
clients generated through docker
3. In case user has its own existing satellite/capsule and clients setup and wants to perform upgrade then
Satellite6 upgrade has the capability to perform upgrade on user provided setups
4. Performs data validation post upgrade to ensure the entities created before upgrade
exists post upgrade as well**Supported Upgrade Paths are:**
Product | Major Version | zStream
--------|----------------|---------
Satellite| 6.1 -> 6.2 and 6.2-> 6.3 | 6.1 -> 6.1 and 6.2 -> 6.2
Capsule | 6.1 -> 6.2 and 6.2-> 6.3 | 6.1 -> 6.1 and 6.2 -> 6.2
Clients | 6.1 -> 6.2 and 6.2-> 6.3 | 6.1 -> 6.1 and 6.2 -> 6.2## Installation
Satellite6-Upgrade depends on ```pycurl``` being installed, but installing it,
specially on a virtual environment is not straight forward. You must run the
[pycurl install script](https://github.com/SatelliteQE/robottelo-ci/blob/master/scripts/pip-install-pycurl.sh) in order to have ```pycurl``` installed properly.Finally, python packages listed in ```requirements.txt``` must be installed before
satellite6-upgrade can be used:pip install -r requirements.txt
## Basic Usage Examples
### Create Satellite/Capsule Instance from RHEVM template
To create a live satellite/capsule instance from RHEVM template:
*Pre-Conditions: The template should have a satellite/capsule populated in it already.*RHEV_USER= RHEV_PASSWD= RHEV_URL='https:///api'
fab create_rhevm_instance:,,,,
,### Delete Satellite/Capule Instance from RHEVM template
To delete a satellite/capsule instance from RHEVM template:
*Pre-Condition - The instance should be already created*RHEV_USER= RHEV_PASSWD= RHEV_URL='https:///api'
fab delete_rhevm_instance:,## Upgrade
**Following are the upgrade type we support:**
1. Satellite
* Upgrades only Satellite and NOT its capsule nor clients
2. Capsule
* Upgrades Capsule and its associated Satellite and NOT clients
3. Clients
* Upgrades Clients and its associated Satellite and NOT capsule
4. Longrun
* Upgrades Satellite, Capsules and clientsWe would need different environment variables and fab commands depends on Upgrade Types.
As we look in usage examples above, the command is consisted of mainly two parts:
1. ```Environment variables```
Again, environment variables required for each upgrade type has been divided into
parts and its subparts, those are:
* Common Environment Variables required for all types of upgrade
* Environment Variables required for specific type of upgrade
* Downstream Environment Variables
* CDN Environment Variable
* RHEVM Environment Variables
* User Setup Environment Variables
2. ```fab commands```
After Setting Environment Variables in Shell, We are good to run fab commands that will run upgrades on setup.### Environment Variables:
#### Common Environment Variables required for all types and combinations of upgrade1. FROM_VERSION= TO_VERSION= OS=
2. Set FROM_VERSION and TO_VERSION to same current satellite version for Z-Stream Upgrade#### Environment Variables required for specific type of upgrade
##### SATELLITE UPGRADE
**Environment Variables for only Satellite Upgrade****Downstream Environment Variables**
BASE_URL=
**CDN Environment Variables**
Dont set BASE_URL environment variable
**RHEVM Environment Variables**
RHEV_SAT_IMAGE= RHEV_SAT_HOST=
RHEV_USER= RHEV_PASSWD= RHEV_URL=
RHN_USERNAME= RHN_POOLID= RHN_PASSWORD=**User Setup Environment Variables**
1. SATELLITE_HOSTNAME=
2. Don't set any RHEVM Environment Variable##### CAPSULE UPGRADE
**Environment Variables for both Satellite and Capsule Upgrade****Downstream Environment Variables**
1. CAPSULE_URL= RHEV_CAPSULE_AK=
2. Satellite Downstream environment Variables**CDN Environment Variables**
1. Don't set BASE_URL and CAPSULE_URL environment variable
2. RHEV_CAPSULE_AK=**RHEVM Environment Variables**
1. RHEV_CAP_IMAGE= RHEV_CAP_HOST=
RHEV_USER= RHEV_PASSWD= RHEV_URL=
RHN_USERNAME= RHN_POOLID= RHN_PASSWORD=
2. Satellite RHEVM environment variables**User Setup Environment Variables**
1. CAPSULE_HOSTNAMES=
2. Don't set any RHEVM Environment Variable
3. Satellite User Setup environment Variables##### CLIENTS UPGRADE
**Environment Variables for both Satellite and Client Upgrade****Downstream Environment Variables**
1. TOOLS_URL_RHEL7= TOOLS_URL_RHEL6=
RHEV_CLIENT_AK_RHEL7=
RHEV_CLIENT_AK_RHEL6=
2. Satellite Downstream environment Variables**CDN Environment Variables**
1. Dont set BASE_URL, TOOLS_URL_RHEL7 and TOOLS_URL_RHEL6 environment variable
2. RHEV_CLIENT_AK_RHEL7=
RHEV_CLIENT_AK_RHEL6=**RHEVM and Docker Environment Variables**
1. RHEV_USER= RHEV_PASSWD= RHEV_URL=
RHN_USERNAME= RHN_POOLID= RHN_PASSWORD=
DOCKER_VM=
CLIENTS_COUNT=
2. Satellite RHEVM environment variables**User Setup Environment Variables**
1. CLIENT6_HOSTS=
CLIENT7_HOSTS=
2. Don't set any RHEVM and Docker Environment Variable
3. Satellite User Setup environment Variables##### LONGRUN UPGRADE:
**Environment Variables for Satellite, Capsule and Clients Upgrade****Downstream Environment Variables**
Satellite, Capsule and Clients Downstream Environment Variables
**CDN Environment Variables**
1. Don't Set BASE_URL, CAPSULE_URL, TOOLS_URL_RHEL7 and TOOLS_URL_RHEL6 environment variables
2. Capsule and Clients CDN Environment variables**RHEVM and Docker Environment Variables**
Satellite, Capsule and Clients RHEVM environment variables
**User Setup Environment Variables**
1. Don't set any RHEVM and Docker Environment Variable
2. Satellite, Capsule and Clients User Setup Environment Variables### Fab Commands for Setup and Upgrade Execution
These fab commands sets up the pre-requisites for upgrade and runs upgrade on satellite, capsule and clients.Pre-Condition:
- If RHEVM Setup, the ssh key of your machine should be added to the RHEVM images of satellite/capsule
- If User setup, the ssh key of your machine should be added to user satellite, capsule and clients**NOTE: To run upgrade, one needs to run both ```setup``` and ```upgrade``` commands listed below.**
##### SATELLITE UPGRADE
**Satellite Upgrade will only upgrade Satellite, NOT Capsule and NOT Clients**Setup : fab setup_products_for_upgrade:satellite,
Upgrade: fab product_upgrade:satellite##### CAPSULE UPGRADE
**Capsule Upgrade will only upgrade Satellite and Capsule, NOT Clients**Setup : fab setup_products_for_upgrade:capsule,
Upgrade: fab product_upgrade:capsule##### CLIENTS UPGRADE
**Clients Upgrade will only upgrade Satellite and Clients, NOT Capsule**Setup : fab setup_products_for_upgrade:client,
Upgrade: fab product_upgrade:client##### LONGRUN UPGRADE
**Longrun Upgrade will upgrade Satellite, Capsule and Clients**Setup : fab -u root setup_products_for_upgrade:longrun,
fab product_upgrade:longrun## Post Upgrade Satellite Entity Verification
Satellite6-upgrade provides a facility to check if the entities before upgrade are existing/retained post upgrade.Its very simple, We collect the data before upgrade and post upgrade from satellite and then we compare each entity.
And display the results on stdout as well as XML file of reports will be generated, which further can be used.This solely depends on ```pytest``` python package. So make sure that is installed.
To run the Satellite Post Upgrade Entity Verification, follow below steps :
1. Set ```RUN_EXISTANCE_TESTS=true``` environment variable, with the environment variables for upgrade and
before setup and upgrade fab commands.
2. After Upgrade is Completed Successfully, for post upgrade entity verification results run following command :
```
py.test --junit-xml=reports.xml --continue-on-collection-errors upgrade_tests/test_existance_relations/
```
The results will be displayed on stdout and reports.xml file will be generate after all entities verification.