0b4f304be9
In order to avoid conflicts with containerized services binding to standard HTTP (80) / HTTPS (443) port numbers, the default port numbers are changed to 8080 and 8443. Furthermore, CLI commands are provided to allow binding to alternate port numbers. List of changes: . Add service parameters for HTTP and HTTPS port . Configure the lighttpd ports via puppet and use port 8008 for platform horizon . Add http port to platform.conf for the config scripts . Support helm repo URL update . Add helm-toolkit plugin for location override . Override Armada manifest location . Add installer base URL option to pxeboot-update script . Add a patching run time class to restart patch-agent when the port config is changed . Add a semantic check to block port config when a patching operation is in progress or a host is not in unlocked/enabled state CLI commands for viewing and updating port numbers are: system service-parameter-list --service http system service-parameter-modify lighttpd port http=8090 system service-parameter-apply lighttpd Tests Performed: Non-containerized deployment installation and sanity AIO-DX: Sanity and Nightly automated test suite 2+2 System: Sanity and Nightly automated test suite 2+4+6 System: Sanity and Nightly automated test suite Kubernetes deployment on VBox: AIO-SX: application apply and launch instance AIO-DX: application apply and launch instance 2+2 System: application apply and launch instance HTTP/HTTPS port configuration Enable/Disable https Story: 2004642 Task: 28592 Change-Id: I65029e0c15aaf626acb56ab71e7bbde64c7e76a8 Signed-off-by: Tao Liu <tao.liu@windriver.com>
136 lines
3.3 KiB
Puppet
136 lines
3.3 KiB
Puppet
class openstack::swift::params (
|
|
$swift_hash_path_suffix = 'swift_secret',
|
|
$service_name = 'openstack-swift',
|
|
$service_enabled = false,
|
|
$api_port = 8080,
|
|
$api_host = '127.0.0.1',
|
|
$fs_size_mb = '25',
|
|
) { }
|
|
|
|
|
|
class openstack::swift::firewall
|
|
inherits ::openstack::swift::params {
|
|
|
|
if $service_enabled {
|
|
platform::firewall::rule { 'swift-api':
|
|
service_name => 'swift',
|
|
ports => $api_port,
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
class openstack::swift::haproxy
|
|
inherits ::openstack::swift::params {
|
|
|
|
if $service_enabled {
|
|
platform::haproxy::proxy { 'swift-restapi':
|
|
server_name => 's-swift',
|
|
public_port => $api_port,
|
|
private_port => $api_port,
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
class openstack::swift::api {
|
|
include ::openstack::swift::firewall
|
|
include ::openstack::swift::haproxy
|
|
}
|
|
|
|
|
|
class openstack::swift
|
|
inherits ::openstack::swift::params {
|
|
|
|
include ::platform::params
|
|
include ::openstack::keystone::params
|
|
|
|
if $service_enabled {
|
|
if str2bool($::is_controller_active) or
|
|
str2bool($::is_standalone_controller) {
|
|
class { '::swift::keystone::auth':
|
|
configure_s3_endpoint => false,
|
|
}
|
|
}
|
|
|
|
class { '::swift':
|
|
swift_hash_path_suffix => $swift_hash_path_suffix
|
|
}
|
|
|
|
include swift::proxy::healthcheck
|
|
include swift::proxy::proxy_logging
|
|
include swift::proxy::authtoken
|
|
include swift::proxy::keystone
|
|
include swift::proxy::container_quotas
|
|
class { 'swift::proxy':
|
|
account_autocreate => true,
|
|
proxy_local_net_ip => $api_host,
|
|
port => $api_port,
|
|
pipeline => ['healthcheck', 'authtoken', 'keystone', 'container-quotas' , 'proxy-logging', 'proxy-server'],
|
|
}
|
|
|
|
swift::storage::loopback { '1':
|
|
require => Class['swift'],
|
|
base_dir => '/srv/loopback-device',
|
|
mnt_base_dir => '/srv/node',
|
|
byte_size => '1024',
|
|
seek => $fs_size_mb*1024,
|
|
}
|
|
|
|
# remove dependency on xinetd
|
|
class { '::rsync::server':
|
|
use_xinetd => false,
|
|
address => $api_host,
|
|
use_chroot => 'no',
|
|
}
|
|
|
|
class { 'swift::storage::all':
|
|
storage_local_net_ip => $api_host,
|
|
object_port => '6200',
|
|
container_port => '6201',
|
|
account_port => '6202',
|
|
account_pipeline => ['healthcheck', 'recon', 'account-server'],
|
|
container_pipeline => ['healthcheck', 'recon', 'container-server'],
|
|
object_pipeline => ['healthcheck', 'recon', 'object-server'],
|
|
# Turn on support for object versioning
|
|
allow_versions => true,
|
|
}
|
|
|
|
$rings = [
|
|
'account',
|
|
'object',
|
|
'container']
|
|
swift::storage::filter::recon { $rings: }
|
|
swift::storage::filter::healthcheck { $rings: }
|
|
|
|
ring_object_device { "${api_host}:6200/1":
|
|
region => 1, # optional, defaults to 1
|
|
zone => 1,
|
|
weight => 1,
|
|
}
|
|
|
|
ring_container_device { "${api_host}:6201/1":
|
|
zone => 1,
|
|
weight => 1,
|
|
}
|
|
|
|
ring_account_device { "${api_host}:6202/1":
|
|
zone => 1,
|
|
weight => 1,
|
|
}
|
|
|
|
class { 'swift::ringbuilder':
|
|
part_power => '10',
|
|
# number of replicas can not be more than the number of nodes
|
|
replicas => '1',
|
|
min_part_hours => '1',
|
|
require => Class['swift'],
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
class openstack::swift::runtime {
|
|
include ::openstack::swift
|
|
}
|