Skip to content

Commit 256ced2

Browse files
committed
Slightly change IPv6 prefix used and update README with address mappings.
1 parent 0d19918 commit 256ced2

File tree

6 files changed

+46
-30
lines changed

6 files changed

+46
-30
lines changed

README.adoc

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,33 @@ executed:
437437
$ sudo ./target/debug/omicron-package uninstall
438438
----
439439

440+
=== Test Environment
441+
442+
When we deploy, we're effectively creating a number of different zones
443+
for all the components that make up Omicron (Nexus, Clickhouse, Crucible, etc).
444+
Since all these services run in different zones they cannot communicate with
445+
each other (and Sled Agent in the global zone) via `localhost`. In practise,
446+
we'll assign addresses as per RFD 63 as well as incorporating DNS based
447+
service discovery.
448+
449+
For the purposes of local development today, we specify some hardcoded IPv6
450+
unique local addresses in `fd00:1de::/16`:
451+
452+
[options="header"]
453+
|===================================================================================================
454+
| Service | Endpoint
455+
| Sled Agent: Bootstrap | `[::]:12346`
456+
| Sled Agent: Dropshot API | `[fd00:1de::]:12345`
457+
| Cockroach DB | `[fd00:1de::5]:32221`
458+
| Oximeter | `[fd00:1de::6]:12223`
459+
| Nexus: External API | `[fd00:1de::7]:12220`
460+
| Nexus: Internal API | `[fd00:1de::7]:12221`
461+
| Clickhouse | `[fd00:1de::8]:8123`
462+
| Crucible Downstairs | `[fd00:1de::9]:32345`, `[fd00:1de::10]:32345`, `[fd00:1de::11]:32345`
463+
|===================================================================================================
464+
465+
Note that Sled Agent runs in the global zone and is the one responsible for bringing up all the other
466+
other services and allocating them with vNICs and IPv6 addresses.
440467

441468
== Configuration reference
442469

sled-agent/src/illumos/zone.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -428,10 +428,7 @@ impl Zones {
428428
Self::ensure_address(
429429
None,
430430
&gz_link_local_addrobj.on_same_interface("v6route")?,
431-
AddressRequest::new_static(
432-
"fd00:1234::".parse().unwrap(),
433-
Some(16),
434-
),
431+
AddressRequest::new_static("fd00:1de::".parse().unwrap(), Some(16)),
435432
)?;
436433
Ok(())
437434
}

smf/nexus/config.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,15 @@ schemes_external = ["spoof", "session_cookie"]
1818

1919
[database]
2020
# URL for connecting to the database
21-
url = "postgresql://root@[fd00:1234::5]:32221/omicron?sslmode=disable"
21+
url = "postgresql://root@[fd00:1de::5]:32221/omicron?sslmode=disable"
2222

2323
[dropshot_external]
2424
# IP address and TCP port on which to listen for the external API
25-
bind_address = "192.168.1.123:12220"
25+
bind_address = "[fd00:1de::7]:12220"
2626

2727
[dropshot_internal]
2828
# IP address and TCP port on which to listen for the internal API
29-
bind_address = "[fd00:1234::7]:12221"
29+
bind_address = "[fd00:1de::7]:12221"
3030

3131
[log]
3232
# Show log messages of this level and more severe
@@ -42,4 +42,4 @@ mode = "stderr-terminal"
4242

4343
# Configuration for interacting with the timeseries database
4444
[timeseries_db]
45-
address = "[fd00:1234::8]:8123"
45+
address = "[fd00:1de::8]:8123"

smf/oximeter/config.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
id = "1da65e5b-210c-4859-a7d7-200c1e659972"
44
# Internal address of nexus
5-
nexus_address = "[fd00:1234::7]:12221"
5+
nexus_address = "[fd00:1de::7]:12221"
66

77
[db]
8-
address = "[fd00:1234::8]:8123"
8+
address = "[fd00:1de::8]:8123"
99
batch_size = 1000
1010
batch_interval = 5 # In seconds
1111

