Skip to main content
Version: 4

Exporting objects using DevOps pipeline

You can use a CI/CD pipeline for exporting the Adeptia Connect objects from one environment to another automatically. The CI/CD pipeline uses the Export XML file that you must have created as a prerequisite for export operation, and generates an exported ZIP that contains the objects you want to migrate. After you create the Exported ZIP from the source environment, you need to import the objects to the new environment by running the import pipeline.

How the Export pipeline works​

The diagram below represents how the export pipeline works, and automates the export process. 

When triggered, the pipeline performs the following sequence of actions.

  • Connects to the GIT repository, pulls the Export XML file, and places it to a location in the PVC (shared folder).
  • Pulls and deploys the migration utility helm chart to create the Exported ZIP using the Export XML file at a PVC (shared) location.
  • Downloads the newly created Exported ZIP, and pushes it to the GitHub repository. 
  • Deletes the migration workspace created during the export process.

To start with exporting the objects, you first need to create an export pipeline having all the required parameters for exporting the objects.

Error

Adeptia provides you with an export pipeline file that you can use to create the export pipeline.

The parameters' values you pass in the pipeline supersede the corresponding existing values in the Export XML file.

After you create the pipeline, you need to trigger the pipeline to perform the export operation.

Creating and triggering the Export pipeline​

To create the pipeline in Jenkins using the export pipeline provided by Adeptia, follow the steps given below.

  1.  Log in to the Jenkins with admin privileges.

  2.  Select New Item.

  3. Enter a name for the Export pipeline, and then select Pipeline.

  4. Click OK.

  5. Copy the content from the provided export pipeline file.

    [+] Export Pipeline

    [-] Hide

  6. In the Pipeline Definition section, paste the copied content and uncheck the Use Groovy Sandbox checkbox. 

    Error

    If you are using Jenkins on Windows OS, and have created an agent on Linux OS, you need to do the followings in the export pipeline file.

    1. Uncomment the following code snippet.

    <ch:codesample>

    Where,

    LinuxAgent is the name of the agent that you have created.

    2. Comment the following lines of code.

    <ch:codesample></ch:codesample></ch:codesample>
  7. Click Save.

  8. On the screen that follows, click Build Now.

    As you build the pipeline for the very first time, all the parameters get initialized. 

  9. Refresh the page.
    The Build Now option now changes to Build with Parameters.

  10. Click Build with Parameters.

    You will see all the parameters inherited from the export pipeline file. 

  11. Enter the parameter values as per your requirement.

    InformationIt is mandatory to provide a valid value for all the Jenkins parameters.

    [+] Click here to expand the list of Export parameters

    [-] Hide

    ParametersValueDescription

    Helm Chart



    HELM_REPO_URLhttps://adeptia.github.io/adeptia-connect-migration/chartsMigration Helm chart repository URL.
    CHART_NAMEmigrationMigration Helm chart name.
    GitHub

    GIT_CREDENTIALS_ID

    <credential ID generated by Jenkins>

    Credential ID for GitHub in Jenkins.

    Refer to the prerequisites for more details.

    GIT_REPO_URLhttps://github.com/adeptia/migration-defination.gitURL of the GitHub repository.
    GIT_BRANCHmainGitHub branch name.
    GIT_EXPORT_XML_PATHxml/export.xmlPath of the export XML in the GitHub repository.
    GIT_EXPORT_ZIP_PATHtest/SA_PF.zipPath of the exported ZIP in the GitHub repository.
    Migration

    OPERATIONexportThe type of operation for which deployment will be performed.
    MIGRATION_XML_FILE_PATH/shared/migrationtest1/export.xmlPath of the export XML in the PVC.

    EXPORT_ZIP_PATH

    /shared/migrationtest1/SA_PF.zipPath of the exported ZIP in the PVC.
    LOG_IDENTIFIERTest_Identifier_TagLog identifier to capture logs from MS environment.
    Kubernetes Cluster

    CLUSTER_TYPE
    • Amazon Elastic Kubernetes Service (cluster in AWS)
    • Azure Kubernetes Service (cluster in MS Azure)
    Type of Kubernetes cluster. 
    RESOURCE_GROUP
    Resource group name

    Resource group of Kubernetes cluster.

    WarningThe field is available only if AKS is configured as the Cluster Type.
     
    K8_CREDENTIALS_ID<credential ID generated by Jenkins>

    Credential ID for Kubernetes in Jenkins.

    Refer to the prerequisites for more details.


    SERVER_URLhttps://<host name of the Kubernetes cluster>:<Port number>URL of the Kubernetes cluster.
    CLUSTER_CONTEXTtest-devKubernetes cluster context.
    NAMESPACEnamespaceKubernetes cluster namespace for deployment.
    Backend Database

    BACKEND_DB_URLjdbc:sqlserver://<DB Hostname>:<Port number>;database=<Backend Database Name>Backend database URL used in the deployment of migration Helm chart. Database info configured in value.yaml file.
    DATABASE_CREDENTIALS_ID<credential ID generated by Jenkins>

    Credential ID for database in Jenkins.

    Refer to the prerequisites for more details.

    BACKEND_DB_DRIVER_CLASScom.microsoft.sqlserver.jdbc.SQLServerDriverBackend database driver class used in the deployment of migration Helm chart. Database info configured in values.yaml file.
    BACKEND_DB_TYPESQL-ServerBackend database type used in the deployment of migration Helm chart. Database info configured in values.yaml file.
    Log Database


    LOG_DB_URL
    jdbc:sqlserver://<DB Hostname>:<Port number>;database=<log Database Name>Log database URL used in the deployment of migration Helm chart. Database info configured in value.yaml file.
    LOG_DATABASE_CREDENTIALS_ID
    <credential ID generated by Jenkins>
    Credential ID for database in Jenkins.
    LOG_DB_DRIVER_CLASS
    com.microsoft.sqlserver.jdbc.SQLServerDriver
    Log database driver class used in the deployment of migration Helm chart. Database info configured in values.yaml file.
    LOG_DB_TYPE
    SQL-Server
    Log database type used in the deployment of migration Helm chart. Database info configured in values.yaml file.
  12. Click Build to trigger the pipeline.

    Information
    • The exported ZIP is created and pushed to the GitHub repository. 

    • All the log statements generated by the migration utility during the export process are tagged with a unique identifier. This allows you to search for this unique identifier in the centralized logging system, and fetch all the associated logs.