> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sync.cdata.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Azure Marketplace Edition

export const companyNameLower = "cdata";

export const companyName = "CData";

export const siteNameShortLower = "sync";

export const siteNameShort = "Sync";

export const siteName = "CData Sync";

The Azure Marketplace Edition of {siteName} is a Linux (Ubuntu) virtual machine (VM) with {siteNameShort} preconfigured and ready to run, with little additional configuration necessary. This offering is available in the Azure Marketplace by searching for <a href={`https://marketplace.microsoft.com/en-us/product/virtual-machines/${companyNameLower}software.${companyNameLower}${siteNameShortLower}?tab=Overview`} target="_blank" rel="noopener noreferrer">{siteName}</a>.

The following sections explain how to create your {siteNameShort} VM, access {siteNameShort} data from your browser, and manage your VM.

## Launching the {siteName} Instance

1. Click **Get It Now** in the left pane of the **Cloud Data Pipeline ({siteName})** page in the marketplace.
2. In the **Create this app in Azure** dialog box, select the {siteNameShort} edition that you want from the **Software plan** list.
   * **CData {siteName} Professional:** This plan provides ten connections.
   * **CData {siteName} Enterprise:** This plan provides twenty connections.
   * **CData Sync (BYOL):** This option enables you to build your own license if the first two options do not meet your requirements. When you choose this option, you need to contact the <a href="https://www.cdata.com/company/contact.aspx" target="_blank" rel="noopener noreferrer">CData Sales Team</a> to purchase a separate license.
3. Click **Continue** to open the **CData Sync** page on the Microsoft Azure website.
4. Click **Create** next to your selected edition in the **Plan** drop-down list to create your VM.
5. Create a secure shell (SSH) key-pair to connect directly to the VM, and make any additional changes, as necessary.
6. Click **Review + Create** to complete the process.

## Accessing {siteName} from Your Browser

After you create your {siteNameShort} virtual instance, that instance is available under **Virtual Machines** in the <a href="https://portal.azure.com/" target="_blank" rel="noopener noreferrer">Azure portal</a>. When your virtual machine (VM) starts up, follow these steps:

1. Locate and copy the public IP address. Then, include that address in a URL, as shown below, to access {siteNameShort} in your browser.

         https\://<em>PublicIPAddress</em>

2. Log in with the following credentials:
   * **User**: The default username is **admin**.
   * **Password**: The password is the VM name prefixed with *{siteNameShort}:*. For example, if the VM name is *My{companyName}{siteNameShort}*, the initial password to access {siteNameShort} is {siteNameShort}:*My{companyName}{siteNameShort}*. After you log in, you can change the password for the **admin** user from the upper right of the browser.

