Skip to content

Commit c18c6d6

Browse files
Merge pull request #1056 from celebdor/delete_service_dns
openstack: Del DNS from service VM update docs
2 parents f0c326f + ae54392 commit c18c6d6

File tree

5 files changed

+28
-92
lines changed

5 files changed

+28
-92
lines changed

data/data/openstack/bootstrap/main.tf

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,6 @@ data "ignition_config" "redirect" {
1515
append {
1616
source = "${openstack_objectstorage_tempurl_v1.ignition_tmpurl.url}"
1717
}
18-
19-
files = [
20-
"${data.ignition_file.bootstrap_ifcfg.id}",
21-
]
22-
}
23-
24-
data "ignition_file" "bootstrap_ifcfg" {
25-
filesystem = "root"
26-
mode = "420" // 0644
27-
path = "/etc/sysconfig/network-scripts/ifcfg-eth0"
28-
29-
content {
30-
content = <<EOF
31-
DEVICE="eth0"
32-
BOOTPROTO="dhcp"
33-
ONBOOT="yes"
34-
TYPE="Ethernet"
35-
PERSISTENT_DHCLIENT="yes"
36-
DNS1="${var.service_vm_fixed_ip}"
37-
PEERDNS="no"
38-
NM_CONTROLLED="yes"
39-
EOF
40-
}
4118
}
4219

4320
data "openstack_images_image_v2" "bootstrap_image" {

data/data/openstack/lb/main.tf

Lines changed: 0 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -35,33 +35,6 @@ data "ignition_file" "haproxy_conf" {
3535
}
3636
}
3737

38-
data "ignition_file" "openshift_hosts" {
39-
filesystem = "root"
40-
mode = "420" // 0644
41-
path = "/etc/openshift-hosts"
42-
43-
content {
44-
content = <<EOF
45-
${replace(join("\n", formatlist("%s ${var.cluster_name}-etcd-%s.${var.cluster_domain}", var.master_ips, var.master_port_names)), "master-port-", "")}
46-
EOF
47-
}
48-
}
49-
50-
data "ignition_systemd_unit" "local_dns" {
51-
name = "local-dns.service"
52-
53-
content = <<EOF
54-
[Unit]
55-
Description=Internal DNS server for running OpenShift on OpenStack
56-
57-
[Service]
58-
ExecStart=/bin/podman run --name bootstrap-dns --rm -t -i -p 53:53/tcp -p 53:53/udp -v /etc/openshift-hosts:/etc/openshift-hosts:z --cap-add=NET_ADMIN docker.io/andyshinn/dnsmasq:latest --keep-in-foreground --log-facility=- --log-queries --no-resolv --addn-hosts=/etc/openshift-hosts --server=10.0.0.2 ${replace(join(" ", formatlist("--srv-host=_etcd-server-ssl._tcp.${var.cluster_name}.${var.cluster_domain},${var.cluster_name}-etcd-%s.${var.cluster_domain},2380,0,10", var.master_port_names)), "master-port-", "")}
59-
60-
[Install]
61-
WantedBy=multi-user.target
62-
EOF
63-
}
64-
6538
data "ignition_user" "core" {
6639
name = "core"
6740
}
@@ -86,12 +59,10 @@ data "ignition_config" "lb_redirect" {
8659

8760
files = [
8861
"${data.ignition_file.haproxy_conf.id}",
89-
"${data.ignition_file.openshift_hosts.id}",
9062
]
9163

9264
systemd = [
9365
"${data.ignition_systemd_unit.haproxy_unit.id}",
94-
"${data.ignition_systemd_unit.local_dns.id}",
9566
]
9667

9768
users = [

data/data/openstack/masters/main.tf

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ data "ignition_config" "master_ignition_config" {
1313
}
1414

1515
files = [
16-
"${data.ignition_file.master_ifcfg.id}",
1716
"${data.ignition_file.master_hacks_script.id}",
1817
]
1918

@@ -22,25 +21,6 @@ data "ignition_config" "master_ignition_config" {
2221
]
2322
}
2423

25-
data "ignition_file" "master_ifcfg" {
26-
filesystem = "root"
27-
mode = "420" // 0644
28-
path = "/etc/sysconfig/network-scripts/ifcfg-eth0"
29-
30-
content {
31-
content = <<EOF
32-
DEVICE="eth0"
33-
BOOTPROTO="dhcp"
34-
ONBOOT="yes"
35-
TYPE="Ethernet"
36-
PERSISTENT_DHCLIENT="yes"
37-
DNS1="${var.service_vm_fixed_ip}"
38-
PEERDNS="no"
39-
NM_CONTROLLED="yes"
40-
EOF
41-
}
42-
}
43-
4424
data "ignition_file" "master_hacks_script" {
4525
filesystem = "root"
4626
mode = "493" // 0755

data/data/openstack/topology/sg-lb.tf

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -23,26 +23,6 @@ resource "openstack_networking_secgroup_rule_v2" "api_https" {
2323
security_group_id = "${openstack_networking_secgroup_v2.api.id}"
2424
}
2525

26-
resource "openstack_networking_secgroup_rule_v2" "api_ingress_dns_udp" {
27-
direction = "ingress"
28-
ethertype = "IPv4"
29-
protocol = "udp"
30-
port_range_min = 53
31-
port_range_max = 53
32-
remote_ip_prefix = "0.0.0.0/0"
33-
security_group_id = "${openstack_networking_secgroup_v2.api.id}"
34-
}
35-
36-
resource "openstack_networking_secgroup_rule_v2" "api_ingress_dns_tcp" {
37-
direction = "ingress"
38-
ethertype = "IPv4"
39-
protocol = "tcp"
40-
port_range_min = 53
41-
port_range_max = 53
42-
remote_ip_prefix = "0.0.0.0/0"
43-
security_group_id = "${openstack_networking_secgroup_v2.api.id}"
44-
}
45-
4626
resource "openstack_networking_secgroup_rule_v2" "api_ingress_ssh_tcp" {
4727
direction = "ingress"
4828
ethertype = "IPv4"

docs/user/openstack/README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,34 @@ openstack network list --long -c ID -c Name -c "Router Type"
6060
+--------------------------------------+----------------+-------------+
6161
```
6262

63+
* You should add the following records to the DNS server that provides service
64+
to your cluster (typically that's the one that the Neutron dns forwards to):
65+
66+
Dnsmasq example with three masters
67+
==================================
68+
69+
service-host=_etcd-server-ssl._tcp.CLUSTER_NAME.DOMAIN_NAME,CLUSTER_NAME-etcd-0.DOMAIN_NAME,2380,0,10
70+
service-host=_etcd-server-ssl._tcp.CLUSTER_NAME.DOMAIN_NAME,CLUSTER_NAME-etcd-1.DOMAIN_NAME,2380,0,10
71+
service-host=_etcd-server-ssl._tcp.CLUSTER_NAME.DOMAIN_NAME,CLUSTER_NAME-etcd-2.DOMAIN_NAME,2380,0,10
72+
cname=CLUSTER_NAME-etcd-0,CLUSTER_NAME-master-0
73+
cname=CLUSTER_NAME-etcd-1,CLUSTER_NAME-master-1
74+
cname=CLUSTER_NAME-etcd-2,CLUSTER_NAME-master-2
75+
76+
Bind example with three masters
77+
===============================
78+
79+
; SVC.PROTO.NAME TTL CLASS PRIORITY WEIGHT PORT TARGET
80+
_etcd-server-ssl._tcp.CLUSTER_NAME.DOMAIN_NAME. IN SRV 0 10 2380 CLUSTER_NAME-etcd-0.DOMAIN_NAME
81+
IN SRV 0 10 2380 CLUSTER_NAME-etcd-1.DOMAIN_NAME
82+
IN SRV 0 10 2380 CLUSTER_NAME-etcd-2.DOMAIN_NAME
83+
84+
$ORIGIN DOMAIN_NAME.
85+
; NAME TTL CLASS CANONICAL_NAME
86+
CLUSTER_NAME-etcd-0 IN CNAME CLUSTER_NAME-master-0.DOMAIN_NAME.
87+
CLUSTER_NAME-etcd-1 IN CNAME CLUSTER_NAME-master-1.DOMAIN_NAME.
88+
CLUSTER_NAME-etcd-2 IN CNAME CLUSTER_NAME-master-2.DOMAIN_NAME.
89+
90+
6391
## Current Expected Behavior
6492

6593
As mentioned, OpenStack support is still experimental. Currently:

0 commit comments

Comments
 (0)