vagrant-delphix 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +3 -3
- data/lib/vagrant-delphix/action/destroy_environment.rb +3 -5
- data/lib/vagrant-delphix/action/disable_environment.rb +3 -4
- data/lib/vagrant-delphix/action/enable_environment.rb +3 -4
- data/lib/vagrant-delphix/provisioner.rb +3 -4
- data/lib/vagrant-delphix/version.rb +1 -1
- data/test/Vagrantfile +14 -17
- data/vagrant-delphix.gemspec +1 -1
- metadata +4 -6
- data/test/prepare_delphix.sh +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e4f08c0ec2e96d200c4cce6c5b3711ae5368ee6
|
4
|
+
data.tar.gz: 7075fcef68483dc3d8418e4d7186a045609d40b3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53e80220e9505b179e688bae5c8bac4585ab765f7747c8c79c5712c33c3ec1c70024742acf246e557574340922dbb4211ca8d57fa0957a3da596f00676e26a5f
|
7
|
+
data.tar.gz: 5c0945b0d2ded90110a765b971d7572cae57b2142f53c2d2dcdbd0c255c51285d9bf7ed8b135efb4753a5afb78074c5a66405778830c41e03d2159975358979b
|
data/Gemfile.lock
CHANGED
@@ -24,8 +24,8 @@ GIT
|
|
24
24
|
PATH
|
25
25
|
remote: .
|
26
26
|
specs:
|
27
|
-
vagrant-delphix (
|
28
|
-
delphix_rb (~>
|
27
|
+
vagrant-delphix (1.1.0)
|
28
|
+
delphix_rb (~> 1.1.0)
|
29
29
|
|
30
30
|
GEM
|
31
31
|
remote: https://rubygems.org/
|
@@ -33,7 +33,7 @@ GEM
|
|
33
33
|
builder (3.2.2)
|
34
34
|
childprocess (0.5.9)
|
35
35
|
ffi (~> 1.0, >= 1.0.11)
|
36
|
-
delphix_rb (
|
36
|
+
delphix_rb (1.1.0)
|
37
37
|
excon (~> 0.45.4)
|
38
38
|
domain_name (0.5.25)
|
39
39
|
unf (>= 0.0.5, < 1.0.0)
|
@@ -17,7 +17,6 @@ module VagrantPlugins
|
|
17
17
|
@logger = Log4r::Logger.new('vagrant::delphix_engine::create_environment')
|
18
18
|
|
19
19
|
@config = get_config(@machine)
|
20
|
-
|
21
20
|
end
|
22
21
|
|
23
22
|
def call(env)
|
@@ -32,11 +31,10 @@ module VagrantPlugins
|
|
32
31
|
Delphix.authenticate!(@config.engine_user,@config.engine_password)
|
33
32
|
|
34
33
|
# lookup the environment
|
35
|
-
|
36
|
-
environment = environments.lookup_by_name @config.env_name
|
34
|
+
environment = Delphix::Environment.list.lookup_by_name @config.env_name
|
37
35
|
|
38
|
-
#
|
39
|
-
environment.delete if environment != nil
|
36
|
+
# Delete the environment and all its sources. Blocks until completion or error.
|
37
|
+
environment.delete.wait_for_completion if environment != nil
|
40
38
|
|
41
39
|
@app.call(env)
|
42
40
|
end
|
@@ -31,11 +31,10 @@ module VagrantPlugins
|
|
31
31
|
Delphix.authenticate!(@config.engine_user,@config.engine_password)
|
32
32
|
|
33
33
|
# lookup the environment
|
34
|
-
|
35
|
-
environment = environments.lookup_by_name @config.env_name
|
34
|
+
environment = Delphix::Environment.list.lookup_by_name @config.env_name
|
36
35
|
|
37
|
-
#
|
38
|
-
environment.disable if environment != nil
|
36
|
+
# Disable the environment and all its sources. Blocks until completion or error.
|
37
|
+
environment.disable.wait_for_completion if environment != nil
|
39
38
|
|
40
39
|
@app.call(env)
|
41
40
|
end
|
@@ -31,11 +31,10 @@ module VagrantPlugins
|
|
31
31
|
Delphix.authenticate!(@config.engine_user,@config.engine_password)
|
32
32
|
|
33
33
|
# lookup the environment
|
34
|
-
|
35
|
-
environment = environments.lookup_by_name @config.env_name
|
34
|
+
environment = Delphix::Environment.list.lookup_by_name @config.env_name
|
36
35
|
|
37
|
-
#
|
38
|
-
environment.enable if environment != nil
|
36
|
+
# Enable the environment but no sources. Blocks until completion or error.
|
37
|
+
environment.enable.wait_for_completion if environment != nil
|
39
38
|
|
40
39
|
@app.call(env)
|
41
40
|
end
|
@@ -26,12 +26,11 @@ module VagrantPlugins
|
|
26
26
|
Delphix.authenticate!(@config.engine_user,@config.engine_password)
|
27
27
|
|
28
28
|
# lookup the environment
|
29
|
-
|
30
|
-
environment = environments.lookup_by_name @config.env_name
|
29
|
+
environment = Delphix::Environment.list.lookup_by_name @config.env_name
|
31
30
|
|
32
31
|
if environment == nil
|
33
|
-
#
|
34
|
-
|
32
|
+
# Ceate a new environment. This call blocks until the environment is ready or there was an error.
|
33
|
+
Delphix::Environment.create @config.env_name, @config.env_ip, @config.env_port, @config.toolkit_path, @config.user, @config.password
|
35
34
|
else
|
36
35
|
# enable the environment
|
37
36
|
environment.enable
|
data/test/Vagrantfile
CHANGED
@@ -18,32 +18,29 @@ VMWARE_NETWORK_ADAPTER ||= ENV['VMWARE_NETWORK_ADAPTER'] || 'vmnet8'
|
|
18
18
|
IP_BASE = DELPHIX_ENGINE_IP.split('.')[0..2].join('.')
|
19
19
|
|
20
20
|
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
21
|
-
|
21
|
+
|
22
22
|
# Every Vagrant environment requires a box to build off of.
|
23
|
-
config.vm.box = "
|
24
|
-
|
23
|
+
config.vm.box = "ratchetcc/delphix"
|
24
|
+
|
25
25
|
# size of the box
|
26
26
|
config.vm.provider :virtualbox do |vb|
|
27
27
|
vb.memory = VB_MEMORY
|
28
28
|
vb.cpus = VB_CPUS
|
29
29
|
end
|
30
|
-
|
30
|
+
|
31
31
|
#config the delphix provisioner
|
32
32
|
config.delphix.enabled = true
|
33
|
-
config.delphix.engine_url = "http://
|
33
|
+
config.delphix.engine_url = "http://de.delphix.local"
|
34
34
|
config.delphix.engine_user = 'delphix_admin'
|
35
35
|
config.delphix.engine_password = 'delphix'
|
36
|
-
|
37
|
-
# tasks for all environments
|
38
|
-
config.vm.provision "shell", path: "prepare_delphix.sh"
|
39
|
-
|
36
|
+
|
40
37
|
config.vm.define "source" do |node|
|
41
|
-
|
38
|
+
|
42
39
|
# networking
|
43
40
|
public_ipv4 = "#{IP_BASE}.42"
|
44
41
|
node.vm.hostname = "source.#{DOMAIN_NAME}"
|
45
42
|
node.vm.network "public_network", ip: public_ipv4, bridge: VMWARE_NETWORK_ADAPTER
|
46
|
-
|
43
|
+
|
47
44
|
# configure the Delphix provisioner
|
48
45
|
node.delphix.trace = false
|
49
46
|
node.delphix.env_name = "source"
|
@@ -52,12 +49,12 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
|
|
52
49
|
node.delphix.user = 'delphix'
|
53
50
|
node.delphix.password = 'delphix'
|
54
51
|
node.delphix.toolkit_path = '/home/delphix/toolkit'
|
55
|
-
|
56
|
-
# execute the Delphix provisioner.
|
52
|
+
|
53
|
+
# execute the Delphix provisioner.
|
57
54
|
node.vm.provision :delphix, run: "always"
|
58
|
-
# option run: "always" is a MUST for now,
|
59
|
-
# otherwise the environment will not be re-enabled once the VM has been shut
|
60
|
-
|
55
|
+
# option run: "always" is a MUST for now,
|
56
|
+
# otherwise the environment will not be re-enabled once the VM has been shut down ...
|
57
|
+
|
61
58
|
end
|
62
|
-
|
59
|
+
|
63
60
|
end
|
data/vagrant-delphix.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vagrant-delphix
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Kuehl
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-02-
|
11
|
+
date: 2016-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: 1.
|
47
|
+
version: 1.1.0
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 1.
|
54
|
+
version: 1.1.0
|
55
55
|
description: A Vagrant plugin that interacts with the Delphix Engine
|
56
56
|
email:
|
57
57
|
- michael.kuehl@delphix.com
|
@@ -79,7 +79,6 @@ files:
|
|
79
79
|
- lib/vagrant-delphix/version.rb
|
80
80
|
- locales/en.yml
|
81
81
|
- test/Vagrantfile
|
82
|
-
- test/prepare_delphix.sh
|
83
82
|
- test/rake_test_destroy.sh
|
84
83
|
- test/rake_test_halt.sh
|
85
84
|
- test/rake_test_up.sh
|
@@ -110,7 +109,6 @@ specification_version: 4
|
|
110
109
|
summary: A Vagrant plugin that interacts with the Delphix Engine
|
111
110
|
test_files:
|
112
111
|
- test/Vagrantfile
|
113
|
-
- test/prepare_delphix.sh
|
114
112
|
- test/rake_test_destroy.sh
|
115
113
|
- test/rake_test_halt.sh
|
116
114
|
- test/rake_test_up.sh
|
data/test/prepare_delphix.sh
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
#!/bin/bash
|
2
|
-
|
3
|
-
# create locations for app and Delphix engine toolkit
|
4
|
-
export SETUP_HOME=/home/delphix
|
5
|
-
export TOOLKIT_HOME=$SETUP_HOME/toolkit
|
6
|
-
|
7
|
-
sudo echo "# DELPHIX #" >> /etc/profile
|
8
|
-
sudo echo "export SETUP_HOME=/home/delphix" >> /etc/profile
|
9
|
-
sudo echo "export TOOLKIT_HOME=$SETUP_HOME/toolkit" >> /etc/profile
|
10
|
-
|
11
|
-
# create a delphix user
|
12
|
-
useradd delphix
|
13
|
-
echo delphix | passwd delphix --stdin
|
14
|
-
|
15
|
-
# toolkit location
|
16
|
-
sudo mkdir -p $TOOLKIT_HOME
|
17
|
-
chown delphix:delphix $TOOLKIT_HOME
|
18
|
-
chmod 0770 $TOOLKIT_HOME
|
19
|
-
|
20
|
-
# add the user to wheel, i.e. sudoer group
|
21
|
-
sudo usermod -a -G wheel delphix
|
22
|
-
|
23
|
-
# add some requ.
|
24
|
-
sudo yum -y install glibc.i686 java-1.7.0-openjdk
|