Reserved IP for Azure Cloud Service doesn't persist -


i'm struggling grips reserved ip addresses in azure cloud service.

i have cloud service staging , productions deployments , need @ least production deployment have stable ip address. set 2 reserved ip addresses described here assigned reserved ips production , staging deployments power shell:

set-azurereservedipassociation -reservedipname myreservedip1 -servicename mycloudservice -slot “production” set-azurereservedipassociation -reservedipname myreservedip2 -servicename mycloudservice -slot “staging” 

all , reserved ips assigned respective instances , swapping maintains correct addresses. problem if delete 1 of deployments , redeploy ip address not maintained.

i tried assigning reserved ip address cloud service without specifying "slot" , assigned fine not seem used in either production or staging deployments.

set-azurereservedipassociation -reservedipname myreservedip -servicename mycloudservice 

my usual workflow deploy staging swap production once have tested working fine. scenario how can ensure production deployment gets reserved ip address when swap staging, if there no current production instance deployed?

the azure documentation says "ip address cloud service same resources shutdown or deallocated" shouldn't assigned production ip address maintained if delete production instance , swap staging?

this worked me:

create reserved ips

new-azurereservedip -reservedipname "ip1" -location "east 2"

new-azurereservedip -reservedipname "ip2" -location "east 2"

deploy production slot following network configuration in .cscfg file:

<networkconfiguration>     <addressassignments>       <reservedips>         <reservedip name="ip1" />       </reservedips>     </addressassignments>   </networkconfiguration> 

deploy staging slot following configuration:

<networkconfiguration>     <addressassignments>       <reservedips>         <reservedip name="ip2" />       </reservedips>     </addressassignments>   </networkconfiguration> 

continue using normal workflow - deploy staging, swap production. ip addresses should stay associated slots (ip1 in production , ip2 in staging).


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -