analogsea

Digital Ocean R client

https://github.com/pachadotdev/analogsea

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (14.4%) to scientific vocabulary

Keywords

cloud-computing droplet rstats ssh
Last synced: 6 months ago · JSON representation

Repository

Digital Ocean R client

Basic Info
Statistics
  • Stars: 158
  • Watchers: 9
  • Forks: 24
  • Open Issues: 17
  • Releases: 10
Topics
cloud-computing droplet rstats ssh
Created over 11 years ago · Last pushed almost 2 years ago
Metadata Files
Readme Changelog Contributing Funding License Code of conduct Codemeta

README.md

analogsea

codecov.io rstudio mirror downloads cran version R-CMD-check Lifecycle: stable

sticker

Use our link https://m.do.co/c/1d5a471e5f54, you'll get 100 usd in credits to try DO!

analogsea is an R client for version 2 of the Digital Ocean API. See ?droplet_functions after loading analogsea. It allows you to programatically create and destroy droplets (remote computers), and install various R related tools:

  • R (done)
  • RStudio Server (done)
  • RStudio Shiny Server (done)
  • OpenCPU (not yet)
  • Use packrat to move a project to a droplet (not yet)

In addition, it allows you to use a readily available image with RStudio Server, Shiny Server and fully tidyverse from DigitalOcean Marketplace.

Docs: https://pacha.dev/analogsea/.

Use cases

Install

Stable version from CRAN

r install.packages("analogsea")

Development version from GitHub

r remotes::install_github("pachadotdev/analogsea")

r library("analogsea")

Create a DO account

If you don't already have one, create a DO account. By using this link, you'll start with $100 in credits with a 2 months limit. This is enough for 1440 hours of computing on a machine with 4 GB memory and 2 dedicated CPUs.

Authenticate

The best way to authenticate is to generate a personal access token (https://cloud.digitalocean.com/settings/tokens/new) and save it in an environment variable called DO_PAT. If you don't do this, you'll be prompted to authenticate in your browser the first time you use analogsea.

Make sure you provide DigitalOcean your public key at https://cloud.digitalocean.com/ssh_keys. Github has some good advice on creating a new public key if you don't already have one: https://help.github.com/articles/generating-ssh-keys/.

It is highly recommended to use DO_PAT, it's easier and allows (semi) automated tasks.

To use ssh keys install the recommended ssh package: r install.packages("ssh").

Get droplets

All droplets

r droplets()

```r droplets() $unintrenchable unintrenchable (2724525) Status: off Region: San Francisco 1 Image: Ubuntu 14.04 x64 Size: 512mb ($0.00744 / hr)

$basipterygium basipterygium (2724526) Status: active Region: San Francisco 1 Image: Ubuntu 14.04 x64 Size: 512mb ($0.00744 / hr) ```

A single droplet. Pass in a single droplet id.

r droplet(2724525)

r <droplet>unintrenchable (2724525) Status: off Region: San Francisco 1 Image: Ubuntu 14.04 x64 Size: 512mb ($0.00744 / hr)

Spin up a new droplet

To make this as dead simple as possible, you just use one function, without any parameters.

r droplet_create()

r Using default ssh key: Jane Doe NB: This costs $0.00744 / hour until you droplet_delete() it <droplet>sabaoth (2727258) Status: new Region: San Francisco 1 Image: Ubuntu 14.04 x64 Size: 512mb ($0.00744 / hr)

You can of course pass in lots of options for name of the droplet, RAM size, disk size, ssh keys, etc. See regions() and sizes() to list available regions and sizes.

Delete a droplet

r droplet_delete(1707487)

Chaining

Most of the droplet_* functions can be chained together using the %>% function. For example, you can turn a droplet off, snapshot, and then turn it back on with:

r d %>% droplet_power_off() %>% droplet_snapshot() %>% droplet_power_on() %>%

R/RStudio

We're still working on these, but would love feedback.

By default, analogsea creates an Ubuntu 20.04 image. Let's say you've got ten students from an R workshop, then you can run

```r droplet_create("rstudio-20-04")

users <- list( user = paste0("student", 1:5), password = sapply(rep(8,5), create_password) )

for (i in seqalong(users$user)) { ubuntucreateuser(x, users$user[i], users$password[i], keyfile = "~/.ssh/idrsa") } ```

Then, each student shall be able to open RStudio from the browser, by visiting http://123.456.789:8787 and accessing with studentX (X = 1,...,10) and the password created.

To install more R packages, you can make them readily available for all the users that have access to your droplet with

r ubuntu_install_r() # ohlf if you didn't use the RStudio image install_r_package("arrow")

Shiny

The RStudio Server image also features readily available Shiny Server, but we provide the functions ubuntu_install_shiny() and docklet_shinyserver() (requires to use the Docker image, i.e. docklet_create()) to configure Shiny from scratch.

Install RStudio Server

For the standard Ubuntu image you can use ubuntu_install_rstudio().

For dockerized RStudio you have the next option:

r docklet_create() %>% docklet_rstudio()

This will install R, RStudio Server and it's dependencies. It will automatically pop open the RStudio server instance in your default browser, with default username/password of rstudio/server.

Meta

Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.

Owner

  • Name: Mauricio "Pachá" Vargas Sepúlveda
  • Login: pachadotdev
  • Kind: user

Statistician interested in applying statistical methods to address specific policy-relevant questions, particularly in international trade.

CodeMeta (codemeta.json)

{
  "@context": [
    "https://doi.org/10.5063/schema/codemeta-2.0",
    "http://schema.org"
  ],
  "@type": "SoftwareSourceCode",
  "identifier": "analogsea",
  "description": "Provides a set of functions for interacting with the 'Digital\n    Ocean' API <https://www.digitalocean.com/>, including\n    creating images, destroying them, rebooting, getting details on regions, and\n    available images.",
  "name": "analogsea: Interface to 'Digital Ocean'",
  "codeRepository": "https://github.com/pachadotdev/analogsea",
  "relatedLink": "https://pacha.dev/analogsea/",
  "issueTracker": "https://github.com/pachadotdev/analogsea/issues",
  "license": "Apache License 2",
  "version": "1.0.5",
  "programmingLanguage": {
    "@type": "ComputerLanguage",
    "name": "R",
    "url": "https://r-project.org"
  },
  "runtimePlatform": "R version 4.1.2 (2021-11-01)",
  "provider": {
    "@id": "https://cran.r-project.org",
    "@type": "Organization",
    "name": "Comprehensive R Archive Network (CRAN)",
    "url": "https://cran.r-project.org"
  },
  "author": [
    {
      "@type": "Person",
      "givenName": "Scott",
      "familyName": "Chamberlain",
      "email": "myrmecocystus@gmail.com",
      "@id": "https://orcid.org/0000-0003-1444-9135"
    },
    {
      "@type": "Person",
      "givenName": "Hadley",
      "familyName": "Wickham",
      "email": "hadley@rstudio.com"
    },
    {
      "@type": "Person",
      "givenName": "Winston",
      "familyName": "Chang",
      "email": "winston@stdout.org"
    },
    {
      "@type": "Person",
      "givenName": "Mauricio",
      "familyName": "Vargas",
      "email": "mavargas11@uc.cl",
      "@id": "https://orcid.org/0000-0003-1017-7574"
    }
  ],
  "contributor": [
    {
      "@type": "Person",
      "givenName": "Bob",
      "familyName": "Rudis",
      "email": "bob@rudis.net"
    },
    {
      "@type": "Person",
      "givenName": "Bryce",
      "familyName": "Mecum",
      "email": "brycemecum@gmail.com",
      "@id": "https://orcid.org/0000-0002-0381-3766"
    }
  ],
  "copyrightHolder": [
    {
      "@type": "Organization",
      "name": "RStudio"
    },
    {
      "@type": "Organization",
      "name": "DigitalOcean"
    }
  ],
  "funder": {},
  "maintainer": [
    {
      "@type": "Person",
      "givenName": "Mauricio",
      "familyName": "Vargas",
      "email": "mavargas11@uc.cl",
      "@id": "https://orcid.org/0000-0003-1017-7574"
    }
  ],
  "softwareSuggestions": [
    {
      "@type": "SoftwareApplication",
      "identifier": "testthat",
      "name": "testthat",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=testthat"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "knitr",
      "name": "knitr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=knitr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "ssh",
      "name": "ssh",
      "version": ">= 0.6",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=ssh"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "aws.s3",
      "name": "aws.s3",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=aws.s3"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "arrow",
      "name": "arrow",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=arrow"
    }
  ],
  "softwareRequirements": [
    {
      "@type": "SoftwareApplication",
      "identifier": "stats",
      "name": "stats"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "utils",
      "name": "utils"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "httr",
      "name": "httr",
      "version": ">= 1.2.0",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=httr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "jsonlite",
      "name": "jsonlite",
      "version": ">= 1.1",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=jsonlite"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "magrittr",
      "name": "magrittr",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=magrittr"
    },
    {
      "@type": "SoftwareApplication",
      "identifier": "yaml",
      "name": "yaml",
      "provider": {
        "@id": "https://cran.r-project.org",
        "@type": "Organization",
        "name": "Comprehensive R Archive Network (CRAN)",
        "url": "https://cran.r-project.org"
      },
      "sameAs": "https://CRAN.R-project.org/package=yaml"
    }
  ],
  "releaseNotes": "https://github.com/pachadotdev/analogsea/blob/master/NEWS.md",
  "readme": "https://github.com/pachadotdev/analogsea/blob/main/README.md",
  "fileSize": "361.107KB",
  "contIntegration": [
    "https://codecov.io/github/pachadotdev/analogsea?branch=master",
    "https://github.com/pachadotdev/analogsea/actions/workflows/R-CMD-check.yml"
  ],
  "keywords": [
    "cloud-computing",
    "rstats",
    "droplet",
    "ssh"
  ],
  "developmentStatus": "https://lifecycle.r-lib.org/articles/stages.html#stable"
}

GitHub Events

Total
  • Issues event: 1
  • Watch event: 4
  • Issue comment event: 3
Last Year
  • Issues event: 1
  • Watch event: 4
  • Issue comment event: 3

Issues and Pull Requests

Last synced: about 1 year ago

All Time
  • Total issues: 91
  • Total pull requests: 10
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 6 hours
  • Total issue authors: 8
  • Total pull request authors: 3
  • Average comments per issue: 3.52
  • Average comments per pull request: 1.4
  • Merged pull requests: 7
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 1
  • Pull request authors: 0
  • Average comments per issue: 2.0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • sckott (37)
  • hadley (22)
  • behrica (15)
  • wch (6)
  • cboettig (5)
  • karthik (4)
  • Sade154 (1)
  • flaviobarros (1)
Pull Request Authors
  • behrica (5)
  • sckott (3)
  • cboettig (2)
Top Labels
Issue Labels
bug (5) api_v2 (4) enhancement (1) windows-os (1)
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads: unknown
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 11
proxy.golang.org: github.com/pachadotdev/analogsea
  • Versions: 11
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.5%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago

Dependencies

DESCRIPTION cran
  • httr >= 1.2.0 imports
  • jsonlite >= 1.1 imports
  • magrittr * imports
  • stats * imports
  • utils * imports
  • yaml * imports
  • arrow * suggests
  • aws.s3 * suggests
  • knitr * suggests
  • ssh >= 0.6 suggests
  • testthat * suggests
.github/workflows/R-CMD-check.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • actions/upload-artifact v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
  • shimataro/ssh-key-action v2.3.0 composite
.github/workflows/build-docs.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
.github/workflows/test-coverage.yml actions
  • actions/cache v2 composite
  • actions/checkout v2 composite
  • r-lib/actions/setup-pandoc v1 composite
  • r-lib/actions/setup-r v1 composite
  • shimataro/ssh-key-action v2.3.0 composite
inst/examples/mpg/DESCRIPTION cran
inst/examples/widgets/DESCRIPTION cran