pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
154 stars 24 forks source link

Error: Unknown specification for ssh_keys #144

Closed nicksmithr closed 6 years ago

nicksmithr commented 6 years ago

Hello, Pretty new to this, so apologies if this is a stupid error on my part.

I'm trying to launch a Plumber server using Digital Ocean, following Plumber's guide. I have set up a SSH, and added to Settings in my Digital Ocean account. I have also set up an environment variable as DO_PAT with a token for Digital Ocean's API.

Calling droplets() from within RStudio correctly lists the droplets. Calling droplets_create() instantiates, and creates droplets — Using default ssh keys: Main Error Calling droplet_create() leads to this error : Error: Unknown specification for ssh_keys

However, calling do_provision(), (or plumber::do_provision(dropletId)) returns "Error: Unknown specification for ssh_keys".

This may be something I've misconfigured?

Session Info ```> sessionInfo() R version 3.4.1 (2017-06-30) Platform: x86_64-apple-darwin15.6.0 (64-bit) Running under: macOS High Sierra 10.13.2 Matrix products: default BLAS: /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib LAPACK: /Library/Frameworks/R.framework/Versions/3.4/Resources/lib/libRlapack.dylib locale: [1] en_GB.UTF-8/en_GB.UTF-8/en_GB.UTF-8/C/en_GB.UTF-8/en_GB.UTF-8 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] analogsea_0.6.0 plumber_0.4.2 loaded via a namespace (and not attached): [1] zoo_1.8-0 reshape2_1.4.2 splines_3.4.1 [4] lattice_0.20-35 colorspace_1.3-2 stats4_3.4.1 [7] yaml_2.1.16 mgcv_1.8-17 base64enc_0.1-3 [10] survival_2.41-3 rlang_0.1.1 ModelMetrics_1.1.0 [13] nloptr_1.0.4 aws.s3_0.3.3 multcomp_1.4-6 [16] foreach_1.4.3 plyr_1.8.4 stringr_1.2.0 [19] lsmeans_2.26-3 MatrixModels_0.4-1 munsell_0.4.3 [22] gtable_0.2.0 mvtnorm_1.0-6 codetools_0.2-15 [25] coda_0.19-1 SparseM_1.77 httpuv_1.3.5 [28] caret_6.0-76 curl_3.1 quantreg_5.33 [31] pbkrtest_0.4-7 parallel_3.4.1 TH.data_1.0-8 [34] Rcpp_0.12.14 xtable_1.8-2 openssl_0.9.9 [37] scales_0.4.1 jsonlite_1.5 lme4_1.1-13 [40] ggplot2_2.2.1 digest_0.6.13 stringi_1.1.5 [43] grid_3.4.1 tools_3.4.1 sandwich_2.3-4 [46] magrittr_1.5 lazyeval_0.2.0 tibble_1.3.3 [49] crayon_1.3.4 aws.signature_0.3.5 car_2.1-5 [52] MASS_7.3-47 Matrix_1.2-10 xml2_1.1.1 [55] estimability_1.2 minqa_1.2.4 httr_1.3.1 [58] rstudioapi_0.7 iterators_1.0.8 R6_2.2.2 [61] nnet_7.3-12 nlme_3.1-131 compiler_3.4.1 ```
sckott commented 6 years ago

thanks for your interest in the pkg and opening the issue.

ssh_keys supports only certain inputs as you can see https://github.com/sckott/analogsea/blob/4c89d1a16c9918863c27acf1887b3b94c9e6a2d0/R/keys.R#L87-L116 - so are you passing in something that's not supported?

nicksmithr commented 6 years ago

Thanks for the reply and the package @sckott unbelievably useful. @trestletech has reproduced and opened an issue: https://github.com/sckott/analogsea/issues/145

It's due to a single object rather a list, it seems, being passed into droplet_create

sckott commented 6 years ago

hugh, changed droplet_create and docklet_create to use list() as default for ssh_keys in 0b91f90f

but i can't remember why i did that - and did not do it for droplets_create/docklets_create

sckott commented 6 years ago

@nicksmithr try again - after reinstalling devtools::install_github("sckott/analogsea")

nicksmithr commented 6 years ago

Sorry for the late reply @sckott, that worked great.