Fine-Tuning the Components

After creating the Components with the Application Wizard, now it is time to define the necessary technical references (Dynamic Properties) that must be interpreted by the system.

Note: If you have already set up everything you need to perform a Canary deployment with CDA, simply follow the extra steps in green to "dark launch" your Application's deployment:

Application Component

Tomcat Docker Container

Create the following Dynamic Properties:

  1. Open the DARK_LAUNCH_APP Application.
  2. Select the Application Component. The Dynamic Properties view is displayed.
  3. Click the Create button in the toolbar. The Create Dynamic Property dialog pops-up.
  4. Name the first dynamic property "image_name" and store it in the General folder. (/General/image_name). This dynamic property will define the name of the created Docker image (for example, jpetstore:0.0.1).
  5. Leave the selected default type (Single Line Text) as is.
  6. Select the Expression value and enter the following expression: nameofdockerimage_{@deployment_Package/system/name}. E.g. jpetstore_{@deployment_Package/system/name}
  7. Do not highlight the property.
  8. Click Save.
  9. Repeat the previous steps to create the following dynamic properties:
    NameTypeValueTextHighlightedDescription
    /general/Profile_nameSingle Line TextStatic NoOverrides the previous image name in the Profile. The new name will be used as database name.
    /general/tomcat_portSingle Line TextExpression{@target/custom/tomcat_port}NoTomcat port.
    /general/create_fileSingle Line TextExpression{/custom/data_directory}/{@deployment_Package/system/name}_{/custom/tomcat_port}.txtNoTemporary file.
    /general/target_idSingle Line TextExpression{@target/system/id}NoARA id of Deployment Target.
    /general/data_directorySingle Line TextExpression{@target/custom/data_directory}NoData directory for Docker (for example /data/ARA)
    /general/create_templateSingle Line TextExpression{/general/data_directory}/docker_template_tomcat.txtNoDocker template file in json.
    /general/environmentSingle Line TextExpression{@deployment_Package/custom/deployment/environment}No 
    /general/Package_nameSingle Line TextExpression{@deployment_Package/custom/deployment/environment}No 
    /general/environment_nameSingle Line TextExpression{@environment/system/name}No 
    /general/ara/urlSingle Line TextExpression{@Environment/general/ara/url}NoReference back to Environment for Automic Continuous Delivery Automation connection details.
    /general/ara/userSingle Line TextExpression{@Environment/general/ara/user}No
    /general/ara/passwordSingle Line TextExpression{@Environment/general/ara/password}No
    /general/docker/api_urlSingle Line TextExpression{@target/custom/docker/api_url}NoReference back to Deployment Target for Docker Properties.
    /general/docker/container_idSingle Line TextExpression{@target/custom/docker/containers/id}No
    docker/connection/server_urlSingle Line TextExpression{@target/custom/server_url}No 
    docker/connection/certificate_pathSingle Line TextExpression{@target/custom/certificate_path}No 
    docker/container/container_nameSingle Line TextExpression{/custom/container_name}No 
    docker/container/container_idSingle Line TextExpression{/custom/container_id}No 
    docker/container/actionSingle Line TextExpression{/custom/action}No 
    docker/container/query_paramSingle Line TextExpression{/custom/query_param}No 
    docker/container/list_optionSingle Line TextExpression{/custom/list_option}No 
    docker/container/container_sizeSingle Line TextExpression{/custom/container_size}No 
    docker/container/limitSingle Line TextExpression{/custom/limit}No 
    docker/container/sinceSingle Line TextExpression{/custom/since}No 
    docker/container/beforeSingle Line TextExpression{/custom/before}No 
    docker/container/filtersSingle Line TextExpression{/custom/filters}No 
    docker/container/volumesSingle Line TextExpression{/custom/volumes}No 
    docker/container/container_forceSingle Line TextExpression{/custom/container_force}No 
    docker/container/commandSingle Line TextExpression{/custom/command}No 
    docker/container/exec_idSingle Line TextExpression{/custom/exec_id}No 
    docker/container/detachSingle Line TextExpression{/custom/detach}No 
    docker/container/save_fileSingle Line TextExpression{/custom/save_file}No 
    docker/container/folder_to_exportSingle Line TextExpression{/custom/folder_to_export}No 
    docker/container/path_to_tar_fileSingle Line TextExpression{/custom/path_to_tar_file}No 
    docker/container/create_param_fileSingle Line TextExpression{/custom/create_param_file}No 
    docker/container/start_param_fileSingle Line TextExpression{/custom/start_param_file}No 
    docker/container/start_exec_folder_pathSingle Line TextExpression{/custom/start_exec_folder_path}No 
    docker/image/image_nameSingle Line TextExpression{/custom/image_name}No 
    docker/image/image_tagSingle Line TextExpression{/custom/image_tag}No 
    docker/image/search_termSingle Line TextExpression{/custom/search_term}No 
    docker/image/nopruneSingle Line TextExpression{/custom/noprune}No 
    docker/image/forceSingle Line TextExpression{/custom/force}No 
    docker/image/tar_file_pathSingle Line TextExpression{/custom/tar_file_path}No 
    docker/image/advanced_optionsSingle Line TextExpression{/custom/advanced_options}No 

