Skip to content

Microsoft Azure deployment

This guide covers installations to Microsoft Azure cloud environments using Linux or Windows virtual machine. After introductory commands in both environments, the instructions proceed with next steps applicable to both environments.

Linux setup steps

  1. Install Docker:

    sudo -i
    apt-get update
    apt-get install docker.io python3-pip
    usermod -aG docker $USER
    
  2. Install AWS CLI:

    sudo apt-get install curl unzip
    curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
    unzip awscliv2.zip
    sudo ./aws/install
    
  3. Configure AWS CLI:

    aws configure
        AWS Access Key ID None: <YOUR_API_KEY>
        AWS Secret Access Key None: <YOUR_SECRET_API_KEY>
        Default region name None: eu-central-1
        Default output format None: <None>
    
  4. Pull the IDVoice Server Docker image from AWS ECR:

    aws ecr get-login-password | \
        docker login --username AWS --password-stdin 367672406076.dkr.ecr.eu-central-1.amazonaws.com
    docker pull 367672406076.dkr.ecr.eu-central-1.amazonaws.com/voicesdk/voicesdk-server-protected-prod:3.9.0
    
  5. Install Azure CLI tools for Linux, use the detailed instructions or the below one-line command:

    curl -sL https://aka.ms/InstallAzureCLIDeb | sudo bash
    

Windows setup steps

On Windows, the commands presented below must be executed on PowerShell.

  1. Install Docker for Windows using the official instructions. This provides the CLI tools on a Windows machine, as well as a GUI.

  2. To load AWS libraries on PowerShell you must enable PowerShell script execution if you haven't yet (this step requires administrator rights):

    Set-ExecutionPolicy RemoteSigned
    
  3. Install the required PowerShell AWS libraries if you don't have them installed:

    Install-Module -Name AWS.Tools.Installer
    Install-AWSToolsModule AWS.Tools.ECR
    
  4. Set your ID R&D AWS Credentials (in this example we are creating a profile named IDRND):

    Set-AWSCredential -AccessKey <YOUR_AWS_ACCESS_KEY> -SecretKey <YOUR_AWS_SECRET_KEY> -StoreAs IDRND
    
  5. Get login information to use as input to a docker login command:

    (Get-ECRLoginCommand).Password | docker login --username AWS --password-stdin 367672406076.dkr.ecr.eu-central-1.amazonaws.com
    
  6. Pull the IDVoice Server Docker image from AWS ECR:

    docker pull 367672406076.dkr.ecr.eu-central-1.amazonaws.com/voicesdk/voicesdk-server-protected-prod:3.9.0
    

Cloud deployment (both Linux and Windows)

The following instructions follow the official Docker documentation.

  1. Log in to Azure:

    docker login azure
    
    This opens your web browser and prompts you to enter your Azure Credentials.

  2. Create an ACI context. In this example we are naming the context as idrnd-context. This command will list your subscriptions and resource groups so you can select which this context will use:

    docker context create aci idrnd-context
    
  3. Run the container:

    docker --context idrnd-context run -d --name idvoice-server -p 8080:8080 --cpus 2 -m 4G 367672406076.dkr.ecr.eu-central-1.amazonaws.com/voicesdk/voicesdk-server-protected-prod:3.9.0
    
    A context parameter must be supplied to docker run command. In this case, we are suppling the same context we created before. This must be an ACI context.

    It is also important to note the parameters --cpus and -m that allows you to set the number of cpus and the amount of memory the container will have. If these parameters are not supplied, Azure will run the container with the default configuration that is 1 CPU and 1GB of memory. In this case, IDVoice Server Docker image will not be able to start. At least 4GB of memory is required.

    After the command runs, terminal will show a line with the name you gave to your container. In this example, it will be idvoice-server. In order to get the IP address of this container, run the following command:

    docker --context idrnd-context inspect idvoice-server
    
    Please note that we supplied the ACI context. This command will show informations about the running container, including it’s IP Address. After this, you can start calling IDVoice Server API on this IP address.