open-dock 0.1.6 → 0.1.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +3 -1
- data/lib/open-dock/base.rb +6 -5
- data/lib/open-dock/commands/configure_host.rb +1 -1
- data/lib/open-dock/commands/ssh_host.rb +1 -1
- data/lib/open-dock/docker.rb +0 -1
- data/lib/open-dock/providers.rb +1 -1
- data/lib/open-dock/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8340dc1d9ed30ab838684a200392cd8fd4f2140c
|
4
|
+
data.tar.gz: 59be740879ae8b0d20f1922aa50e2e18b836fcbb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8088a4120fee8f554b61666acf1d07c85baa17e1c6b84dc1c0c70d27a3a5d4fced83285036541dddab319bd7ab6716b349912b2b6477de15cc600a6a8b9a0a21
|
7
|
+
data.tar.gz: 97a4f66849cf3c9d42dc10c3240aafa25a13d01af092c429607f7a97ea1bcf062beb39543332b1d95bce1d5f34de3c1087c3a4ead5aeb099ba98a24c684bdc78
|
data/README.md
CHANGED
@@ -88,6 +88,8 @@ Helpful commands:
|
|
88
88
|
* `ops list digital_ocean` list all possible parameter values to use in the yml file
|
89
89
|
* `ops create example.com` will create your host
|
90
90
|
|
91
|
+
By default `user` to connect to host will be 'root' if not configured.
|
92
|
+
|
91
93
|
### Digital Ocean Host
|
92
94
|
|
93
95
|
For a Digital Ocean host we can make the following file (ops/hosts/example.com.yml):
|
@@ -126,7 +128,7 @@ In this file we can configure all containers to run in the host provided in the
|
|
126
128
|
|
127
129
|
```yml
|
128
130
|
www:
|
129
|
-
hostname:
|
131
|
+
hostname: example.com
|
130
132
|
image: jlebrijo/prun
|
131
133
|
ports:
|
132
134
|
- '2222:22'
|
data/lib/open-dock/base.rb
CHANGED
@@ -2,15 +2,16 @@ module Ops
|
|
2
2
|
HOSTS_DIR = "hosts"
|
3
3
|
CONTAINERS_DIR = "containers"
|
4
4
|
PROVIDERS_DIR = "providers"
|
5
|
-
|
5
|
+
DEFAULT_USER = "root"
|
6
6
|
|
7
7
|
def self.get_user_for(host_name)
|
8
8
|
host_file = "#{HOSTS_DIR}/#{host_name}.yml"
|
9
|
-
|
9
|
+
if File.exist? host_file
|
10
10
|
params = YAML.load_file host_file
|
11
|
-
params
|
12
|
-
|
13
|
-
|
11
|
+
if params and params.has_key? "user"
|
12
|
+
return params["user"]
|
13
|
+
end
|
14
14
|
end
|
15
|
+
return DEFAULT_USER
|
15
16
|
end
|
16
17
|
end
|
data/lib/open-dock/docker.rb
CHANGED
data/lib/open-dock/providers.rb
CHANGED
data/lib/open-dock/version.rb
CHANGED