Open topic with navigation

# Uploading Product Images

To upload the product images to the Azure Container Registry, you must first determine the ACR credentials, then perform the upload.

## Portal

To upload product images to the ACR, using Azure commands to get the credentials:

1. Navigate to the Azure management portal and open the Azure Container Registry.

2. Navigate to Settings and click Access keys.

3. Collect the login server, username, and password details.

   You will need these details to set environment variables and upload images to the container registry, later.

4. Use the details collected in the previous step to run the following commands, to set environment variables:

       ACR_USER_NAME=<username>
       ACR_USER_PASSWORD=<password>
       ACR_URL=<login server>

1. Unzip the OMT deployer to a local directory (such as `/tmp`).

For example:

    cd /tmp
    unzip cdf-deployer.zip...

2. Change directory to the deployer scripts folder.

For example:

    cd cdf-deployer/scripts/

3. Run the `uploadimages.sh` script with credentials from the ACR by running the following commands:

    ./uploadimages.sh -o <Org Name> -u $ACR_USER_NAME -p "$ACR_USER_PASSWORD"  -F <IMAGE> -r $ACR_URL -y

For example:

    ./uploadimages.sh -o your-org-name -r srgdemo.azurecr.io -u srgdemo -p GEev87wtAW+FtBGTyADxgr9Fivg6a2gC -F /tmp/cdf-byok-images-<VERSION>.tar -c 2
    ...
    Upload completed in 1690 seconds.
    Upload-process successfully completed.

    ./uploadimages.sh -o extremelyfocused -r extremelyfocused.azurecr.com -u jsmith -p testpassword -F /opt/arcsight/fusion-1.3.0.1810-master.tar
    ...
    Upload completed in 1690 seconds.
    Upload-process successfully completed.

## About Running `uploadimages.sh`

- Choose the value of the `-o` argument carefully, since it needs to be used during installation and for all `uploadimages.sh` calls.
- The `-c` argument indicates concurrent upload (maximum can be half of the CPU cores capacity), and can speed up the upload process.
- Uploading images is a long process, and can take up to 60 minutes to complete. The exact time for completion depends largely on connectivity.
- See `./uploadimages.sh --help` for more information.

# CLI

To upload product images to the ACR using Azure commands for credentials:

1. Run the following commands to set environment variables you will use in later steps.

       RESOURCE_GROUP=<Your Resource Group Name>

       ACR_NAME=<Your ACR Name>

       credentials=$(az acr credential show --name $ACR_NAME -g $RESOURCE_GROUP)
       ACR_USER_NAME=$(echo $credentials | jq -r '.username')
       ACR_USER_PASSWORD=$(echo $credentials | jq -r '.passwords[0].value')
       ACR_URL=$(az acr show --name $ACR_NAME -g $RESOURCE_GROUP | jq -r ".loginServer")

1. Unzip the OMT deployer to a local directory (such as `/tmp`).

For example:

    cd /tmp
    unzip cdf-deployer.zip...

2. Change directory to the deployer scripts folder.

For example:

    cd cdf-deployer/scripts/

3. Run the `uploadimages.sh` script with credentials from the ACR by running the following command:

    ./uploadimages.sh -o <Org Name> -u $ACR_USER_NAME -p "$ACR_USER_PASSWORD"  -F <IMAGE> -r $ACR_URL -y

For example:

    ./uploadimages.sh -o your-org-name -r srgdemo.azurecr.io -u srgdemo -p GEev87wtAW+FtBGTyADxgr9Fivg6a2gC -F /tmp/cdf-byok-images-<VERSION>.tar -c 2
    ...
    Upload completed in 1690 seconds.
    Upload-process successfully completed.

The -o your-org-name parameter must be in lowercase, as shown in the following.

    ./uploadimages.sh -o extremelyfocused -r extremelyfocused.azurecr.com -u jsmith -p testpassword -F /opt/arcsight/fusion-1.3.0.1810-master.tar
    ...
    Upload completed in 1690 seconds.
    Upload-process successfully completed.

## About Running `uploadimages.sh`

- Choose the value of the `-o` argument carefully, since it needs to be used during installation and for all `uploadimages.sh` calls.
- The `-c` argument indicates concurrent upload (maximum can be half of the CPU cores capacity), and can speed up the upload process.
- Uploading images is a long process, and can take up to 60 minutes to complete. The exact time for completion depends largely on your connectivity.
- See `./uploadimages.sh --help` for more information

Next Step: Installing the Database in Azure