do-disposable

command module
v1.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2020 License: Apache-2.0 Imports: 26 Imported by: 0

README

do-disposable

Allows you to create a disposable Droplet with a simple CLI interface. This is useful for trying to run actions which may be network intensive to do on your standard internet connection or too CPU intensive for your system since you can start a Droplet to the size you need and then have it easily disposed of when you're done.

The following sub-commands are included:

  • auth: Authenticates the user and creates the configuration if this doesn't exist. This is the sub-command you will be prompted to run on first launch of this tool.
  • setregion: Allows you to modify the region. Note that you need to go through the setup with do-disposable auth first (that will also configure this for the first time).
  • setsize: Allows you to modify the Droplet size. Note that you need to go through the setup with do-disposable auth first (that will also configure this for the first time).
  • up: Allows you to start up a new disposable Droplet.

Additionally, when deploying the Droplet, the following commands are deployed to the Droplet:

  • copyfrom <host file/folder path> [droplet save location]: Allows you to copy a file/folder from the host to the Droplet.
  • copyback <droplet file/folder path> [host save location]: Allows you to copy a file/folder back from the Droplet.

First Usage

You can find a binary for your operating system in the releases page.

On first boot, you should be logged in to DigitalOcean and then run do-disposable auth. On the first boot, this will then walk through through the authentication, set region and set size configurations.

From here, you can simply start the droplet with do-disposable up (see starting the droplet for help with this).

Authentication

To change your SSH key/token after the first boot, you can run do-disposable auth. When you run this, you will be prompted for your DigitalOcean token:

token_prompt

You can get this from the API section of the DigitalOcean dashboard: api token

This will also automatically generate/save the SSH key which do-disposable will use internally.

Set Region

To set the region outside of the first boot, you can use do-disposable setregion. This will prompt you to hit the key of the region which you wish to use:

setregion

Set Size

To set the size outside of the first boot, you can use do-disposable setsize. This will prompt you to hit the key of the size which you wish to use:

setsize

Starting The Droplet

To start the Droplet, you can use do-disposable up. Note that by default, up will use the default values from your configuration and the latest Debian release for your distro. The following flags can be used:

  • distro: Allows you to override the distro slug with another one from the DigitalOcean API. This defaults to the latest Debian release (e.g.: -distro ubuntu-19-10-x64).
  • region: Allows you to override the region slug with another one. Will default to the one set above (e.g.: -region nyc3).
  • size: Allows you to override the size slug with another one. Will default to the one set above (e.g.: -size s-1vcpu-2gb).

To get slugs for different Droplet attributes, you can use this tool.

From here, you can run Linux commands (including copyfrom and copyback) and then you can exit the Droplet. Exiting will destroy the Droplet:

session

Documentation

Overview

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Copyright 2020 DigitalOcean Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL