sparkler.create: Create an Instance with Sparkler

Description Usage Arguments Details Value Creation logic Examples

View source: R/sparkler.R

Description

Create an Instance with Sparkler

Usage

1
sparkler.create(client, regionVM, typeVM, sshPubKeyPath, sshPrivKeyPath)

Arguments

client

The name of the resource, provided by the client when initially creating the resource

regionVM

The name of datacenter: SBG3, BHS3, WAW1, UK1, DE1, GRA3

typeVM

The range of your cloud server ( s1-2, s1-4: https://www.ovh.co.uk/public-cloud/instances/prices/)

sshPubKeyPath

The path of public SSH key

sshPrivKeyPath

The path of private SSH key

Details

Make sure the instance is big enough to handle what you need, for instance the default s1-4 will hang the instance when trying to install large R libraries.

Value

A instance object

Creation logic

You need these parameters defined to call the right function for creation. Check the function definitions for more details.

If the Instance name exists but is not running, it starts the Instance and return the Instance object If the Instance doesn't exist, it creates the Instance object by using the createDocker function. If the Instance is running, it will return the Instance object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 

library(RsparkleR)

ovh <- import_ovh()
client <- load_client(ovh, endpoint, application_key, application_secret, consumer_key)

sshPubKeyPath  <- 'C:/Users/vterrasi/.ssh/id_rsa.pub'
sshPrivKeyPath <- 'C:/Users/vterrasi/.ssh/id_rsa'

vm <- sparkler.create(client, regionVM="UK1", typeVM="s1-4", sshPubKeyPath, sshPrivKeyPath)


## End(Not run)

voltek62/RsparkleR documentation built on May 19, 2019, 1:48 a.m.