зеркало из https://github.com/Azure/AzureDSVM.git
Cleanup. Don't eval Windows - failing on storage.
This commit is contained in:
Родитель
c3b72da488
Коммит
f4649c4dcf
|
@ -5,9 +5,10 @@ author= "Graham Williams"
|
|||
|
||||
# Use Case
|
||||
|
||||
A Linux Data Science Virtual Machine (DSVM) is deployed, a remote
|
||||
command is executed to demonstrates it exists, and then the resource
|
||||
group is delete (unless the resource group pre-exists this script.
|
||||
A Linux Data Science Virtual Machine (DSVM) is deployed and a remote
|
||||
command is executed to demonstrates it exists. Code is included but
|
||||
not run to then delete the resource group if the resources are no
|
||||
longer required. Once deleted consumption will cease.
|
||||
|
||||
This script is best run interactively to review its operation and to
|
||||
ensure that the interaction with Azure completes.
|
||||
|
@ -79,8 +80,8 @@ library(rattle) # Use weatherAUS as a "large" dataset.
|
|||
|
||||
RG <- "my_dsvm_rg_sea" # Will be created if not already exist then kill.
|
||||
LOC <- "southeastasia" # Where the resource group (resources) will be hosted.
|
||||
LDSVM <- "mydsvm001"
|
||||
WDSVM <- "mydsvm002"
|
||||
LDSVM <- "myldsvm"
|
||||
WDSVM <- "mywdsvm"
|
||||
```
|
||||
|
||||
```{r connect}
|
||||
|
@ -103,7 +104,7 @@ context %>%
|
|||
print() ->
|
||||
rg_pre_exists
|
||||
```
|
||||
# Creation
|
||||
# Create a Resource Group
|
||||
|
||||
Create the resource group within which all resources we create will be
|
||||
grouped.
|
||||
|
@ -121,6 +122,9 @@ if (! rg_pre_exists)
|
|||
|
||||
}
|
||||
```
|
||||
|
||||
# Deploy a Linux Data Science Virtual Machine
|
||||
|
||||
Create the actual Linux DSVM with public-key based authentication
|
||||
method. Name, username, and size can also be configured.
|
||||
|
||||
|
@ -138,25 +142,10 @@ ldsvm <- deployDSVM(context,
|
|||
pubkey=PUBKEY)
|
||||
|
||||
ldsvm
|
||||
|
||||
operateDSVM(context, RG, LDSVM, operation="Check")
|
||||
```
|
||||
|
||||
`deployDSVM` also supports deployment of Windows DSVM, which can be
|
||||
achieved by setting the argument of `os` to "Windows".
|
||||
|
||||
```{r}
|
||||
wdsvm <- deployDSVM(context,
|
||||
resource.group=RG,
|
||||
location=LOC,
|
||||
name=WDSVM,
|
||||
username=USER,
|
||||
size="Standard_DS1_v2",
|
||||
os="Windows",
|
||||
password=PASSWORD)
|
||||
|
||||
wdsvm
|
||||
```
|
||||
|
||||
|
||||
Prove that the server exists.
|
||||
|
||||
```{r prove exists}
|
||||
|
@ -171,15 +160,38 @@ cmd <- paste("ssh -q",
|
|||
ldsvm, "uptime")
|
||||
cmd
|
||||
system(cmd)
|
||||
|
||||
```
|
||||
|
||||
# Deploy a Windows Data Science Virtual Machine
|
||||
|
||||
`deployDSVM` also supports deployment of Windows DSVM, which can be
|
||||
achieved by setting the argument of `os` to "Windows". This is
|
||||
currently (20170217) failing with: *Storage account e2o6bbsjuyjwdsvmsa
|
||||
not found. Ensure storage account is not deleted and belongs to the
|
||||
same Azure location as the VM.*
|
||||
|
||||
```{r, eval=FALSE}
|
||||
wdsvm <- deployDSVM(context,
|
||||
resource.group=RG,
|
||||
location=LOC,
|
||||
name=WDSVM,
|
||||
username=USER,
|
||||
size="Standard_DS1_v2",
|
||||
os="Windows",
|
||||
password=PASSWORD)
|
||||
|
||||
wdsvm
|
||||
```
|
||||
|
||||
|
||||
# Optional Stop
|
||||
|
||||
We can stop the ...
|
||||
|
||||
```{r}
|
||||
if (FALSE)
|
||||
operateDSVM(context, RG, LVM, operation="Stop")
|
||||
operateDSVM(context, RG, LDSVM, operation="Stop")
|
||||
```
|
||||
|
||||
# Optional Cleanup
|
||||
|
|
Загрузка…
Ссылка в новой задаче