Skip to content
This repository has been archived by the owner on Sep 26, 2021. It is now read-only.

Digitalocean driver: Support for creating Droplets with Cloud-init User Data #2141

Merged
merged 1 commit into from
Dec 3, 2015
Merged

Digitalocean driver: Support for creating Droplets with Cloud-init User Data #2141

merged 1 commit into from
Dec 3, 2015

Conversation

janeczku
Copy link
Contributor

@janeczku janeczku commented Nov 2, 2015

This PR enhances the Digitalocean driver to support bootstrapping droplets with Cloud-init User Data.
It adds a new create flag which allows users to pass a file containing User Data (e.g. cloud-config or shell script) to the driver.

New flag

Path to user-data file

  • EnvVar: DIGITALOCEAN_USERDATA
  • Name: digitalocean-userdata

Example usage for deploying CoreOS machine

$ cat <<EOF >>/tmp/cloud-config.yaml
#cloud-config
coreos:
  etcd2:
    discovery: https://discovery.etcd.io/ABC123456
    advertise-client-urls: http://$private_ipv4:2379,http://$private_ipv4:4001
    initial-advertise-peer-urls: http://$private_ipv4:2380
    listen-client-urls: http://0.0.0.0:2379,http://0.0.0.0:4001
    listen-peer-urls: http://$private_ipv4:2380
  units:
    - name: etcd2.service
      command: start
    - name: fleet.service
      command: start
EOF
$ docker-machine create -d digitalocean digitalocean-access-token ABC123456 \
--digitalocean-image coreos-stable --digitalocean-private-networking \
--digitalocean-userdata /tmp/cloud-config.yaml test-droplet

@janeczku
Copy link
Contributor Author

janeczku commented Nov 2, 2015

Related PR #1947

@dgageot dgageot added this to the 0.5.2 milestone Nov 6, 2015
@jeanlaurent jeanlaurent modified the milestones: 0.6.0, 0.5.2 Nov 26, 2015
@dgageot
Copy link
Member

dgageot commented Nov 30, 2015

Hi @janeczku any chance you could rebase this PR?

@janeczku
Copy link
Contributor Author

@dgageot Sure np!

@janeczku
Copy link
Contributor Author

janeczku commented Dec 1, 2015

@dgageot rebased & updated docs

@nathanleclaire
Copy link
Contributor

LGTM

1 similar comment
@dgageot
Copy link
Member

dgageot commented Dec 3, 2015

LGTM

dgageot added a commit that referenced this pull request Dec 3, 2015
Digitalocean driver: Support for creating Droplets with Cloud-init User Data
@dgageot dgageot merged commit 029b39e into docker:master Dec 3, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants