mirror of
https://github.com/rancher/os.git
synced 2025-09-25 20:52:58 +00:00
Merge pull request #1827 from rancher/digitalocean-docker-machine
Add docker-machine example
This commit is contained in:
@@ -7,7 +7,7 @@ layout: os-default
|
|||||||
## Running RancherOS on DigitalOcean
|
## Running RancherOS on DigitalOcean
|
||||||
---
|
---
|
||||||
|
|
||||||
Running RancherOS on DigitalOcean is not yet supported, but there is a `rancheros` image now available from the commandline tool, so you can run:
|
Running RancherOS on DigitalOcean is not yet supported, but there is a `rancheros` image now available from the commandline tools, so you can run:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ doctl.exe compute droplet create --image rancheros --region sfo1 --size 2gb --ssh-keys 0a:db:77:92:03:b5:b2:94:96:d0:92:6a:e1:da:cd:28 myrancherosvm
|
$ doctl.exe compute droplet create --image rancheros --region sfo1 --size 2gb --ssh-keys 0a:db:77:92:03:b5:b2:94:96:d0:92:6a:e1:da:cd:28 myrancherosvm
|
||||||
@@ -20,3 +20,33 @@ $ doctl.exe compute droplet list
|
|||||||
ssh -i ~/.ssh/Sven.pem rancher@107.170.203.111
|
ssh -i ~/.ssh/Sven.pem rancher@107.170.203.111
|
||||||
```
|
```
|
||||||
|
|
||||||
|
or use `docker-machine`:
|
||||||
|
|
||||||
|
```
|
||||||
|
$ docker-machine create -d digitalocean --digitalocean-access-token <your digital ocean token> --digitalocean-image rancheros --digitalocean-region sfo1 --digitalocean-size 2gb --digitalocean-ssh-user rancher sven-machine
|
||||||
|
Running pre-create checks...
|
||||||
|
Creating machine...
|
||||||
|
(sven-machine) Creating SSH key...
|
||||||
|
(sven-machine) Assuming Digital Ocean private SSH is located at ~/.ssh/id_rsa
|
||||||
|
(sven-machine) Creating Digital Ocean droplet...
|
||||||
|
(sven-machine) Waiting for IP address to be assigned to the Droplet...
|
||||||
|
Waiting for machine to be running, this may take a few minutes...
|
||||||
|
Detecting operating system of created instance...
|
||||||
|
Waiting for SSH to be available...
|
||||||
|
Detecting the provisioner...
|
||||||
|
Provisioning with rancheros...
|
||||||
|
Copying certs to the local machine directory...
|
||||||
|
Copying certs to the remote machine...
|
||||||
|
Setting Docker configuration on the remote daemon...
|
||||||
|
Checking connection to Docker...
|
||||||
|
Docker is up and running!
|
||||||
|
To see how to connect your Docker Client to the Docker Engine running on this virtual machine, run: C:\Users\svend\src\github.com\docker\machine\machine.exe env sven-machine
|
||||||
|
$ docker-machine ls
|
||||||
|
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
|
||||||
|
rancheros-100 - virtualbox Stopped Unknown
|
||||||
|
sven-machine - digitalocean Running tcp://104.131.156.5:2376 v17.03.1-ce
|
||||||
|
$ docker-machine ssh sven-machine
|
||||||
|
Enter passphrase for key '/c/Users/svend/.ssh/id_rsa':
|
||||||
|
[rancher@sven-machine ~]$
|
||||||
|
[rancher@sven-machine ~]$
|
||||||
|
```
|
||||||
|
Reference in New Issue
Block a user