Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Info

This process should only be followed to perform a clone of FlexDeploy Production FlexDeploy to the Test environment. Make sure that Test environment is restricted for use by very few members of your team to avoid confusion, as the purpose of the Test environment is only for validating FlexDeploy itself and is not used for actual build/deploy activities. You will do some build/deploy activities, but strictly for validation purposes.

This process only applies to the 4.0, 4.0.x, 4.5 version of FlexDeploy. The Source and target version of FlexDeploy must be same.

...

  • Export data from Production FlexDeploy database. You will be prompted to enter password for system user.
    This step will create fd_bkup.dmp file with all details from
    Take backup of artifact repository
    • You should export FD,FF and FD_ADMIN schemas. File should be in data pump directory, for example - C:\oraclexe\app\oracle\admin\XE\dpdump.
    • If your database is only used for FlexDeploy application, you may be able to perform backup and recovery operations using other Database tools.
Code Block
languagebash
themeRDark
titleExport data from source FlexDeploy database
expdp system directory=DATA_PUMP_DIR dumpfile=fd_bkup.dmp schemas=FD,FF,FD_ADMIN
    • .
  • Take backup of artifact repository folder using tar/zip commands on Production FlexDeploy server. For example,
    • cd /flexdeploy/artifacts
    • tar -czvf /app/backup/flexdeploy_artifacts_prod.tar.gz *
  • Take backup of plugins folder using tar/zip commands on Production FlexDeploy

    database

    server. Plugins folder is under server working directory. You can determine working folder by looking at flexagon.fd.application.root system property on server command line. For example,

    • cd /flexdeploy/application/

      artifacts

      plugins

    • tar -czvf /app/backup/flexdeploy_

      artifacts_prod

      plugins.tar.gz *

  • Make sure Test FlexDeploy is now stopped for import process.
  • Copy fd_bkup.dmp file on to Test FlexDeploy database server in to data pump directory, for example - C:\oraclexe\app\oracle\admin\XE\dpdump.
  • Import data in to target FlexDeploy database. Make sure to run this on Test environment only.
    • You will be prompted to enter password for system user. You must delete FD,FF,FD_ADMIN database users/schemas/databases from Test environment if they already exist before starting import process. If necessary take backup of Test FlexDeploy database prior to starting this process.
    • Make sure there are no errors in import process. If there are errors, make corrections appropriately and restart import process.

...

languagebash
themeRDark
titleImport data in to target FlexDeploy database

...

    • .

...

  • At this point, the Test FlexDeploy database should be copy of Production database.
  • Copy artifacts zip file to Test FlexDeploy server and extract it in the artifact repository folder. You can determine Artifact Repository folder by looking at flexagon.fd.repository.root system property on server command line. Make sure to run this on Test environment only.
    • cd /flexdeploy/artifacts
    • tar -czvf /app/backup/flexdeploy_artifacts_test.tar.gz *
    • rm -rf *
    • tar -xzvf /app/backup/flexdeploy_artifacts_prod.tar.gz
  • Now FlexDeploy artifact repository is also copied.
  • Copy plugins tar/zip file to Test FlexDeploy server and extract it in the plugins directory under working directory. You can determine working folder by looking at flexagon.fd.application.root system property on server command line.

    • cd /flexdeploy/application/plugins

    • rm -rf *

    • tar -xzvf /app/backup/flexdeploy_plugins.tar.gz

  • Now FlexDeploy plugins are also copied.

Update Target Database as Necessary

  • Take note that after cloning the database the FD_ADMIN schema password will be the same as it was in production. You will need to reset the FD_ADMIN schema password back to its original value in the Target Environment.
  • Now make various updates to make sure to limit access to the FlexDeploy Test environment and limit what FlexDeploy Test can do against various endpoints. You can customize any of these steps as per your needs. Make sure to run this on Test environment only.
    • Disable external realm and users, so access to FlexDeploy is very limited. Update SQL as appropriate for your setup. For example,

      Code Block
      languagesql
      themeRDark
      titleInactivate Security Setup to restrict access
      update fdFD.fdFD_realmREALM set is_active='N';
      update fdFD.fdFD_userUSER set is_active='N' where local_user='N'; -- update as appropriate
      commit;


    • Disable all endpoints, so Test FlexDeploy can not run any executions until Administrator explicitly enables some endpoints. Update base directory to not conflict in case when one of these Endpoints is enabled in Test FlexDeploy. For example,

      Code Block
      languagesql
      themeRDark
      titleUpdate Endpoints for Test environment
      update fdFD.endpointENDPOINT set is_active='N' where connection_type='SSH';
      update fdFD.endpointENDPOINT set base_directory = base_directory || 'fdtest';
      commit;


    • If you have workflows that perform tags on Source Control Systems, make sure to update the workflows before running builds, so you do not conflict with tags created by Production FlexDeploy. You can do this by simply running this SQL also. Adjust according to your requirements.

      Code Block
      languagesql
      themeRDark
      titleUpdate version syntax
      update fdFD.projectPROJECT_streamSTREAM set version_syntax = version_syntax || ' + ".fdtest"';
      commit;


    • Delete all Continuous Integration triggers.

      Code Block
      languagesql
      themeRDark
      titleDelete CI Triggers
      delete from fdFD.projectPROJECT_triggerTRIGGER_configCONFIG;
      delete from fdFD.projectPROJECT_triggerTRIGGER;
      commit;


    • Disable production environment. so Test FlexDeploy can not run any executions even for testing against Production environment. For example,

      Code Block
      languagesql
      themeRDark
      titleDisable Production environment
      update fdFD.environmentENVIRONMENT set is_active='N' where environment_code='PROD'; -- update as appropriate
      commit;


  • Now start Test FlexDeploy and validate it.
    • You can make necessary adjustments to Realm, User, Groups to validate setup and perform tests as necessary. This is necessary as we disabled user and realms in previous steps.
    • You can activate specific Endpoints that you want to be included in Test environment validations.
    • Update System Settings as appropriate.
      • Change FD_SERVER_BASE_URL.
      • Change SMTP_FROM_ADDRESS. This will make sure that emails are coming from different address for Test FlexDeploy.