Skip to content

Commit

Permalink
Drop unused ports and switch run_init to false
Browse files Browse the repository at this point in the history
  • Loading branch information
ehelms committed Oct 12, 2018
1 parent ed0ed83 commit 9a019c9
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 18 deletions.
2 changes: 1 addition & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@

$version = 'present'
$wget_version = 'present'
$run_init = true
$run_init = false
$adapter_module = undef
$enable_hbm2ddl_validate = true

Expand Down
2 changes: 1 addition & 1 deletion manifests/service.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
if $run_init {
exec { 'cpinit':
# tomcat startup is slow - try multiple times (the initialization service is idempotent)
command => '/usr/bin/wget --no-proxy --timeout=30 --tries=40 --wait=20 --retry-connrefused -qO- http://localhost:8080/candlepin/admin/init > /var/log/candlepin/cpinit.log 2>&1 && touch /var/lib/candlepin/cpinit_done',
command => "/usr/bin/wget --no-proxy --timeout=30 --tries=40 --wait=20 --retry-connrefused -qO- https://${::fqdn}:${candlpein::ssl_port}/candlepin/admin/init > /var/log/candlepin/cpinit.log 2>&1 && touch /var/lib/candlepin/cpinit_done",
require => [Package['wget'], Service['tomcat']],
creates => '/var/lib/candlepin/cpinit_done',
# timeout is roughly "wait" * "tries" from above
Expand Down
4 changes: 2 additions & 2 deletions spec/acceptance/basic_candlepin_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
describe 'candlepin works' do
include_examples 'the example', 'basic_candlepin.pp'

describe port(8080) do
describe port(8443) do
it { is_expected.to be_listening }
end

describe command('curl -s -o /dev/null -w \'%{http_code}\' http://localhost:8080/candlepin/status') do
describe command('curl -k -s -o /dev/null -w \'%{http_code}\' http://localhost:8443/candlepin/status') do
its(:stdout) { should eq "200" }
end
end
14 changes: 0 additions & 14 deletions templates/tomcat/server.xml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -69,16 +69,6 @@
APR (HTTP/AJP) Connector: /docs/apr.html
Define a non-SSL HTTP/1.1 Connector on port 8080
-->
<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="<%= scope['::candlepin::ssl_port'] %>" />
<!-- A "Connector" using the shared thread pool-->
<!--
<Connector executor="tomcatThreadPool"
port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="<%= scope['::candlepin::ssl_port'] %>" />
-->
<!-- Define a SSL HTTP/1.1 Connector on port <%= scope['::candlepin::ssl_port'] %>
This connector uses the JSSE configuration, when using APR, the
connector should be using the OpenSSL style configuration
Expand All @@ -96,10 +86,6 @@
ciphers="<%= scope['::candlepin::ciphers'].join(",\n ") %>"
truststorePass="<%= scope['candlepin::truststore_password'] %>" />

<!-- Define an AJP 1.3 Connector on port 8009 -->
<Connector port="8009" protocol="AJP/1.3" redirectPort="<%= scope['::candlepin::ssl_port'] %>" />


<!-- An Engine represents the entry point (within Catalina) that processes
every request. The Engine implementation for Tomcat stand alone
analyzes the HTTP headers included with the request, and passes them
Expand Down

0 comments on commit 9a019c9

Please sign in to comment.