AmpersandTarski / RAP

RAP is a tool that lets you analyse Ampersand models, generate functional specifications and make prototypes of information systems. It is the primary tool for students of the Open University of the Netherlands in the course Rule Based Design.
5 stars 3 forks source link

Deploy RAP to Azure Container Instances #166

Closed basplijnaer closed 1 year ago

basplijnaer commented 2 years ago

Purpose To deploy RAP to the Azure cloud we need to know if the Docker compose file can be used in its current form or if changes are required.

Tasks

basplijnaer commented 2 years ago

Findings

basplijnaer commented 2 years ago

Problem Getting the following error when trying to deploy to Azure Container Instances:

PS C:\Development\Ampersand\RAP> docker-compose up
[+] Running 0/1
 - Group rap  Error                                                                                                                                   37.2s 
containerinstance.ContainerGroupsClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. 
Status=<nil> Code="ServiceUnavailable" Message="The requested resource is not available in the location 'westeurope' at this moment. Please retry with a different resource request or in another location. Resource requested: '7' CPU '6.1' GB memory 'Linux' OS"

Azure Container instances has the following resource limits:

Region | Max CPU | Max Memory (GB) | VNET Max CPU | VNET Max Memory (GB) | Storage (GB) | GPU SKUs (preview) | Availability Zone support -- | -- | -- | -- | -- | -- | -- | -- West Europe | 4 | 16 | 4 | 16 | 50 | K80, P100, V100 | Y

Solution Set resource limits

 deploy:
    resources:
      limits:
        cpus: '0.5'
      reservations:
        cpus: '0.25'
hanjoosten commented 2 years ago

@basplijnaer , I have no trouble running above command. However, to build this image you need more memory than docker grants by default. I guess you need to check your memory limit.

basplijnaer commented 2 years ago

We are able to deploy the azure-docker-compose branch to Azure Container Instances using docker compose up. However, the containers are not yet usable as they keep restarting:

Image

basplijnaer commented 2 years ago

For docker login azure use: docker login azure --tenant-id [tenant-id]