dokku_client 0.9 → 1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +48 -0
- data/README.md +53 -62
- data/lib/dokku_client/base.rb +7 -2
- data/lib/dokku_client/plugins/memcached.rb +8 -6
- data/lib/dokku_client/plugins/mongodb.rb +10 -8
- data/lib/dokku_client/plugins/postgresql.rb +9 -7
- data/lib/dokku_client/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 77adf120b4406d0e502dc931bdc9feb2a52491d1
|
4
|
+
data.tar.gz: 4b290479f297e51af9e1ee2d5afe0cb139343636
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995043f21370163f484433b117d6e11e22f2423e45a938f478297af136ebe9da3ab9b9b6ffdacd30e049671f779a73b3b00fa313a28d90ba56f38bcfd1aa74cf
|
7
|
+
data.tar.gz: f0cbed2205eb095fa869690dd41957b56959b08a0b864689b50abe9650603c2b42dc6d103933fa19ca6b362d29c620025c23c54856ca8f8e76b6948b2697b717
|
data/CHANGELOG
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
=== 1.1 Current release
|
2
|
+
|
3
|
+
* **TODO** more commands (redis , mysql)
|
4
|
+
|
5
|
+
=== 1.0
|
6
|
+
|
7
|
+
* set available commands visible in dokku help
|
8
|
+
|
9
|
+
=== 0.9
|
10
|
+
|
11
|
+
* better help output with description to each command
|
12
|
+
|
13
|
+
=== 0.8
|
14
|
+
|
15
|
+
* fix problem with rc / rdm command
|
16
|
+
|
17
|
+
=== 0.7
|
18
|
+
|
19
|
+
* fix postgresql methods
|
20
|
+
|
21
|
+
=== 0.6
|
22
|
+
|
23
|
+
* rails console commands
|
24
|
+
|
25
|
+
=== 0.5
|
26
|
+
|
27
|
+
* small updates
|
28
|
+
|
29
|
+
=== 0.4
|
30
|
+
|
31
|
+
* fix mongodb commands
|
32
|
+
* postgresql commands
|
33
|
+
|
34
|
+
=== 0.3
|
35
|
+
|
36
|
+
* mongodb commands
|
37
|
+
|
38
|
+
=== 0.2
|
39
|
+
|
40
|
+
* delegate methods
|
41
|
+
* memcached commands
|
42
|
+
* more common commands
|
43
|
+
|
44
|
+
=== 0.1
|
45
|
+
|
46
|
+
* gem basic structure
|
47
|
+
* logs command
|
48
|
+
* config option per project
|
data/README.md
CHANGED
@@ -16,83 +16,74 @@ Install it yourself as:
|
|
16
16
|
|
17
17
|
## Configuration
|
18
18
|
|
19
|
-
$ dokku
|
19
|
+
$ dokku (for the first time in project)
|
20
20
|
|
21
|
-
|
22
|
-
|
23
|
-
Show help
|
24
|
-
|
25
|
-
dokku help
|
26
|
-
|
27
|
-
or
|
28
|
-
|
29
|
-
dokku --help
|
30
|
-
|
31
|
-
Available commands (aliases to commands in brackets)
|
21
|
+
$ dokku reconfig (to update config)
|
32
22
|
|
33
|
-
|
34
|
-
logs (l)
|
35
|
-
run (r) <command>
|
36
|
-
url (u)
|
37
|
-
plugins (p)
|
38
|
-
config (c)
|
39
|
-
rc <env>
|
40
|
-
rdm
|
41
|
-
get_config (gc) <KEY>
|
42
|
-
set_config (sc) KEY=VALUE [KEY2=VALUE2]
|
43
|
-
unset_config (uc) KEY [KEY2]
|
44
|
-
create_mem
|
45
|
-
delete_mem
|
46
|
-
info_mem
|
47
|
-
logs_mem
|
48
|
-
link_mem <container>
|
49
|
-
create_mongo
|
50
|
-
delete_mongo
|
51
|
-
link_mongo
|
52
|
-
logs_mongo
|
53
|
-
list_mongo
|
54
|
-
status_mongo
|
55
|
-
create_postgres <db>
|
56
|
-
delete_postgres <db>
|
57
|
-
info_postgres <db>
|
58
|
-
list_postgres
|
59
|
-
logs_postgres <db>
|
60
|
-
link_postgres <db>
|
61
|
-
|
62
|
-
## Roadmap
|
63
|
-
|
64
|
-
### 0.7 Current release
|
23
|
+
You will be asked for your dokku host and project name which will be stored in your application .git/config
|
65
24
|
|
66
|
-
|
25
|
+
## Customize list of available commands
|
67
26
|
|
68
|
-
|
27
|
+
In 'active commands' question when you configuring dokku client type plugin name separated by comma and commands for this plugin will be visible in dokku help.
|
28
|
+
Available plugins:
|
69
29
|
|
70
|
-
|
30
|
+
+ memcached
|
31
|
+
+ postgresl
|
32
|
+
+ mongodb
|
71
33
|
|
72
|
-
|
34
|
+
Common and Config commands are enabled by default. If you don't answer to 'active commands' then all commands will be visible.
|
73
35
|
|
74
|
-
* small updates
|
75
36
|
|
76
|
-
|
37
|
+
## Show help
|
77
38
|
|
78
|
-
|
79
|
-
* postgresql commands
|
39
|
+
dokku help
|
80
40
|
|
81
|
-
|
41
|
+
or
|
82
42
|
|
83
|
-
|
43
|
+
dokku --help
|
84
44
|
|
85
|
-
|
45
|
+
## Available commands (aliases to commands in brackets)
|
86
46
|
|
87
|
-
|
88
|
-
* memcached commands
|
89
|
-
* more common commands
|
47
|
+
dokku
|
90
48
|
|
91
|
-
|
49
|
+
Common commands:
|
50
|
+
logs (l) show app logs
|
51
|
+
run (r) '<command>' run command (unfortunately fon now you have to type command in quotes)
|
52
|
+
url (u) show link to aplication
|
53
|
+
plugins (p) show installed plugins on dokku host
|
54
|
+
rc <env> run rails console for application (pass 'staging' to load staging console, or leave empty for production)
|
55
|
+
rdm run database migrations
|
56
|
+
|
57
|
+
Config commands:
|
58
|
+
config (c) show environment variables for project
|
59
|
+
get_config (gc) <KEY> show exact environment variable
|
60
|
+
set_config (sc) KEY=VALUE [KEY2=VALUE2] set new environment variables
|
61
|
+
unset_config (uc) KEY [KEY2] remove environment variables
|
62
|
+
|
63
|
+
Memcached commands:
|
64
|
+
create_mem create memcached container
|
65
|
+
delete_mem delete memcached container
|
66
|
+
info_mem display container informations
|
67
|
+
logs_mem display last logs from memcached container
|
68
|
+
link_mem <container> link an app to memcached container
|
69
|
+
|
70
|
+
MongoDB commands:
|
71
|
+
create_mongo create a mongo database
|
72
|
+
delete_mongo delete a mongo database
|
73
|
+
console_mongo lunch mongodb console as admin
|
74
|
+
link_mongo link mongo container to application
|
75
|
+
logs_mongo display logs for mongo container
|
76
|
+
list_mongo list all mongo databases
|
77
|
+
status_mongo display status of mongo container
|
78
|
+
|
79
|
+
Postgresql commands:
|
80
|
+
create_postgres <db> create a postgresql database
|
81
|
+
delete_postgres <db> delete specified postgresql database
|
82
|
+
info_postgres <db> display database information
|
83
|
+
link_postgres <db> link an app to a postgresql container
|
84
|
+
list_postgres <db> display list of postgresql containers
|
85
|
+
logs_postgres display last logs from postgresql container
|
92
86
|
|
93
|
-
* gem basic structure
|
94
|
-
* logs command
|
95
|
-
* config option per project
|
96
87
|
|
97
88
|
## Contributing
|
98
89
|
|
data/lib/dokku_client/base.rb
CHANGED
@@ -6,8 +6,9 @@ module DokkuClient
|
|
6
6
|
GIT_DIR = '.git'
|
7
7
|
|
8
8
|
KEYS_AND_QUESTIONS = {
|
9
|
-
"dokku-client.project-name" => "Enter project name",
|
10
|
-
"dokku-client.project-host"
|
9
|
+
"dokku-client.project-name" => "Enter project name:",
|
10
|
+
"dokku-client.project-host" => "Enter dokku host:",
|
11
|
+
"dokku-client.plugins" => "Active commands (comma separated):"
|
11
12
|
}
|
12
13
|
|
13
14
|
def initialize(options={})
|
@@ -43,6 +44,10 @@ module DokkuClient
|
|
43
44
|
exec "ssh", "-t", "dokku@#{@options["project-host"]}", arg
|
44
45
|
end
|
45
46
|
|
47
|
+
def plugin_enabled plugin
|
48
|
+
@options["plugins"].include?(plugin) || @options["plugins"].nil?
|
49
|
+
end
|
50
|
+
|
46
51
|
private
|
47
52
|
|
48
53
|
def config_update_success
|
@@ -26,12 +26,14 @@ module DokkuClient
|
|
26
26
|
end
|
27
27
|
|
28
28
|
def commands opts
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
29
|
+
if plugin_enabled('memcached')
|
30
|
+
opts.separator "\n Memcached commands:"
|
31
|
+
opts.separator " create_mem create memcached container"
|
32
|
+
opts.separator " delete_mem delete memcached container"
|
33
|
+
opts.separator " info_mem display container informations"
|
34
|
+
opts.separator " logs_mem display last logs from memcached container"
|
35
|
+
opts.separator " link_mem <container> link an app to memcached container"
|
36
|
+
end
|
35
37
|
end
|
36
38
|
|
37
39
|
end
|
@@ -34,14 +34,16 @@ module DokkuClient
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def commands opts
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
37
|
+
if plugin_enabled('mongodb')
|
38
|
+
opts.separator "\n MongoDB commands:"
|
39
|
+
opts.separator " create_mongo create a mongo database"
|
40
|
+
opts.separator " delete_mongo delete a mongo database"
|
41
|
+
opts.separator " console_mongo lunch mongodb console as admin"
|
42
|
+
opts.separator " link_mongo link mongo container to application"
|
43
|
+
opts.separator " logs_mongo display logs for mongo container"
|
44
|
+
opts.separator " list_mongo list all mongo databases"
|
45
|
+
opts.separator " status_mongo display status of mongo container"
|
46
|
+
end
|
45
47
|
end
|
46
48
|
|
47
49
|
end
|
@@ -38,13 +38,15 @@ module DokkuClient
|
|
38
38
|
end
|
39
39
|
|
40
40
|
def commands opts
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
41
|
+
if plugin_enabled('postgresql')
|
42
|
+
opts.separator "\n Postgresql commands:"
|
43
|
+
opts.separator " create_postgres <db> create a postgresql database"
|
44
|
+
opts.separator " delete_postgres <db> delete specified postgresql database"
|
45
|
+
opts.separator " info_postgres <db> display database information"
|
46
|
+
opts.separator " link_postgres <db> link an app to a postgresql container"
|
47
|
+
opts.separator " list_postgres <db> display list of postgresql containers"
|
48
|
+
opts.separator " logs_postgres display last logs from postgresql container"
|
49
|
+
end
|
48
50
|
end
|
49
51
|
|
50
52
|
end
|
data/lib/dokku_client/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dokku_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0
|
4
|
+
version: '1.0'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kuba Łasecki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-03-
|
11
|
+
date: 2014-03-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grit
|
@@ -75,6 +75,7 @@ extensions: []
|
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
77
|
- ".gitignore"
|
78
|
+
- CHANGELOG
|
78
79
|
- Gemfile
|
79
80
|
- LICENSE
|
80
81
|
- README.md
|