зеркало из https://github.com/Azure/AzureDSVM.git
Include pacakge related roxygen2 gfenerated files into the repo.
This commit is contained in:
Родитель
8149f84ceb
Коммит
6ceb2709c8
|
@ -0,0 +1,38 @@
|
|||
# Generated by roxygen2: do not edit by hand
|
||||
|
||||
export(createComputeInterface)
|
||||
export(dataConsumption)
|
||||
export(deployDSVM)
|
||||
export(deployDSVMCluster)
|
||||
export(dumpInterface)
|
||||
export(executeScript)
|
||||
export(existsRG)
|
||||
export(expenseCalculator)
|
||||
export(fileTransfer)
|
||||
export(getVMSizes)
|
||||
export(operateDSVM)
|
||||
export(pricingRates)
|
||||
export(setConfig)
|
||||
export(updateScript)
|
||||
import(dplyr)
|
||||
import(magrittr)
|
||||
importFrom(XML,htmlParse)
|
||||
importFrom(XML,xmlValue)
|
||||
importFrom(XML,xpathApply)
|
||||
importFrom(XML,xpathSApply)
|
||||
importFrom(httr,GET)
|
||||
importFrom(httr,POST)
|
||||
importFrom(httr,PUT)
|
||||
importFrom(httr,add_headers)
|
||||
importFrom(httr,authenticate)
|
||||
importFrom(httr,content)
|
||||
importFrom(httr,headers)
|
||||
importFrom(httr,http_status)
|
||||
importFrom(httr,status_code)
|
||||
importFrom(jsonlite,fromJSON)
|
||||
importFrom(lubridate,hour)
|
||||
importFrom(lubridate,minute)
|
||||
importFrom(lubridate,second)
|
||||
importFrom(stringr,str_c)
|
||||
importFrom(stringr,str_detect)
|
||||
importFrom(utils,URLencode)
|
|
@ -0,0 +1,12 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/azureDSVM-package.R
|
||||
\docType{package}
|
||||
\name{AzureDSVM-package}
|
||||
\alias{AzureDSVM}
|
||||
\alias{AzureDSVM-package}
|
||||
\title{AzureDSVM}
|
||||
\description{
|
||||
Support data science analytics with Azure resources.
|
||||
}
|
||||
\keyword{package}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/computeInterface.R
|
||||
\name{createComputeInterface}
|
||||
\alias{createComputeInterface}
|
||||
\title{Create an compute interface object that handles interaction with remote instance.}
|
||||
\usage{
|
||||
createComputeInterface(remote, user, script, config)
|
||||
}
|
||||
\arguments{
|
||||
\item{remote}{URL of remote instance.}
|
||||
|
||||
\item{user}{User name.}
|
||||
|
||||
\item{script}{R script with full path for execution at remote instance.}
|
||||
|
||||
\item{config}{Configuration for remote execution. Settings include computing context, data reference, etc.}
|
||||
}
|
||||
\value{
|
||||
An S3 compute interface object.
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/expenseCalculator.R
|
||||
\name{dataConsumption}
|
||||
\alias{dataConsumption}
|
||||
\title{Get data consumption of an Azure subscription for a time period. Aggregation method can be either daily based or hourly based.}
|
||||
\usage{
|
||||
dataConsumption(context, instance, timeStart, timeEnd, granularity = "Hourly")
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{AzureSMR context object.}
|
||||
|
||||
\item{instance}{Instance of Azure instance name that one would like to check expense. For example, it can be the name of a virtual machine.}
|
||||
|
||||
\item{timeStart}{Start time.}
|
||||
|
||||
\item{timeEnd}{End time.}
|
||||
|
||||
\item{granularity}{Aggregation granularity. Can be either "Daily" or "Hourly".}
|
||||
}
|
||||
\note{
|
||||
Formats of start time point and end time point follow ISO 8601 standard. Say if one would like to calculate data consumption between Feb 21, 2017 to Feb 25, 2017, the inputs should be "2017-02-21 00:00:00" and "2017-02-25 00:00:00", for start time point and end time point, respectively. For hourly based calculation, note there should be no minute and second included.
|
||||
}
|
||||
|
|
@ -0,0 +1,57 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/deployDSVM.R
|
||||
\name{deployDSVM}
|
||||
\alias{deployDSVM}
|
||||
\title{Deploy a new Data Science Virtual Machine (DSVM).}
|
||||
\usage{
|
||||
deployDSVM(context, resource.group, location, hostname, username,
|
||||
size = "Standard_DS2_v2", os = "Linux", authen = ifelse(os == "Linux",
|
||||
"Key", "Password"), pubkey = "", password = "", dns.label = hostname,
|
||||
mode = "Sync")
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{Authentication context of AzureSMR encapsulating the
|
||||
TID, CID, and key obtained from Azure Actrive Directory.}
|
||||
|
||||
\item{resource.group}{The Azure resource group where the DSVM is
|
||||
created.}
|
||||
|
||||
\item{location}{Location of the data centre to host the DSVM.}
|
||||
|
||||
\item{hostname}{Name of the DSVM. Lowercase characters or numbers
|
||||
only. Special characters are not permitted.}
|
||||
|
||||
\item{username}{User name of the DSVM. It should be different from
|
||||
`name`.}
|
||||
|
||||
\item{size}{Size of the DSVM. The default is "Standard_D1_v2". All
|
||||
available sizes can be obtained by function `getVMSizes`.}
|
||||
|
||||
\item{os}{Operating system of DSVM. Permitted values are "Linux"
|
||||
and "Windows". The default is to deploy a Linux Data Science
|
||||
Virtual Machine.}
|
||||
|
||||
\item{authen}{Either "Key" for public-key based authentication
|
||||
(with Linux) or "Password" for a password based authentication
|
||||
(Linux or Windows). Default is to use public key authentication
|
||||
for Linux and password based authentication for Windows.}
|
||||
|
||||
\item{pubkey}{Public key for the DSVM. Only applicable for
|
||||
public-key based authentication of Linux based DSVM.}
|
||||
|
||||
\item{password}{Pass word for the DSVM.}
|
||||
|
||||
\item{dns.label}{DNS label for the VM address. The URL for
|
||||
accessing the deployed DSVM will be
|
||||
"<dns_label>.<location>.cloudapp.azure.com}
|
||||
|
||||
\item{mode}{Mode of virtual machine deployment. Default is "Sync".}
|
||||
}
|
||||
\details{
|
||||
If the deployment fails visit the Azure portal
|
||||
https://ms.portal.azure.com and browse to the resource group and
|
||||
click on the failed deployment link to view the failure
|
||||
message. Typical errors include DnsRecordInUse or
|
||||
StorageAccountAlreadyTaken. If so then choose a different hostname.
|
||||
}
|
||||
|
|
@ -0,0 +1,74 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/deployDSVMCluster.R
|
||||
\name{deployDSVMCluster}
|
||||
\alias{deployDSVMCluster}
|
||||
\title{Deploy a cluster of Linux Data Science Virtual Machines on Azure.}
|
||||
\usage{
|
||||
deployDSVMCluster(context, resource.group, location, hostnames, usernames,
|
||||
pubkeys, count, size = "Standard_D1_v2", dns.labels = hostnames)
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{AzureSMR active context.}
|
||||
|
||||
\item{resource.group}{The Azure resource group where the DSVM is
|
||||
allocated.}
|
||||
|
||||
\item{location}{Location of the data centre to host the DSVM.}
|
||||
|
||||
\item{hostnames}{Hostnames for the DSVMs. Lowercase characters or
|
||||
numbers only. If a single hostname is supplied and count > 1 then
|
||||
the hostname will be used as a prefix for a sequential count of
|
||||
hostnames.}
|
||||
|
||||
\item{usernames}{Usernames for the admin account created on the
|
||||
DSVM. If a single username is supplied then that username is used
|
||||
as the admin user on each host. Otherwise a username is provided
|
||||
for each of the DSVMs.}
|
||||
|
||||
\item{pubkeys}{Public keys for the DSVM. This is only applicable
|
||||
for public-key based authentication of Linux based DSVM. One or a
|
||||
vector of public keys can be provided, depending on the count or
|
||||
the number of hostnames or usernames.}
|
||||
|
||||
\item{count}{If provided this is the number of DSVM instances to be
|
||||
created. If not provided the number of DSVMs created will be
|
||||
either the number of names provided or the number of usernames
|
||||
provided.}
|
||||
|
||||
\item{size}{The size of the DSVMs. Each DSVM is the same size.}
|
||||
|
||||
\item{dns.labels}{DNS labels for the VM. By default this is the
|
||||
hostnames but is not required to be. The fully qualified domain
|
||||
name for accessing the deployed DSVM will then be
|
||||
"<dns.label_label>.<location>.cloudapp.azure.com".}
|
||||
}
|
||||
\description{
|
||||
Creates a cluster of Data Science Virtual Machines and enables the
|
||||
DSVMs to communicate across the cluster via public key based
|
||||
credentials for high performance computation. All DSVMs in the
|
||||
cluster are based on Linux OS and use public key cryptogrphy for
|
||||
log in.
|
||||
}
|
||||
\details{
|
||||
We identify two specific use cases but recognise there are many
|
||||
that are supported by this function.
|
||||
|
||||
A cluster is intended as a High Performance Compute engine across
|
||||
the deployed DSVMs supporting a parallel computing context as is
|
||||
available with Microsoft R Server ScaleR package. A cluster is a
|
||||
deployment of multiple identitical DSVMs. A single admin username
|
||||
and public key will be used across the cluster. The individual
|
||||
machine names will be constructed from the provided name with
|
||||
sequential numbers. The data scientist will typically connect to
|
||||
the cluster from their local desktop/laptop running R locally with
|
||||
remote execution for computation. A cluster is typcially created by
|
||||
the data scientist when needed and the resource group deleted on
|
||||
completion of the activity.
|
||||
|
||||
A collection is a deployment with different usernames and public
|
||||
keys for each of the DSVMS. A vector of usernames must be
|
||||
provided. A colleciton is often used in creating multiple DSVMs for
|
||||
a group of data scientists or for training. A colleciton is often
|
||||
longer lasting than a cluster.
|
||||
}
|
||||
|
|
@ -0,0 +1,15 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/computeInterface.R
|
||||
\name{dumpInterface}
|
||||
\alias{dumpInterface}
|
||||
\title{Dump the interface configuration.}
|
||||
\usage{
|
||||
dumpInterface(object)
|
||||
}
|
||||
\arguments{
|
||||
\item{object}{The compute interface object.}
|
||||
}
|
||||
\value{
|
||||
No return. Print compute interface object information.
|
||||
}
|
||||
|
|
@ -0,0 +1,47 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/executeScript.R
|
||||
\name{executeScript}
|
||||
\alias{executeScript}
|
||||
\title{Remote execution of R script in an R interface new_interface.}
|
||||
\usage{
|
||||
executeScript(context, resourceGroup, machines, remote, user, script, master,
|
||||
slaves, computeContext)
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{AzureSMR context.}
|
||||
|
||||
\item{resourceGroup}{Resource group of Azure resources for computation.}
|
||||
|
||||
\item{machines}{Remote DSVMs that will be used for computation.}
|
||||
|
||||
\item{remote}{IP address or FQDN for a computation engine. For
|
||||
DSVM, it is either the fully qualified domain name (usually in the format of
|
||||
<hostname>.<location>.cloudapp.azure.com) or its public IP
|
||||
address. Note if more than one machines are used for execution,
|
||||
the remote is used as master node by default.}
|
||||
|
||||
\item{user}{Username for logging into the remote resource.}
|
||||
|
||||
\item{script}{R script to be executed on remote resource(s).}
|
||||
|
||||
\item{master}{IP address or URL of a DSVM which will be used as the
|
||||
master. By default is remote.}
|
||||
|
||||
\item{slaves}{IP addresses or URLs of slave DSVMs.}
|
||||
|
||||
\item{computeContext}{Computation context of Microsoft R Server
|
||||
under which the mechanisms of parallelization (e.g., local
|
||||
parallel, cluster based parallel, or Spark) is
|
||||
specified. Accepted computing context include "localParallel",
|
||||
"clusterParallel", "Hadoop", and "Spark".}
|
||||
}
|
||||
\value{
|
||||
Status of scription execution.
|
||||
}
|
||||
\description{
|
||||
Remote execution of R script in an R interface new_interface.
|
||||
}
|
||||
\details{
|
||||
For a localParallel compute context,
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/existsRG.R
|
||||
\name{existsRG}
|
||||
\alias{existsRG}
|
||||
\title{Check if a resource group exists.}
|
||||
\usage{
|
||||
existsRG(context, resource.group, location, verbose = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{Authentication context of AzureSMR encapsulating the
|
||||
TID, CID, and key obtained from Azure Actrive Directory.}
|
||||
|
||||
\item{resource.group}{The Azure resource group where the DSVM is
|
||||
created.}
|
||||
|
||||
\item{location}{Location of the data centre to host the DSVM.}
|
||||
}
|
||||
|
|
@ -0,0 +1,32 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/expenseCalculator.R
|
||||
\name{expenseCalculator}
|
||||
\alias{expenseCalculator}
|
||||
\title{Calculate cost of using a specific instance of Azure for certain period.}
|
||||
\usage{
|
||||
expenseCalculator(context, instance, timeStart, timeEnd, granularity, currency,
|
||||
locale, offerId, region)
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{AzureSMR context.}
|
||||
|
||||
\item{instance}{Instance of Azure instance that one would like to check expense. No matter whether resource group is given or not, if a instance of instance is given, data consumption of that instance is returned.}
|
||||
|
||||
\item{timeStart}{Start time.}
|
||||
|
||||
\item{timeEnd}{End time.}
|
||||
|
||||
\item{granularity}{Aggregation granularity. Can be either "Daily" or "Hourly".}
|
||||
|
||||
\item{currency}{Currency in which price rating is measured.}
|
||||
|
||||
\item{locale}{Locality information of subscription.}
|
||||
|
||||
\item{offerId}{Offer ID of the subscription. Detailed information can be found at https://azure.microsoft.com/en-us/support/legal/offer-details/}
|
||||
|
||||
\item{region}{region information about the subscription.}
|
||||
}
|
||||
\value{
|
||||
Total cost measured in the given currency of the specified Azure instance in the period.
|
||||
}
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/executeScript.R
|
||||
\name{fileTransfer}
|
||||
\alias{fileTransfer}
|
||||
\title{Upload or download files.}
|
||||
\usage{
|
||||
fileTransfer(from = ".", to = ".", user, file)
|
||||
}
|
||||
\arguments{
|
||||
\item{from}{Source location (path) of file.}
|
||||
|
||||
\item{to}{Target location (path) of file.}
|
||||
|
||||
\item{file}{File name - a character string.}
|
||||
}
|
||||
\note{
|
||||
File transfer is implemented by `scp` with public key based authentication.
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/getVMSizes.R
|
||||
\name{getVMSizes}
|
||||
\alias{getVMSizes}
|
||||
\title{Get available sizes for data science virtual machines.}
|
||||
\usage{
|
||||
getVMSizes(context, location)
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{An AzureSMR context.}
|
||||
|
||||
\item{location}{Location of the Azure resources.}
|
||||
}
|
||||
\value{
|
||||
A data frame that contains basic information
|
||||
about the available DSVM sizes.
|
||||
}
|
||||
\description{
|
||||
Get available sizes for data science virtual machines.
|
||||
}
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/operateDSVM.R
|
||||
\name{operateDSVM}
|
||||
\alias{operateDSVM}
|
||||
\title{Operations on a data science virtual machine. Available operations are "Check", "Start", "Stop", and "Delete".}
|
||||
\usage{
|
||||
operateDSVM(context, resource.group, names, operation = "Check")
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{AzureSMR context.}
|
||||
|
||||
\item{resource.group}{Resource group.}
|
||||
|
||||
\item{operation}{Operations on the DSVM. Available operations are "Check", "Start", "Stop", "Delete", which check the status of, start running, stop running, and delete a DSVM, respectively.}
|
||||
|
||||
\item{name}{Name(s) of the DSVM(s).}
|
||||
}
|
||||
|
|
@ -0,0 +1,20 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/expenseCalculator.R
|
||||
\name{pricingRates}
|
||||
\alias{pricingRates}
|
||||
\title{Get pricing details of resources under a subscription.}
|
||||
\usage{
|
||||
pricingRates(context, currency, locale, offerId, region)
|
||||
}
|
||||
\arguments{
|
||||
\item{context}{- Azure Context Object.}
|
||||
|
||||
\item{currency}{Currency in which price rating is measured.}
|
||||
|
||||
\item{locale}{Locality information of subscription.}
|
||||
|
||||
\item{offerId}{Offer ID of the subscription. Detailed information can be found at https://azure.microsoft.com/en-us/support/legal/offer-details/}
|
||||
|
||||
\item{region}{region information about the subscription.}
|
||||
}
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/computeInterface.R
|
||||
\name{setConfig}
|
||||
\alias{setConfig}
|
||||
\title{Set configuration for the compute interface object.}
|
||||
\usage{
|
||||
setConfig(object, machine_list, dns_list, machine_user, master, slaves, data,
|
||||
context)
|
||||
}
|
||||
\arguments{
|
||||
\item{object}{An S3 compute interface object.}
|
||||
|
||||
\item{machine_list}{List of remote instances that execute R scripts.}
|
||||
|
||||
\item{dns_list}{DNS of the remote instances.}
|
||||
|
||||
\item{machine_user}{User name of the remote instances.}
|
||||
|
||||
\item{master}{Master node of the machine.}
|
||||
|
||||
\item{slaves}{Slave nodes of the machine.}
|
||||
|
||||
\item{data}{Reference to data used in the analytics.}
|
||||
|
||||
\item{context}{Computing context available in Microsoft R Server for running the analytics.}
|
||||
}
|
||||
|
|
@ -0,0 +1,12 @@
|
|||
% Generated by roxygen2: do not edit by hand
|
||||
% Please edit documentation in R/computeInterface.R
|
||||
\name{updateScript}
|
||||
\alias{updateScript}
|
||||
\title{Update a worker script with compute interface object configuration.}
|
||||
\usage{
|
||||
updateScript(object)
|
||||
}
|
||||
\arguments{
|
||||
\item{object}{compute interface object.}
|
||||
}
|
||||
|
Загрузка…
Ссылка в новой задаче