Usage
For detailed instructions, execute the command: inter-server-sync -h
Known Limitations
Currently, Inter Server Sync has a few limitations to consider:
- Version Compatibility: Both the source and target servers must operate on the same software version to ensure seamless synchronization.
- Organization Name Consistency: The organization names for both export and import processes should be identical.
- Manual Export Folder Synchronization: The exported folder needs to be manually copied to the target server using tools like
rsync
.
On the Source Server (Export Process)
- Create Export Directory: Initiate by creating a dedicated export directory:
mkdir ~/export
- Execute Export Command: Run the inter server sync export command, specifying the server configuration file, output directory, and channels to be exported:
inter-server-sync export --serverConfig=/etc/rhn/rhn.conf --outputDir=~/export --channels=channel_label,channel_label
- Transfer Export Directory to Target Server: Securely copy the export directory to the target server using
rsync
:
rsync -r ~/export root@<target_server>:~/</target_server>
On the Target Server (Import Process)
- Execute Import Command: Initiate the import process on the target server, pointing to the transferred export directory:
inter-server-sync import --importDir ~/export/
Database Connection Configuration
By default, the database connection settings are automatically loaded from /etc/rhn/rhn.conf
. You have the flexibility to override this default file location. For development purposes, a sample configuration file is provided within this project.
For local development environment setup:
- Copy Sample Configuration: Duplicate the example configuration file:
cp rhn.conf.exaple rhn.conf
- Configure Database Properties: Populate the
rhn.conf
file with the appropriate database connection values for your environment. - Specify Configuration File: When running inter server sync, specify your configuration file using the
-config
parameter:go run . -config=rhn.conf
Additional Features
Schema Metadata Visualization with Dot Graph
Inter Server Sync offers a helpful feature to visualize schema metadata using a dot graph.
Execute the following command to generate a dot graph and display it:
go run . dot --serverConfig=rhn.conf | dot -Tx11
Build and Release Procedure
1. Tag Creation
- Ensure
uyuni-releng-tools
is installed. You can obtain it from systemsmanagement:Uyuni:Utils. - Create a version tag using
tito
and push it to the GitHub repository.
tito tag --use-release=0 git push origin inter-server-sync-x.y.z-1
2. GitHub Release Creation (Optional)
- On GitHub, create a new release version based on the tag created in the previous step.
3. OBS Project Preparation
- Project Names:
- Uyuni:
systemsmanagement:Uyuni:Master
- Head: Devel:
Galaxy:Manager:Head
- Manager 4.3:
Devel:Galaxy:Manager:4.3
- Uyuni:
- Package Name:
inter-server-sync
Within the checked-out Git repository, execute the following commands:
export OSCAPI=https://api.opensuse.org osc -A https://api.opensuse.org branch systemsmanagement:Uyuni:Master inter-server-sync export OBS_PROJ=home:<your_nick>:branches:systemsmanagement:Uyuni:Master build-packages-for-obs && push-packages-to-obs </your_nick>
4. OBS Submit Request Creation
Uyuni: osc -A https://api.opensuse.org sr --no-cleanup <your_project> inter-server-sync systemsmanagement:Uyuni:Master</your_project>
Manager Head: osc -A https://api.suse.de sr --no-cleanup openSUSE.org:<your_project> inter-server-sync Devel:Galaxy:Manager:Head</your_project>
For each supported SUSE Manager version, initiate a submit request (SR) using the following format:
iosc sr --no-cleanup openSUSE.org:<your_project> inter-server-sync Devel:Galaxy:Manager:X.Y</your_project>