Merge "Add option to just configure prerouting rules"
This commit is contained in:
commit
5af3089f6a
@ -148,6 +148,9 @@ Instruct the VM to use the selected image, eg. ubuntu xenial:
|
|||||||
Install the specified kernel, eg 3.13.0-34 if you want to deploy Juno release.
|
Install the specified kernel, eg 3.13.0-34 if you want to deploy Juno release.
|
||||||
``DEFAULT_KERNEL=${DEFAULT_KERNEL:-3.13.0-34}``
|
``DEFAULT_KERNEL=${DEFAULT_KERNEL:-3.13.0-34}``
|
||||||
|
|
||||||
|
Configure the prerouting iptable rules after the OSA deployment
|
||||||
|
``CONFIG_PREROUTING="${CONFIG_PREROUTING:-true}``
|
||||||
|
|
||||||
Re-kicking the VMs
|
Re-kicking the VMs
|
||||||
------------------
|
------------------
|
||||||
|
|
||||||
|
@ -6,21 +6,25 @@ source functions.rc
|
|||||||
# bring in variable definitions if there is a variables.sh file
|
# bring in variable definitions if there is a variables.sh file
|
||||||
[[ -f variables.sh ]] && source variables.sh
|
[[ -f variables.sh ]] && source variables.sh
|
||||||
|
|
||||||
# Copy private key and public key to deploy node
|
if [[ "${DEPLOY_OSA}" = true ]]; then
|
||||||
scp -r -o StrictHostKeyChecking=no ~/.ssh deploy1:/root/
|
# Copy private key and public key to deploy node
|
||||||
|
scp -r -o StrictHostKeyChecking=no ~/.ssh deploy1:/root/
|
||||||
|
|
||||||
# Copy multi-node-aio folder to deploy node
|
# Copy multi-node-aio folder to deploy node
|
||||||
scp -r -o StrictHostKeyChecking=no ../multi-node-aio deploy1:/root
|
scp -r -o StrictHostKeyChecking=no ../multi-node-aio deploy1:/root
|
||||||
|
|
||||||
# Deploy openstack-ansible from deploy node and export all variables deploy-osa.sh needs
|
# Deploy openstack-ansible from deploy node and export all variables deploy-osa.sh needs
|
||||||
ssh -o StrictHostKeyChecking=no deploy1 "export NETWORK_BASE=${NETWORK_BASE} RUN_OSA=${RUN_OSA} " \
|
ssh -o StrictHostKeyChecking=no deploy1 "export NETWORK_BASE=${NETWORK_BASE} RUN_OSA=${RUN_OSA} " \
|
||||||
"OSA_BRANCH=${OSA_BRANCH} PRE_CONFIG_OSA=${PRE_CONFIG_OSA}; apt update; cd /root/multi-node-aio/; ./deploy-osa.sh"
|
"OSA_BRANCH=${OSA_BRANCH} PRE_CONFIG_OSA=${PRE_CONFIG_OSA}; apt update; cd /root/multi-node-aio/; ./deploy-osa.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
# Add 2222 rules to iptables for ssh directly into deployment node.
|
if [[ "${CONFIG_PREROUTING}" = true ]]; then
|
||||||
iptables_filter_rule_add nat 'PREROUTING -p tcp --dport 2222 -j DNAT --to 10.0.0.150:22'
|
# Add 2222 rules to iptables for ssh directly into deployment node.
|
||||||
|
iptables_filter_rule_add nat 'PREROUTING -p tcp --dport 2222 -j DNAT --to 10.0.0.150:22'
|
||||||
|
|
||||||
scp -o StrictHostKeyChecking=no deploy1:/opt/openstack-ansible/playbooks/vars/configs/haproxy_config.yml .
|
scp -o StrictHostKeyChecking=no deploy1:/opt/openstack-ansible/playbooks/vars/configs/haproxy_config.yml .
|
||||||
PORTS="$(get_osad_ports) $OSA_PORTS"
|
PORTS="$(get_osad_ports) $OSA_PORTS"
|
||||||
for port in $PORTS ; do
|
for port in $PORTS ; do
|
||||||
iptables_filter_rule_add nat "PREROUTING -p tcp --dport ${port} -j DNAT --to 10.0.0.150:${port}"
|
iptables_filter_rule_add nat "PREROUTING -p tcp --dport ${port} -j DNAT --to 10.0.0.150:${port}"
|
||||||
done
|
done
|
||||||
|
fi
|
@ -45,3 +45,6 @@ RUN_OSA="${RUN_OSA:-true}"
|
|||||||
|
|
||||||
# Default service ports
|
# Default service ports
|
||||||
OSA_PORTS="${OSA_PORTS:-6080 6082 443 80}"
|
OSA_PORTS="${OSA_PORTS:-6080 6082 443 80}"
|
||||||
|
|
||||||
|
# Should we configure prerouting of service ports after deployment
|
||||||
|
CONFIG_PREROUTING="${CONFIG_PREROUTING:-true}"
|
Loading…
x
Reference in New Issue
Block a user