Start synchronization

When using a file-based Git repository, both instances of the Synchronizer, one for the development Management Console and the other for the production Management Console, require direct access to the file system where the repository is located.

We recommend that you run both instances of the Synchronizer on the same computer where the repository is stored (1). With this setup, the Promotion Manager can use one of the supported Git protocol standards (2) to access the repository and push changes to production.

Recommendation 1: When synchronizing with a bare file-based repository, multiple Synchronizers can run on the same computer.

Recommendation 2: For convenience, the Promotion Manager can use a third-party Git client such as SourceTree instead of Git commands.

Recommendation 3: If Docker is used for deployment, the Synchronizer containers can share a volume.

Start the Synchronizers

Configure Synchronizer access to Management Console

To connect the two Management Consoles and the Git repository, follow this procedure.

  1. In the synchronizer.settings file, point the development Synchronizer to the development Management Console and configure settings by using the commands listed in the following table.
    1. In the Command Prompt window, specify the -c property for the synchronizer.exe file to ignore the default synchronizer.settings file.

    2. Specify the other settings that you require.

    Example:

    Synchronizer.exe -c --mc-url http://127.0.0.1:8080/ManagementConsole --oauth-client-secret <insert-secret-string> --interval 10 --no-host-key false --private-key $USER_HOME \.ssh\id_rsa -s

    Command Description
    -c,--command-line

    Uses settings specified in the command-line and ignores the settings file.

    -e,--environment

    Uses settings from the environment and ignores the settings file.

    -g,--generate-ssh-keys <argument>

    Generates a key-pair for SSH authentication, and saves it to the specified folder. For example: -g C:\Work\MyKeys

    --mc_url <argument>

    Required. Use only when -c is specified. Specifies the URL to connect to the development or production Management Console containing the protocol and port number.

    --oauth-client-secret <argument>

    Required. Use only when -c is specified. Contains the plain text OAuth client secret copied from the OAuth server section of the Management Console to authenticate Synchronizer with the Management Console.

    --oauth-client-secret-file <argument>

    Required. Path to a file containing the OAuth client secret copied from the OAuth server section of the Management Console to authenticate Synchronizer with the Management Console.

    --interval <argument>

    Required. Use only when -c is specified. Sets the interval in seconds between synchronization runs. If set to a value equal to or less than 0 or a non-numeric value, the Synchronizer runs once and exits.

    --no-host-key <argument>

    Optional. Use only when -c is specified. Disables strict SSH host-key checking. Default is false.

    --private-key <argument> Required. Use only when -c is specified. Provides the path to the file containing a private SSH key to connect to a remote repository. When connecting to a local repository, this attribute is ignored, but a value must be specified.
    -r,--reset-hard

    Resets the version information and purges the entire local cache.

    -s,--save

    Saves the configuration settings in the synchronizer.settings file and exits.

    -v,--version

    Prints version information and exits.

    -h,--help

    Prints the description of properties and exits.

  2. Repeat the previous steps for the production Synchronizer and the production Management Console, changing the properties as needed.
  3. Save the configuration settings.

    The Management Consoles and the Git repository are now synchronized. Now you can promote objects to production and set up synchronization between the Management Console project and the GIT repository.

Set up synchronization between the Management Console project and github repository

To set up synchronization between the Management Console project and github repository, follow these steps.

  1. Open the github repository website and create a new account.

  2. In the Command Prompt window, run the Synchronizer.exe file with the -g parameter specified.

    Example

    Synchronizer.exe -c --mc-url http://127.0.0.1:8080/ManagementConsole --oauth-client-secret <insert-secret-string> -g $USER_HOME\.ssh\

    This generates the RSA pair of public and private keys.

  3. Log in to your github account. In the Settings menu, find the SSH and GPG keys section, and create a new SSH key by entering the public key from the generated key-pair.

  4. Create a new private repository on the github website and copy the SSH address of your repository, such as git@githubrepository.com/username/repository_name.git.

  5. Go to Management Console > Admin > Projects and select a project.

    Click Edit and in the Edit project window, select Repository.

    1. Click Enable configuration to activate the fields for configuring a repository.

    2. In the URL field, provide the SSH address you copied.

    3. In the Branch field, type the name of the branch to use.

    4. If Read-only is selected, the project files will be wiped out and replaced with the github repository files.

      If Read-only is not selected, the github repository files will be wiped out and replaced with the project files.

      In the read-only mode, all the objects that the Management Console contains, are taken from the repository. Before starting synchronization, make sure that the objects you want to synchronize are empty in the Management Console. Otherwise, an error message appears.

      To delete the object contents, select the required object from the Objects to synchronize list and click Delete selected objects. Use caution when deleting the objects so that you do not loose important data.

    5. For the Objects to synchronize, select the objects to include in the synchronization.

    6. Click OK to save the changes.

  6. In the Command Prompt window, run the Synchronizer.exe file with the --private-key parameter specified.

    Example

    Synchronizer.exe -c --mc-url http://127.0.0.1:8080/ManagementConsole --oauth-client-secret <insert-secret-string> --interval 10 --no-host-key true --private-key $USER_HOME\.ssh\id_rsa

You have now synchronized your github repository with your Management Console project.