beaker-pe 1.31.0 → 1.32.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/beaker-pe/install/pe_utils.rb +37 -0
- data/lib/beaker-pe/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MzczZjEzZjYxOWNhZDY3NmRmNmYzNDZmOGIwMzgzMzk4NTRiMGNkMA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MThjZDMxNDdjYmE5MzM1ODE0OWUzM2Q3NDcyYjNkMWM0NzMwNTdmYQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTkyNTY1MGRhNDQyMTU5OGI2MmYzMjBmODgxOWZhYWY1MzdlNDBjZDIyM2Ji
|
10
|
+
YTY4NTQ5NmFmMWZlNTFmZjVkNDA2ODZjMzgyYzU1OGMxNWI0Y2E4MjNkZDdh
|
11
|
+
M2U4NjkzYWMxZjUwZTYwN2M1MjNiZDUyMTVkMTk1NjNlMmJjMmM=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NzBkYjQzNzU5N2Q3NjNkYmQ1MTM2NjUyNTMwY2M1NzU2NjUxZDk1MTMyYmZm
|
14
|
+
MzdjOWE0NmI5ZDZkNmIwMjVmNDk3ZDVmMmMyNWM1NDNlODUyZjJmNzg4ODc4
|
15
|
+
ZmQ4MTBhNTBlYTVmMGM4ODcwZDc2MWM5Y2JiZWVhOWQ0MDE0ODc=
|
@@ -480,6 +480,9 @@ module Beaker
|
|
480
480
|
def do_install hosts, opts = {}
|
481
481
|
# detect the kind of install we're doing
|
482
482
|
install_type = determine_install_type(hosts, opts)
|
483
|
+
if opts[:use_proxy]
|
484
|
+
config_master_for_proxy_access
|
485
|
+
end
|
483
486
|
case install_type
|
484
487
|
when :pe_managed_postgres
|
485
488
|
do_install_pe_with_pe_managed_external_postgres(hosts,opts)
|
@@ -578,6 +581,40 @@ module Beaker
|
|
578
581
|
end
|
579
582
|
end
|
580
583
|
|
584
|
+
|
585
|
+
# Configure the master to use a proxy and drop unproxied connections
|
586
|
+
def config_master_for_proxy_access
|
587
|
+
step "configuring master to use proxy" do
|
588
|
+
@osmirror_host = "osmirror.delivery.puppetlabs.net"
|
589
|
+
@osmirror_host_ip = IPSocket.getaddress(@osmirror_host)
|
590
|
+
@delivery_host = "enterprise.delivery.puppetlabs.net"
|
591
|
+
@delivery_host_ip = IPSocket.getaddress(@delivery_host)
|
592
|
+
@proxy_ip = @options[:proxy_ip]
|
593
|
+
@proxy_hostname = @options[:proxy_hostname]
|
594
|
+
@master_ip = on master, "hostname -I | tr '\n' ' '"
|
595
|
+
on master, "echo \"#{@proxy_ip} #{@proxy_hostname}\" >> /etc/hosts"
|
596
|
+
on master, "echo \"#{@master_ip.stdout} #{master.connection.vmhostname}\" >> /etc/hosts"
|
597
|
+
on master, "echo \"#{@osmirror_host_ip} #{@osmirror_host}\" >> /etc/hosts"
|
598
|
+
on master, "echo \"#{@delivery_host_ip} #{@delivery_host}\" >> /etc/hosts"
|
599
|
+
on master, "iptables -A OUTPUT -p tcp -d #{master.connection.vmhostname} -j ACCEPT"
|
600
|
+
# internal puppet lan
|
601
|
+
on master, "iptables -A OUTPUT -p tcp -d 10.32.0.0/16 -j ACCEPT"
|
602
|
+
on master, "iptables -A OUTPUT -p tcp --dport 3128 -d #{@proxy_hostname} -j ACCEPT"
|
603
|
+
on master, "iptables -A OUTPUT -p tcp -d #{@osmirror_host_ip} -j DROP"
|
604
|
+
on master, "iptables -A OUTPUT -p tcp -d #{@delivery_host_ip} -j DROP"
|
605
|
+
on master, "iptables -P OUTPUT DROP"
|
606
|
+
on master, "curl --proxy #{@proxy_hostname}:3128 http://#{@osmirror_host}", :acceptable_exit_codes => [0]
|
607
|
+
on master, "curl -k https://#{@osmirror_host}", :acceptable_exit_codes => [1,7]
|
608
|
+
if master.host_hash[:platform].include?("ubuntu")
|
609
|
+
on master, "echo 'Acquire::http::Proxy \"http://'#{@proxy_hostname}':3128/\";' >> /etc/apt/apt.conf"
|
610
|
+
on master, "echo 'Acquire::https::Proxy \"http://'#{@proxy_hostname}':3128/\";' >> /etc/apt/apt.conf"
|
611
|
+
else
|
612
|
+
on master, "echo \"proxy=http://#{@proxy_hostname}:3128\" >> /etc/yum.conf"
|
613
|
+
end
|
614
|
+
end
|
615
|
+
end
|
616
|
+
|
617
|
+
|
581
618
|
def generic_install hosts, opts = {}
|
582
619
|
step "Installing PE on a generic set of hosts"
|
583
620
|
|
data/lib/beaker-pe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: beaker-pe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.32.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Puppetlabs
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-01-
|
11
|
+
date: 2018-01-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|