All Projects → shawjef3 → digitalocean

shawjef3 / digitalocean

Licence: other
Scala wrapper around Digital Ocean's API, version 2

Programming Languages

scala
5932 projects

Projects that are alternatives of or similar to digitalocean

vps
A laravel 5 package to easily create and maintain vps on digital ocean
Stars: ✭ 59 (+110.71%)
Mutual labels:  digitalocean, digital-ocean
doclt
Digital Ocean Command Line Tool
Stars: ✭ 43 (+53.57%)
Mutual labels:  digitalocean, digital-ocean
dots
digital ocean api typescript/javascript wrapper
Stars: ✭ 65 (+132.14%)
Mutual labels:  digitalocean, digital-ocean
offensive-docker-vps
Create a VPS on Google Cloud Platform or Digital Ocean easily with Offensive Docker included to launch assessment to the targets.
Stars: ✭ 66 (+135.71%)
Mutual labels:  digitalocean, digital-ocean
terraform-digitalocean-variables
List of all available DigitalOcean droplet image distributions, one click applications, regions and sizes.
Stars: ✭ 26 (-7.14%)
Mutual labels:  digitalocean
do-spaces-action
📦Upload directories/files to DigitalOcean Spaces via GitHub Actions. Supports package/library versioning.
Stars: ✭ 30 (+7.14%)
Mutual labels:  digitalocean
python-doctl
A Python wrapper for the Digital Ocean CLI utility — doctl.
Stars: ✭ 49 (+75%)
Mutual labels:  digitalocean
CloudFrontier
Monitor the internet attack surface of various public cloud environments. Currently supports AWS, GCP, Azure, DigitalOcean and Oracle Cloud.
Stars: ✭ 102 (+264.29%)
Mutual labels:  digitalocean
django-step-by-step
A Django + Vue reference project that focuses on developer tooling and CI/CD + IaC
Stars: ✭ 86 (+207.14%)
Mutual labels:  digitalocean
open-source-enthusiasts
[ PLEASE DON'T USE THIS REPO ] Hacktoberfest 2020 movement to list out all the open source enthusiasts in one place. Want to make your PR count for Hacktoberfest? Add yourself in the list.
Stars: ✭ 40 (+42.86%)
Mutual labels:  digitalocean
darknode-cli
Tool for deploying and managing Darknodes
Stars: ✭ 54 (+92.86%)
Mutual labels:  digital-ocean
DOKS
Managed Kubernetes designed for simple and cost effective container orchestration.
Stars: ✭ 80 (+185.71%)
Mutual labels:  digitalocean
tls certificate generation
Use temporary Amazon EC2 / Digital Ocean cloud machines to get / renew letsencrypt certificates
Stars: ✭ 28 (+0%)
Mutual labels:  digital-ocean
nomad-droplets-autoscaler
DigitalOcean Droplets target plugin for HashiCorp Nomad Autoscaler
Stars: ✭ 42 (+50%)
Mutual labels:  digitalocean
rejig
Turn your VPS into an attack box
Stars: ✭ 33 (+17.86%)
Mutual labels:  digitalocean
Hacktober-2019
Repo for TOM members dedicated for the Hacktober fest of 2019 (6th edition), this repo is here to encourage open source learning and sharing and enhance git/github using abilities.
Stars: ✭ 16 (-42.86%)
Mutual labels:  digitalocean
fleex
Fleex makes it easy to create multiple VPS on cloud providers and use them to distribute workloads.
Stars: ✭ 181 (+546.43%)
Mutual labels:  digitalocean
Hacktoberfest-2k19
A Repository for Micro Club members dedicated for Hacktoberfest 6th edition (2k19). The purpose of this repo is getting MC members into the open source community and help them develop and share projects and knowledge with other students, profesionals and open source enthousiasts while having a fun challenge !!
Stars: ✭ 16 (-42.86%)
Mutual labels:  digital-ocean
react-springboot-mysql
A sample app with Spring Boot (Hibernate), React and MySQL with explanation and deployment.
Stars: ✭ 82 (+192.86%)
Mutual labels:  digitalocean
hactoberexplor
HacktoberExplor is for people who love to travel, explore and let others know about the beautiful places which they've visited, alongwith a photo and a short description about that place. Also you can add about yourself, your interests and your social media links, etc.
Stars: ✭ 16 (-42.86%)
Mutual labels:  digitalocean

digitalocean

Scala wrapper around Digital Ocean's API, version 2

This API is entirely asynchronous, so you'll want to know how to use Futures. Some classes have a "complete" method that perform several operations for you so that you can know if an operation such as Droplet.create or an action have completed. "complete" methods also return futures.

Scaladoc

http://www.jeffshaw.me/digitalocean/

Instructions

Dependency

This project is now in Maven Central for Scala 2.10, 2.11, 2.12, and 2.13. You can add it to your dependencies in your project's sbt file.

libraryDependencies += "me.jeffshaw" %% "digitalocean" % "6.2"

Or, for a maven project:

<dependency>
  <groupId>me.jeffshaw</groupId>
  <artifactId>digitalocean_2.13</artifactId>
  <version>6.2</version>
</dependency>

Local Compilation

Install SBT, clone this repository, and cd to it.

sbt

console
//use :paste if you want to copy-paste the following, but be sure to set your api token first.

import scala.concurrent._, duration._, ExecutionContext.Implicits._
import me.jeffshaw.digitalocean._
import org.asynchttpclient.DefaultAsyncHttpClient

implicit val httpClient = new DefaultAsyncHttpClient()

implicit val client = DigitalOceanClient(
  token = "",
  maxWaitPerRequest = 5 seconds,
  //The following is used for polling action completion.
  actionCheckInterval = 15 seconds
)

//List all the regions.
val regions = Await.result(Region.list(), 5 seconds).toVector

//Create a small CentOS 6 32-bit droplet.
val droplet =
  Await.result(
    Droplet.create(
      name = "test",
      region = NewYork1,
      size = `512mb`,
      image = "centos-6-x32",
      sshKeys = Seq.empty,
      backups = false,
      ipv6 = false,
      privateNetworking = false,
      userData = None
    ),
    atMost = 10 seconds
  )

//Wait for the droplet to become active.
Await.result(droplet.complete(), 2 minutes)

//Do stuff with the droplet.

//Run the delete the command, and then wait for the droplet to stop existing.

Await.result(droplet.delete().flatMap(_.complete()), 2 minutes)

httpClient.close()

//CTRL-D if you used :paste.

To run tests, set your api token in src/test/resources/application.conf, and then run test in the sbt console. WARNING: Digital Ocean might lock your account if you run the tests too often. You will want to notify them of what you are doing to prevent that. Also be aware that the floating ip tests don't clean up their test IPs if they fail.

Changelog

6.2

  • Digital Ocean no longer sends the charset in the content-type
  • Add custom image type
  • Add new droplet sizes
  • Add filesystem type and label fields
  • Added method to create volumes from snapshots
  • Add SOA DNS records
  • Added publication for Scala 2.13
  • updated dependencies: async http client, json4s

6.1

  • Added new droplet sizes
  • updated dependencies: scala 2.12, typesafe config, async http client, json4s

6.0

  • Updated async http client dependency
  • tests now use ScalaTest's async support
  • serialization exceptions are wrapped in DigitalOceanClientException
  • FloatingIp now has assign and unassign methods

5.1

  • Add m-1vcpu-8gb and s-1vcpu-3gb droplet sizes

5.0

  • Add support for Tags
  • Add support for Firewalls
  • Add compute droplet sizes

4.0

  • Add support for Scala 2.12
  • Remove dispatch, since it is not published for Scala 2.12
  • The client now requires an implicit AsyncHttpClient
  • Add refresh() method to Action, Droplet, and Volume
  • Add sfo2 region, and various new droplet sizes

3.0

  • Add support for volumes
  • Action#resourceId is now an Option[BigInt]

2.2

  • Thanks to flavienbert, polling no longer consumes a thread while it's sleeping.
  • Added upcoming Bangalore1 region.
  • If you were using classes in the package me.jeffshaw.digitalocean.metadata.responses, you shouldn't have been. Those classes are now private.

2.1

  • Fix a bug where polling for action completion occured on the caller's thread.

2.0

  • Methods that return Futures but didn't have an empty parameter list now require an empty parameter list. Examples are list methods and delete methods.
  • Image list methods now ask whether you want private images or not, and if you want All, Application, or Distribution images.
  • Add support for floating IPs.
  • Add support for actions on droplet tags.
  • The ssh key tests are more reliable.
  • Supports the latest droplet metadata.

1.1

  • Add Toronto1 to the Region enumeration.

1.0

  • Add Frankfurt1 to the Region enumeration.
  • OAuth support may come in a future 2.0 release.

0.8

  • Update to account for March 20 changes.
  • Fix SSH key functionality, and added tests for SshKey thanks to bass3t.

0.7

Droplet creation has changed to return less information about the droplet. My solution is to just read the ID, and then ask for all the information in a second request.

0.6

Metadata functionality added to the metadata package.

0.5

DNS functionality added to the dns package.

0.2

List functions now return iterators that support paged responses.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].