regenbogenschmetterlingeinhornkatzchen 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/regenbogenschmetterlingeinhornkatzchen +26 -6
- data/lib/config.rb +16 -0
- data/regenbogenschmetterlingeinhornkatzchen.gemspec +4 -3
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b41afbfcfa29e8653bc249649befb0bb8d56c10
|
4
|
+
data.tar.gz: cd53321275966d50ccbf2d0bc799658de08ee75e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3f53ba730ef14866ed1d80e892d3b374b3989acde7b1770b101492b1d742245e906c58c2d376e373e83b248fd2a8f90389fb46e1455539f24f93a9c464ff1ffc
|
7
|
+
data.tar.gz: c0b18c3eaa9e73476c86d35fefbc8f4dfb578ff11562a05a5c39fa241d841b1e0c75b6bd03794df61f0e85a77fbec79afb16228f8ca919b94ee014b47fbb0520
|
@@ -16,9 +16,9 @@ command :new do |c|
|
|
16
16
|
c.syntax = 'cdk new [options]'
|
17
17
|
c.summary = 'Create new container with host'
|
18
18
|
c.description = 'Create directory with container and host configurations'
|
19
|
-
c.example 'Create new container configuration with atomic host to deploy', 'cdk new Geablestapler --host rhel-atomic'
|
19
|
+
c.example 'Create new container configuration with atomic host to deploy', 'cdk new --name Geablestapler --host rhel-atomic'
|
20
20
|
c.option '--name NAME', String, 'Define name of a container'
|
21
|
-
c.option '--host TYPE', String, '
|
21
|
+
c.option '--host TYPE', String, 'Choose host for deployment: rhel-docker, rhel-atomic, centos-docker, centos-atomic'
|
22
22
|
c.action do |args, options|
|
23
23
|
if options.name
|
24
24
|
FileUtils.mkdir_p "#{options.name}/host"
|
@@ -63,6 +63,26 @@ command :new do |c|
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
|
66
|
+
command :vagrant do |c|
|
67
|
+
c.syntax = 'cdk vagrant [options]'
|
68
|
+
c.summary = 'Get vagrant box'
|
69
|
+
c.example 'Get centos Vagrantbox from atlas and change name to centos-7.0 after', 'cdk vagrant --getbox humaton/centos-7'
|
70
|
+
c.option '--getbox NAME', String, 'image name from atlas.hashicorp.com'
|
71
|
+
c.action do |args, options|
|
72
|
+
# Do something or c.when_called Cdk::Commands::List 'vagrant up humaton/centos-7 --provider libvirt'
|
73
|
+
if options.getbox
|
74
|
+
if system("#{vagrant_base_cmd} box add #{options.getbox}")
|
75
|
+
say("Vagrant box was added")
|
76
|
+
else
|
77
|
+
say("There was a problem with vagrant box import")
|
78
|
+
end
|
79
|
+
else
|
80
|
+
say("You have to specify box to download")
|
81
|
+
end
|
82
|
+
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
66
86
|
command :run do |c|
|
67
87
|
c.syntax = 'cdk run'
|
68
88
|
c.summary = 'Run container on host using vagrant'
|
@@ -87,10 +107,10 @@ end
|
|
87
107
|
|
88
108
|
command :destroy do |c|
|
89
109
|
c.syntax = 'cdk destroy [options]'
|
90
|
-
c.summary = ''
|
91
|
-
c.description = ''
|
92
|
-
c.example '
|
93
|
-
c.option '--
|
110
|
+
c.summary = 'Delete cdk data'
|
111
|
+
c.description = 'rm -rf of project directory with possibility to cleanup vagrant machines associated with container'
|
112
|
+
c.example 'Delete project directory and cleanup vagrant machines', 'cdk destroy --vagrant'
|
113
|
+
c.option '--vagrant', 'Destroy vagrant machines'
|
94
114
|
c.action do |args, options|
|
95
115
|
# Do something or c.when_called Cdk::Commands::Destroy
|
96
116
|
end
|
data/lib/config.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
class Config
|
2
|
+
attr_accessor :default_docker_provider, :containers, :vagrant
|
3
|
+
|
4
|
+
def new(default_provider, vagrant = false)
|
5
|
+
self.default_docker_provider = default_provider
|
6
|
+
self.vagrant = vagrant
|
7
|
+
end
|
8
|
+
|
9
|
+
def load_config
|
10
|
+
|
11
|
+
end
|
12
|
+
|
13
|
+
def save_config
|
14
|
+
|
15
|
+
end
|
16
|
+
end
|
@@ -1,14 +1,15 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'regenbogenschmetterlingeinhornkatzchen'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.2'
|
4
4
|
s.date = '2012-03-23'
|
5
5
|
s.summary = "CDK wrapper"
|
6
6
|
s.description = "Wraper around couple of vagrant and docker files"
|
7
7
|
s.authors = ["Tomas Hrcka"]
|
8
8
|
s.email = 'thrcka@redhat.com'
|
9
9
|
s.homepage =
|
10
|
-
'
|
11
|
-
s.license = 'GPL-
|
10
|
+
'https://github.com/humaton/regenbogenschmetterlingeinhornkatzchen'
|
11
|
+
s.license = 'GPL-2.0'
|
12
|
+
s.platform = Gem::Platform::RUBY
|
12
13
|
|
13
14
|
# this gemspec is, and parsing out the ignored files from the gitignore.
|
14
15
|
# Note that the entire gitignore(5) syntax is not supported, specifically
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: regenbogenschmetterlingeinhornkatzchen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Hrcka
|
@@ -51,15 +51,16 @@ files:
|
|
51
51
|
- examples/Dockerfile
|
52
52
|
- examples/start.sh
|
53
53
|
- lib/regenbogenschmetterlingeinhornkatzchen.rb
|
54
|
+
- lib/config.rb
|
54
55
|
- regenbogenschmetterlingeinhornkatzchen.gemspec
|
55
56
|
- bin/regenbogenschmetterlingeinhornkatzchen
|
56
57
|
- .gitmodules
|
57
58
|
- adb-atomic-developer-bundle/.git
|
58
59
|
- adb-atomic-developer-bundle/.gitignore
|
59
60
|
- .gitignore
|
60
|
-
homepage:
|
61
|
+
homepage: https://github.com/humaton/regenbogenschmetterlingeinhornkatzchen
|
61
62
|
licenses:
|
62
|
-
- GPL-
|
63
|
+
- GPL-2.0
|
63
64
|
metadata: {}
|
64
65
|
post_install_message:
|
65
66
|
rdoc_options: []
|