Gate: Enable API access from VMs in the gate and development envs
This PS enables API access from VMs in the gate and development env Change-Id: I0639e43dc88cbe8bf4cfe102320e2a8bf9025073 Depends-On: I32c8e752675b037610f77c8baee1c1636d5a032e Signed-off-by: Pete Birley <pete@port.direct>
This commit is contained in:
parent
966a7f08ef
commit
4ba2dec634
@ -29,3 +29,19 @@ sudo iptables -P FORWARD ACCEPT
|
|||||||
# Setup masquerading on default route dev to public subnet
|
# Setup masquerading on default route dev to public subnet
|
||||||
DEFAULT_ROUTE_DEV="$(sudo ip -4 route list 0/0 | awk '{ print $5; exit }')"
|
DEFAULT_ROUTE_DEV="$(sudo ip -4 route list 0/0 | awk '{ print $5; exit }')"
|
||||||
sudo iptables -t nat -A POSTROUTING -o ${DEFAULT_ROUTE_DEV} -s ${OSH_EXT_SUBNET} -j MASQUERADE
|
sudo iptables -t nat -A POSTROUTING -o ${DEFAULT_ROUTE_DEV} -s ${OSH_EXT_SUBNET} -j MASQUERADE
|
||||||
|
|
||||||
|
# NOTE(portdirect): Setup DNS for public endpoints
|
||||||
|
sudo docker run -d \
|
||||||
|
--name br-ex-dns-server \
|
||||||
|
--net host \
|
||||||
|
--cap-add=NET_ADMIN \
|
||||||
|
--volume /etc/kubernetes/kubelet-resolv.conf:/etc/kubernetes/kubelet-resolv.conf:ro \
|
||||||
|
--entrypoint dnsmasq \
|
||||||
|
docker.io/openstackhelm/neutron:newton \
|
||||||
|
--keep-in-foreground \
|
||||||
|
--no-hosts \
|
||||||
|
--resolv-file=/etc/kubernetes/kubelet-resolv.conf \
|
||||||
|
--address="/svc.cluster.local/${OSH_BR_EX_ADDR%/*}" \
|
||||||
|
--listen-address="${OSH_BR_EX_ADDR%/*}"
|
||||||
|
sleep 1
|
||||||
|
sudo docker top br-ex-dns-server
|
||||||
|
@ -61,6 +61,7 @@ openstack stack create --wait \
|
|||||||
--parameter image="${IMAGE_NAME}" \
|
--parameter image="${IMAGE_NAME}" \
|
||||||
--parameter ssh_key=${OSH_VM_KEY_STACK} \
|
--parameter ssh_key=${OSH_VM_KEY_STACK} \
|
||||||
--parameter cidr=${OSH_PRIVATE_SUBNET} \
|
--parameter cidr=${OSH_PRIVATE_SUBNET} \
|
||||||
|
--parameter dns_nameserver=${OSH_BR_EX_ADDR%/*} \
|
||||||
-t ./tools/gate/files/heat-basic-vm-deployment.yaml \
|
-t ./tools/gate/files/heat-basic-vm-deployment.yaml \
|
||||||
heat-basic-vm-deployment
|
heat-basic-vm-deployment
|
||||||
|
|
||||||
@ -97,6 +98,9 @@ ssh -i ${HOME}/.ssh/osh_key cirros@${FLOATING_IP} ping -q -c 1 -W 2 ${OSH_BR_EX_
|
|||||||
# Check the VM can reach the metadata server
|
# Check the VM can reach the metadata server
|
||||||
ssh -i ${HOME}/.ssh/osh_key cirros@${FLOATING_IP} curl --verbose --connect-timeout 5 169.254.169.254
|
ssh -i ${HOME}/.ssh/osh_key cirros@${FLOATING_IP} curl --verbose --connect-timeout 5 169.254.169.254
|
||||||
|
|
||||||
|
# Check the VM can reach the keystone server
|
||||||
|
ssh -i ${HOME}/.ssh/osh_key cirros@${FLOATING_IP} curl --verbose --connect-timeout 5 keystone.openstack.svc.cluster.local
|
||||||
|
|
||||||
# Check to see if cinder has been deployed, if it has then perform a volume attach.
|
# Check to see if cinder has been deployed, if it has then perform a volume attach.
|
||||||
if helm ls --short | grep -q "^cinder$"; then
|
if helm ls --short | grep -q "^cinder$"; then
|
||||||
INSTANCE_ID=$(openstack stack output show \
|
INSTANCE_ID=$(openstack stack output show \
|
||||||
|
@ -17,6 +17,11 @@ parameters:
|
|||||||
type: string
|
type: string
|
||||||
default: 10.11.11.0/24
|
default: 10.11.11.0/24
|
||||||
|
|
||||||
|
dns_nameserver:
|
||||||
|
type: comma_delimited_list
|
||||||
|
description: address of a dns nameserver reachable in your environment
|
||||||
|
default: 8.8.8.8
|
||||||
|
|
||||||
resources:
|
resources:
|
||||||
flavor:
|
flavor:
|
||||||
type: OS::Nova::Flavor
|
type: OS::Nova::Flavor
|
||||||
@ -65,8 +70,7 @@ resources:
|
|||||||
cidr:
|
cidr:
|
||||||
get_param: cidr
|
get_param: cidr
|
||||||
dns_nameservers:
|
dns_nameservers:
|
||||||
- 8.8.8.8
|
get_param: dns_nameserver
|
||||||
- 8.8.4.4
|
|
||||||
|
|
||||||
port_security_group:
|
port_security_group:
|
||||||
type: OS::Neutron::SecurityGroup
|
type: OS::Neutron::SecurityGroup
|
||||||
|
@ -34,6 +34,8 @@
|
|||||||
roles:
|
roles:
|
||||||
- upgrade-host
|
- upgrade-host
|
||||||
- start-zuul-console
|
- start-zuul-console
|
||||||
|
- disable-local-nameserver
|
||||||
tags:
|
tags:
|
||||||
- upgrade-host
|
- upgrade-host
|
||||||
- start-zuul-console
|
- start-zuul-console
|
||||||
|
- disable-local-nameserver
|
||||||
|
Loading…
Reference in New Issue
Block a user