Now, follow the instructions in [Creating Connections](../configuring-jobs#creating-connections) to create your connections and manage your jobs.

## Managing Your Virtual Machine (VM)

The {siteName} offering from Azure Marketplace works immediately, without additional configuration. However, advanced users can customize {siteNameShort} to their preferences.

### Accessing the Instance from a Secure Shell (SSH)

Connecting to your Azure {siteNameShort} instance via SSH is useful for advanced configuration of the service. The {siteNameShort} instance is based on a standard Ubuntu 22 virtual machine (VM), and the main user is **ubuntu**. You can connect to the instance via SSH by using the key pair that you select when you launch the instance, as shown below:

```
ssh -i MyKeyPair.pem ubuntu@PublicIPAddress
```

### Controlling the {siteName} Service

{siteNameShort} is run as a **systemd** service (rather than being run in-process) in an Azure VM deployment. The service definition file is available in the following location:

`etc/systemd/system/sync.service`

You should use the following systemd commands to stop, start, and restart {siteNameShort}:

```
sudo systemctl restart sync
sudo systemctl stop sync
sudo systemctl start sync
```

<Note>Before you make any changes to the {siteNameShort} application, you should stop the service first.</Note>

### Installation Directory

All the {siteNameShort} configuration and application data resides in the application directory. The default application directory (*`ApplicationDirectory`*) is shown below:

`/opt/sync`

You can configure the application directory's path in the sync.properties file, as described in [Configuring the Application Directory](#configuring-the-application-directory).

#### db Folder

The `db` folder contains the database files for the default application database. Starting with version 26.2, {siteNameShort} uses an embedded H2 database as the default application database. Existing installations continue to use the legacy embedded Derby database. {siteNameShort} does not automatically migrate existing installations to H2.

You can also configure {siteNameShort} to use an external enterprise database, such as [Microsoft SQL Server, PostgreSQL, or MySQL](#application-database).

#### libs Folder

The `libs` folder is where the application reads external resources, like drivers for connectors that require an external driver. Place JAR files in this folder and restart {siteNameShort} to enable the application to read these resources.

#### Configuring the Application Directory

You can configure the *`ApplicationDirectory`* location in the sync.properties file, which is located next to the sync.jar file.

To configure *`ApplicationDirectory`* to a non-default location:

1. Locate the following snippet within the sync.properties file:

   ```
   cdata.app.directory =
   ```

2. Add the path to the new location for *`ApplicationDirectory`*, as shown in this example:

   ```
   cdata.app.directory=/mnt/shared/sync
   ```

### Application Database

New {siteNameShort} installations use an embedded H2 database as the default application database. Existing installations continue to use the legacy embedded Derby database. {siteNameShort} does not automatically migrate existing installations to H2.

The application database is in the `db` folder of the application directory, [as described earlier](#db-folder).

You can also configure {siteNameShort} to use an external enterprise database, such as Microsoft SQL Server, PostgreSQL, or MySQL. While this section describes one way to configure an external database, the recommended approach is to follow the steps in the [Migration documentation](../administration/settings-page/migration).

To configure the application database:

1. Locate the following snippet in the sync.properties file:

   ```
   cdata.app.db=
   ```

2. Set the connection string to the target database that you want, as shown in this example:

   ```
   cdata.app.db=jdbc:cdata:mysql:Server=MySQLServer;
   Port=3306;Database=mysql;User=User;Password=Password;useconnectionpooling=true
   ```

3. Restart the {siteNameShort} service so that the changes in the previous steps take effect.

### Ports and SSL

By default, {siteNameShort} listens for SSL connections (HTTPS) on port 8443. The application cannot bind to the default HTTPS port (443) because of permissions restrictions. Therefore, an iptables rule redirects traffic from port 443 to port 8443. No further action is required for standard HTTPS traffic to reach the Sync web server.

{siteNameShort} VMs include a self-signed certificate for use when it is hosting an SSL server. If the SSL server needs to be hosted by using a certificate signed by a certificate authority (CA), then you should contact the CA directly to obtain a certificate.

If you want to add a plaintext/non-SSL port (for example, HTTP instead of HTTPS), you need to edit the sync.properties file to enable the plaintext listener. Because of permissions restrictions, the listener cannot bind directly to port 80. Therefore, it is established on port 8181, and an iptables rule must be established to forward traffic from port 80 to port 8181, as follows:

1. Stop the {siteNameShort} service by submitting this command:

   ```
   sudo systemctl stop sync
   ```

2. Locate the http.port snippet in the sync.properties file:

   ```
   cdata.http.port=
   ```

3. Set the port to 8181 and save the changes.

4. Create a new iptables rule, as shown below, to forward traffic from port 80 to port 8181:

   ```
   iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8181 
   /usr/libexec/iptables/iptables.init save
   ```

5. Restart the {siteNameShort} service so that the changes in the previous steps take effect.

### Upgrading

Upgrading {siteNameShort} requires launching a new instance of the latest {siteNameShort} VM. Before launching the new instance, you should copy data from the old instance so that the application configuration is preserved in the new instance.

{siteNameShort} includes a migration tool that enables you to export and import the configured connections and jobs easily in the application.

To use the migration tool:

1. Navigate to the **Migration** tab on the **Settings** page.
2. Click **Export** to export all settings (connections, jobs, users, and history) to a ZIP file.
3. Import the configuration settings from the same **Migration** tab into the new instance.
4. Click **Import**.
5. Navigate to the ZIP file that you created in step 2.

### Adding or Updating a Connector Manually

You can add new connectors through the UI by following the steps outlined in [Adding a Connection](../administration/connections-page#adding-a-connection). However, you might be required to update or add the connector manually to your instance by following these steps:

1. Use SSH to navigate to your VM.

2. Stop the Jetty service by submitting this command:

   ```
   sudo systemctl stop sync
   ```

3. Open a new command prompt and copy the connector to your instance by using the following `scp` command:

   ```
   scp -i ./FolderPath/MyKeyPair.pem ./FolderPath/cdata.jdbc.ProviderName.jar ubuntu@InstancePublicDNS:/home/ubuntu/cdata.jdbc.ProviderName.jar
   ```

4. Copy the connector to the `libs` folder by submitting this command:

   ```
   sudo cp ./home/ubuntu/cdata.jdbc.ProviderName.jar /opt/sync/libs/cdata.jdbc.ProviderName.jar
   ```

5. Restart the {siteNameShort} service by submitting this command:

   ```
   sudo systemctl start sync
   ```