General Component

Maintenance tasks. Its dynamic properties contain links to Application and Package names/ids.

Create the following Dynamic Properties:

Name Type Value Text Highlighted Description
/general/stable_Package_id Single Line Text Expression {@environment/deployment/stable_id} No  
/general/Package_state Single Line Text Expression {@deployment_Package/system/status} No  
/general/Package_name Single Line Text Expression {@deployment_Package/system/name} No  
/general/application_name Single Line Text Expression {@Application/system/name} No  
/general/environment_name Single Line Text Expression {@Environment/system/name} No  
/general/Package_id Single Line Text Expression {@deployment_Package/system/id} No  
/general/ara/url Single Line Text Expression {@environment/general/ara/url} No Reference back to Environment for Automic Continuous Delivery Automation connection details.
/general/ara/user Single Line Text Expression {@environment/general/ara/user} No
/general/ara/password Single Line Text Expression {@environment/general/ara/password} No
/general/deployment/environment Single Line Text Expression {@deployment_Package/custom/deployment/environment} No References back to deployment Package.
/source/ftp/protocol Single Choice Static FTP No Protocol
/source/ftp/host Single Line Text Static   No Host to connect to.
/source/ftp/port Single Line Text Static 21 No Connection port for FTP is usually 21. Connection port for FTPS is usually 990.
/source/ftp/username Single Line Text Static   No Username to authenticate with the server (if required by the server)
/source/ftp/password Protected Static   No Password to authenticate with the server (if required by the server)
/source/ftp/recursive_download Single Choice Static Yes No Recursively get files and directories. If set to no, only direct children of the directory are downloaded
/source/ftp/connection_timeout Float Static 5000 No Timeout in milliseconds to wait to build up a connection to the target host. Default: 5000.
/source/transfer_mode Single Choice Static BINARY No Text/Binary transfer modes.
/staging/working_files_dires Single Line Text Expression {/staging/working_base_dir}/{@Application/system/name}/{/system/name} No Files/Directory on the staging server after downloaded from source.
/staging/agent Single Line Text Expression {@target/custom/staging_remote_agent} No Agent which will be used for staging.
/staging/working_base_dir Single Line Text Expression {@target/custom/staging_remote_directory} No Base directory on the staging server where Package should be downloaded to.
/target/target_files_dirs Single Line Text Expression {@target/custom/staging_base_directory}/{@Application/system/name}/{/system/name}/{@deployment_Package/system/name} No Name of a local file/directory where downloaded file/directory is stored. HTTP(S):Directory not supported. CVS, TFS: must be a directory.
/target/overwrite_target Single Choice Static Yes No Overwrite local files/directory if exist. For SVN, all files will be exported but already present files will not be overwritten. For TFS, overwrites all items in the workspace(CLI: /force)

