Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $App_server = "Seq-prod-01" ## Name of the Seqeuncer server on which we install the applications and create the layers
- $App_server_username = "DOMAIN\User" ## Account with local Administrator rights on sequencer server
- $App_server_password = 'P@ssw0rd' ## Password of the administrator account
- $Datastore = 'SSD01' ## Name of VMware datastore
- $Apppath = 'cloudvolumes/apps' ## VMware application path
- $Templatepath = 'cloudvolumes/apps_templates' ## Template path in VMware
- $Template = 'template.vmdk' ## Name of the template vmdk
- $App_name = 'Firefox' ## Application name
- ### Create new app volume wait on completion
- write-host "Create App Volume"
- Invoke-WebRequest -WebSession $Login -Method Post -Uri "http://$server/cv_api/appstacks?bg=1&name=$App_name&datastore=$datastore&path=$Apppath&template_path=$templatepath&template_name=$Template" | out-null
- DO {
- write-host "Wait until App Volume is created..."
- $pending_jobs = ((Invoke-WebRequest -WebSession $Login -Method Get -Uri "http://$server/cv_api/jobs/pending").content | ConvertFrom-Json)
- Start-Sleep -s 2
- }UNTIL($pending_jobs.pending -eq "0")
- write-host "App Volume is created"
Advertisement
Add Comment
Please, Sign In to add comment