@@ -14,4 +14,4 @@ level = "debug"
1414
mode = "stderr-terminal"
1515

1616
[dropshot]
17-
bind_address = "[fd00:1234::6]:12223"
17+
bind_address = "[fd00:1de::6]:12223"

smf/sled-agent/config-rss.toml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,40 @@
11
# RSS (Rack Setup Service) "stand-in" configuration.
22

33
[[request]]
4-
sled_address = "192.168.1.201:12345"
4+
sled_address = "[fd00:1de::]:12345"
55

66
[[request.partition]]
77
zpool_uuid = "d462a7f7-b628-40fe-80ff-4e4189e2d62b"
8-
address = "[fd00:1234::9]:32345"
8+
address = "[fd00:1de::9]:32345"
99
partition_kind.type = "crucible"
1010

1111
[[request.partition]]
1212
zpool_uuid = "e4b4dc87-ab46-49fb-a4b4-d361ae214c03"
13-
address = "[fd00:1234::10]:32345"
13+
address = "[fd00:1de::10]:32345"
1414
partition_kind.type = "crucible"
1515

1616
[[request.partition]]
1717
zpool_uuid = "f4b4dc87-ab46-49fb-a4b4-d361ae214c03"
18-
address = "[fd00:1234::11]:32345"
18+
address = "[fd00:1de::11]:32345"
1919
partition_kind.type = "crucible"
2020

2121
[[request.partition]]
2222
zpool_uuid = "d462a7f7-b628-40fe-80ff-4e4189e2d62b"
23-
address = "[fd00:1234::5]:32221"
23+
address = "[fd00:1de::5]:32221"
2424
partition_kind.type = "cockroach_db"
2525
partition_kind.all_addresses = [
26-
"[fd00:1234::5]:32221",
26+
"[fd00:1de::5]:32221",
2727
]
2828

2929
[[request.partition]]
3030
zpool_uuid = "d462a7f7-b628-40fe-80ff-4e4189e2d62b"
31-
address = "[fd00:1234::8]:8123"
31+
address = "[fd00:1de::8]:8123"
3232
partition_kind.type = "clickhouse"
3333

3434
[[request.service]]
3535
name = "nexus"
36-
addresses = [ "[fd00:1234::7]:12221", "192.168.1.123:12220" ]
36+
addresses = [ "[fd00:1de::7]:12220", "[fd00:1de::7]:12221" ]
3737

3838
[[request.service]]
3939
name = "oximeter"
40-
addresses = [ "[fd00:1234::6]:12223" ]
40+
addresses = [ "[fd00:1de::6]:12223" ]

smf/sled-agent/config.toml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ id = "fb0f7546-4d46-40ca-9d56-cbb810684ca7"
44

55
bootstrap_address = "[::]:12346"
66
# Internal address of Nexus
7-
nexus_address = "[fd00:1234::7]:12221"
7+
nexus_address = "[fd00:1de::7]:12221"
88

99
# A file-backed zpool can be manually created with the following:
1010
# $ truncate -s 10GB testpool.vdev
@@ -25,16 +25,8 @@ zpools = [
2525
# With the usage of non-global zones, we no longer can use localhost addresses,
2626
# as Nexus (within a Zone) is effectively "on a different machine" from the
2727
# sled agent.
28-
#
29-
# This address may be allocated with the following command:
30-
#
31-
# pfexec ipadm create-addr -t -T static -a 192.168.1.201 $(dladm show-phys -p -o LINK)/sled4
32-
# | | |
33-
# Please | |
34-
# Create a temporary static address |
35-
# On whatever physical datalink I have
3628
[dropshot]
37-
bind_address = "192.168.1.201:12345"
29+
bind_address = "[fd00:1de::]:12345"
3830

3931
[log]
4032
level = "info"

0 commit comments

Comments
 (0)