Database Component

Application database

Create the following Dynamic Properties:

Name Type Value Text Highlighted Description
/JDBC_CONNECTION Single Line Text Expression jdbc:sqlserver://devAUT-ca3:1433;databaseName={/DB_NAME} No  
/SQL_USER Single Line Text Static username No  
/SQL_PASSWORD Protected Static password: ***** No  
/JDBC_DRIVER Single Line Text Static Path to the .jar file: E.g. C:\xxxxxx\sqljdbc4.jar No  
/DB_NAME Single Line Text Static   No There is override in Profile to change name based on Profile.
/database/jdbc/connection_string Single Line Text Expression {/custom/jdbc_connection_string} No  
/database/jdbc/driver_jar Single Line Text Expression {@target/custom/jdbc_driver_jar} No  
/database/jdbc/driver_class Single Line Text Expression {@target/custom/jdbc_driver_class} No  
/database/security/username Single Line Text Expression {@target/custom/username} No  
/database/security/password Single Line Text Expression {@target/custom/password} No  
/mssql/name/database_name Single Line Text Expression {/custom/database_name} No Name of the database.
/mssql/spec/file_spec Single Line Text Expression {/custom/file_spec} No Filespec of the database. Example: PRIMARY (NAME='MyDB_Primary', FILENAME='c:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\MyDB_Prm.mdf', SIZE=4MB, MAXSIZE=10MB, FILEGROWTH=1MB)
/mssql/spec/filegroup_spec Single Line Text Expression {/custom/filegroup_spec} No Filegroup specification of the database. ( NAME = 'MyDB_FG1_Dat1', FILENAME = 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\MyDB_FG1_1.ndf', SIZE = 1MB, MAXSIZE=10MB, FILEGROWTH=1MB), ( NAME = 'MyDB_FG1_Dat2', FILENAME = 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\MyDB_FG1_2.ndf', SIZE = 1MB, MAXSIZE=10MB, FILEGROWTH=1MB)
/mssql/spec/log_spec Single Line Text Expression {/custom/log_spec} No Log file specification of the database. Example: ( NAME='MyDB_log', FILENAME = 'c:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\data\MyDB.ldf', SIZE=1MB, MAXSIZE=10MB, FILEGROWTH=1MB)
/source/protocol Single Choice Static UC$_FILE_TRANSFER   Defines the protocol to be used to get the component from source.
/staging/working_files_dirs Single Line Text Expression {/staging/working_base_dir}/{@Application/system/name}/{/system/name} No Files/Directory on the staging server after downloaded from source.
/staging/agent Single Line Text Expression {@target/custom/staging_remote_agent} No Agent which will be used for staging.
/staging/working_base_dir Single Line Text Expression {@target/custom/staging_remote_directory} No Base directory on the staging server where Package should be downloaded to.
/target/target_files_dirs Single Line Text Expression {@target/custom/staging_base_directory}/{@Application/system/name}/{/system/name}/{@deployment_Package/system/name} No Name of a local file/directory where downloaded file/directory is stored. HTTP(S):Directory not supported. CVS, TFS: must be a directory.
/target/overwrite_target Single Choice Static Yes No Overwrite local files/directory if exist. For SVN, all files will be exported but already present files will not be overwritten. For TFS, overwrites all items in the workspace(CLI: /force)

Docker_Image Component

This Component is responsible for building a Docker image. To do so, it takes a Docker Tomcat image, an Artifact and a configuration file for a particular set of targets and builds an image that can be spun up as a Docker container. This image can be later reused on different hosts (which means you save time, because you do not need to build a Docker image on every Deployment Target).

Create the following Dynamic Properties:

