0.2.6 • Published 6 years ago

do-deploy v0.2.6

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

do-deploy

Use do-deploy to easily deploy and configure DigitalOcean droplets.

Moreover, do-deploy generates an ansible inventory file. Use this file to quickly configure further DigitalOcean droplets via ansible tool.

Install

$ npm install do-deploy --save

Usage

In order to use do-deploy you have to generate an API token on the DigitalOcean website. In addition to that you must have SSH public key on your local machine. It is used to deploy SSH keys to DO droplet.

See how to generate SSH keys here:

const DoDeploy = require('do-deploy');

const doDeploy = new DoDeploy({
    doApiToken: '<YOUR_DO_API_TOKEN>',

    ansible: {
        createInventoryFile: true,
        pythonInterpreter: '/usr/bin/python3'
    },

    createDomains: true,

    droplets: [
        {
            name: 'ams-001.example.com',
            region: 'ams3'
        }
    ]
});

doDeploy.deploy();

*Note: Replace <YOUR_DO_API_TOKEN> with your API token.

Options

OptionTypeDefault valueDescription
doApiTokenstringDigitalOcean API token
doSshKeyNamestringdefaultThe name of SSH key that will be created on DO and added to each of your droplet
localSshKeyFilepathstring<USER_HOME_DIR>/.ssh/id_rsa.pubFile path to your local SSH public key. Used to deploy SSH keys to DO
dropletTimeoutinteger10 000 msTimeout to check whether the server is active and IP-address is assigned
dropletGetipAttemptsinteger6The number of attempts
createDomainsbooleanfalseIf true, creates domain on DO. servers[].name is used as hostname for DO domain
ansible.createInventoryFilebooleanfalseIf true, creates ansible inventory file
ansible.inventoryFilenamestring./hostsThe path to ansible inventory file
ansible.pythonInterpreterstring/usr/bin/pythonThe value of python_interpriter property in the ansible inventory file
dropletDefaults.sizestrings-1vcpu-1gbDefault droplet size
dropletDefaults.imagestringubuntu-16-04-x64Default droplet image
droplets[].namestringDroplet name
droplets[].regionstringDroplet region

Issues

Please submit an issue on GitHub with repro steps.

License

The MIT License

Copyright 2018 Serhii Zvinskyi

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.2.6

6 years ago

0.2.5

6 years ago

0.2.4

6 years ago

0.2.2

6 years ago

0.2.1

6 years ago

0.2.0

6 years ago

0.1.0

8 years ago