Seeazure is a command line utility that can be used to deploy packages to Azure and control aspects of the Azure environment and the deployments therein. Whilst not exhaustive in functionality, it is rich enough to perform the required tasks .
seeazure -command [-resourcetype:resourcename] [optional_parameters]
All operations need the following settings specified in seeazure.exe.config:
See the Azure documentation for how to generate and store these certificates.
These values can be overridden by using command line switches:
Specific operations will require one of the following resources to be defined:
Specifies the storage service/account name for commands that deal with storage account operations.
Specifies the hosted service name for commands that deal with hosted service operations.
Specifies the affinity group for commands that deal with affinity groups.
Specifies the location constraint for commands that deal with locations.
Lists the properties for the storage_service.
Lists all storage services underneath the subscription.
Acts on storage accounts only. Displays the primary and secondary keys for the account. Should have the storage account resource specified.
Acts on storage accounts only. Regenerates storage keys with the key_type parameter specifying which key to regenerate. Should have the storage account resource specified.
Deploys the file name pointed to by the full path to a container identified with <containername> with a target filename identified by <targetfilename>.
The primary key of the storage_service identified by the -storage_service parameter is retrieved and used to store the file in blob storage.
Lists the properties for the hosted_service.
Creates a hosted service.
Lists all hosted services under the subscription. Use -view_properties to view details on a particular hosted service.
Updates a hosted service.
Deletes hosted service. Should have the hosted_service resource specified.
The deployment operations require that the hosted service resource is specified.
View details of a specified deployment. You can specify the deployment either by slot type or by name.
View details of a specified deployment. You can specify the deployment either by slot type or by name.
Create a new deployment. The package parameter should have the URI to a .cspkg in blob storage whose storage account is part of the same subscription-project. The -config parameter should specifiy a .cscfg file on disk. Note that there shouldn't be a deployment of the same name or in the same slot when executing this command. If -warnings_as_error is specified, warnings are returned and operation is terminated.
Swaps the deployments in production and stage. To make sure the command works on the deployments you expect them to, you need to pass the name of the deployment currently in production and the name of the deployment currently in staging. If you don't have any resource in production, you can leave it empty.
Deletes the specified deployment. Note that the deployment should be in suspended state.
Deletes the specified deployment. Note that the deployment should be in suspended state.
Change deployment status to running or suspended.
Change deployment status to running or suspended.
Change the deployment's configuration.
Change the deployment's configuration.
Initiates an in_place upgrade of the specified deployment.
Initiates an in place upgrade of the specified deployment.
Walks the specified upgrade domain.
Walks the specified upgrade domain.
Requests the reboot of a single role instance in the deployment.
Requests the reboot of a single role instance in the deployment.
Requests the reimaging of a single role instance in the deployment.
Requests the reimaging of a single role instance in the deployment.
These operations require that the hosted service resource is specified.
Lists certificate thrumbprints for a hosted service.
Adds a certificate to the specified hosted service. . pfx is the only format supported currently
Deletes certificate with specified thumbprint and algorithm.
Deploying a package file to Azure Storage mfcics1 in preparation for a deployment
seeazure -deploy_file -storage_service:mfcics1 -file_name:"d:\dev\app.publish\SEECloud.cspkg" -container_name:vsdeploy -target_file_name:SEECloud.cspkg
Creating a new deployment in staging
This assumes that there is a storage account called 'myaccount' under the same subscription and a package in the 'packages' container. It also uses a SEECloud.cscfg config file in the current working directory.
seeazure -create_deployment -slot:staging -hosted_service:testhostedservice -name:testdep -label:testlabel -config:.\SEECloud.cscfg -package:http://myaccount.blob.core.windows.net/vsdeploy/SEECloud.cspkg
Updating deployment status to running
seeazure -update_deployment -slot:staging -hosted_service:testhostedservice -status:runningWe could replace the last parameter with a -name parameter as well.
Swapping staging and production
seeazure -swap_deployment -hosted_service:testhostedservice -source_deployment:testdep -production_slot:somedeploymentinprod
Changing configuration number of instances
We'll assume the configuration file has the number of role instances specified.
seeazure -change_deployment_config -hosted_service:testhostedservice -slot:production -config:./SEECloud.cscfg