Name Type Value Text Highlighted
/build/directory Single Line Text Expression {/custom/data_directory}build No
/build/Application Single Line Text Expression {/build/directory}/nameofdockerimage. For example: {/build/directory}/jpetstore No
general/Dockerfile_template Single Line Text Expression {/custom/data_directory} No
general/Dockerfile Single Line Text Expression {/custom/data_directory}Dockerfile No
general/container_template Single Line Text Expression {/custom/data_directory}docker_template.txt No
general/build_template_txt Single Line Text Expression {/custom/data_directory}build_template.txt No
general/build_txt Single Line Text Expression {/custom/data_directory}/build.txt No
general/data_directory Single Line Text Expression {@target/custom/data_directory}/ No
general/profile_name Single Line Text Static   No
general/image_name Single Line Text Expression nameofdockerimage_{@deployment_Package/system/name} No
general/docker_build_tar Single Line Text Expression {/custom/data_directory}{/custom/image_name} No
general/docker_build_tar_full Single Line Text Expression {/custom/docker_build_tar}.tar No
general/welcome Single Line Text Expression {@deployment_Package/system/full_name} No
docker/connection/server_url Single Line Text Expression {@target/custom/server_url} No
docker/connection/certificate_path Single Line Text Expression {@target/custom/certificate_path} No
docker/container/container_name Single Line Text Expression {/custom/container_name} No
docker/container/container_id Single Line Text Expression {/custom/container_id} No
docker/container/action Single Line Text Expression {/custom/action} No
docker/container/query_param Single Line Text Expression {/custom/query_param} No
docker/container/list_option Single Line Text Expression {/custom/list_option} No
docker/container/container_size Single Line Text Expression {/custom/container_size} No
docker/container/limit Single Line Text Expression {/custom/limit} No
docker/container/since Single Line Text Expression {/custom/since} No
docker/container/before Single Line Text Expression {/custom/before} No
docker/container/filters Single Line Text Expression {/custom/filters} No
docker/container/volumes Single Line Text Expression {/custom/volumes} No
docker/container/container_force Single Line Text Expression {/custom/container_force} No
docker/container/command Single Line Text Expression {/custom/command} No
docker/container/exec_id Single Line Text Expression {/custom/exec_id} No
docker/container/detach Single Line Text Expression {/custom/detach} No
docker/container/save_file Single Line Text Expression {/custom/save_file} No
docker/container/folder_to_export Single Line Text Expression {/custom/folder_to_export} No
docker/container/path_to_tar_file Single Line Text Expression {/custom/path_to_tar_file} No
docker/container/create_param_file Single Line Text Expression {/custom/create_param_file} No
docker/container/start_param_file Single Line Text Expression {/custom/start_param_file} No
docker/container/start_exec_folder_path Single Line Text Expression {/custom/start_exec_folder_path} No
docker/image/image_name Single Line Text Expression {/custom/image_name} No
docker/image/image_tag Single Line Text Expression {/custom/image_tag} No
docker/image/search_term Single Line Text Expression {/custom/search_term} No
docker/image/noprune Single Line Text Expression {/custom/noprune} No
docker/image/force Single Line Text Expression {/custom/force} No
docker/image/tar_file_path Single Line Text Expression {/custom/tar_file_path} No
docker/image/advanced_options Single Line Text Expression {/custom/advanced_options} No
image/driver Single Line Text Expression {/image/directory}/sqljdbc4.jar No
image/database_properties Single Line Text Expression {/image/directory}/{/image/database_file} No
image/wildcard Single Line Text Expression {/image/directory}/* No
image/database_properties_folder Single Line Text Expression {/image/directory}/nameofdockerimage/WEB-INF/classes/properties/ No
image/lib_folder Single Line Text Expression {/image/directory}/nameofdockerimage/WEB-INF/lib/ No
image/Application Single Line Text Expression {/image/directory}/nameofdockerimage No
image/directory Single Line Text Expression {/custom/data_directory}image No
image/database_properties_full_path Single Line Text Expression {/image/database_properties_folder}/{/image/database_file} No
image/database_file Single Line Text Static database.properties No
image/index_file Single Line Text Expression {/image/directory}/nameofdockerimage/index.html No
source/wildcard Single Line Text Expression /testdata/* No
source/database_properties Single Line Text Expression /testdata/database.properties No
source/driver Single Line Text Expression /testdata/sqljdbc4.jar No
/newfeature/configfile Single Line Text Expression {/general/data_directory}/features.ini No
/newfeature/showfeatures Single Line Text Static

true

No

Load_Balancer Component

Nginx is used on an Ubuntu machine. The same load balancer is used to hit different subsets of servers (Deployment Targets).

Create the following Dynamic Properties:

Name Type Value Text Highlighted Description
/general/Profile_name Single Line Text Expression   No Name of profile for upstream.
/general/Package_deployment_environment Single Line Text Expression {@deployment_Package/custom/deployment/Environment} No Reference to Package environment.
/general/active_Profile Single Line Text Expression {@Environment/deployment/active} No Profile for Nginx to pick up.
/general/load_Profile_file Single Line Text Static /etc/nginx/sites-available/Dark_Launch_load No  
/general/load_Profile_template_dir Single Line Text Static /etc/nginx/Dark_Launch_Profiles/ No Template dir for Nginx:
/general/next_Profile_25 Single Line Text Expression {/custom/load_Profile_template_dir}{/custom/active_Profile}25 No Profile for first subset.
/general/next_Profile_50 Single Line Text Expression {/custom/load_Profile_template_dir}{/custom/active_Profile}50 No Profile for second subset.
/general/next_Profile_100 Single Line Text Expression {/custom/load_Profile_template_dir}{/custom/active_Profile}100 No Profile for final subset.
/general/Package_state Single Line Text Expression {@deployment_Package/system/status} No Reference to Package state.
/general/next_Profile_25_match_state Single Line Text Static Switch No Reference to ahead state for first subset.
next_Profile_50_match_state Single Line Text Static Up_Load_50pc No Reference to ahead state for second subset.
next_Profile_100_match_state Single Line Text Static Up_Load_100pc No Reference to ahead state for final subset.
/general/Package_id Single Line Text Expression {@deployment_Package/system/id} No Reference to the Package id
/staging/working_files_dirs Single Line Text Expression {/staging/working_base_dir}/{@Application/system/name}/{/system/name} No Files/Directory on the staging server after downloaded from source.
/staging/agent Single Line Text Expression {@target/custom/staging_remote_agent} No Agent which will be used for staging.
/staging/working_base_dir Single Line Text Expression {@target/custom/staging_remote_directory} No Base directory on the staging server where Package should be downloaded to.
/target/target_files_dirs Single Line Text Expression {@target/custom/staging_base_directory}/{@Application/system/name}/{/system/name}/{@deployment_Package/system/name} No Name of a local file/directory where downloaded file/directory is stored. HTTP(S):Directory not supported. CVS, TFS: must be a directory.
/target/overwrite_target Single Choice Static {@target/custom/docker/containers/id} Yes Overwrite local files/directory if exist. For SVN, all files will be exported but already present files will not be overwritten. For TFS, overwrites all items in the workspace(CLI: /force)

About NGINX Configuration

The default configuration for nginx.conf remains unchanged. However, for this scenario a jpetstore file has been stored in the server site configuration file: /etc/nginx/sites-available/. Here an upstream for both blue and green Deployment Targets that point towards the Docker containers has been declared:

upstream green {

server 192.168.47.185:8081;

server 192.168.47.185:8082;

server 192.168.47.185:8083;

server 192.168.47.185:8084;

}

upstream blue {

server 192.168.47.185:8091;

server 192.168.47.185:8092;

server 192.168.47.185:8093;

server 192.168.47.185:8094;

}

server {

listen 80;

server_name "192.168.47.185";

location / {

proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

proxy_set_header Host $http_host;

proxy_redirect off;

proxy_pass http://blue;}

Next steps:

  1. Creating and Fine-Tuning the Workflows
  2. Assigning Workflows to Package States

Previous steps:

  1. Defining Toggles in Config Files 
  2. Creating a new Package Type and Defining Package States
  3. Creating the Application and Related Components
  4. Defining the "Green" Profile
  5. Fine-Tuning the Environment