Skip to content

Commit

Permalink
update help
Browse files Browse the repository at this point in the history
Created using spr 1.3.6-beta.1
  • Loading branch information
sunshowers committed Jul 28, 2024
1 parent ba16926 commit 3274aa5
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 14 deletions.
22 changes: 11 additions & 11 deletions docs/how-to-run-simulated.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ You don't need to do this again if you just did it. But you'll need to do it ea

To **run Omicron** you need to run several programs:

* a CockroachDB cluster. For development, you can use the `omicron-dev` tool in this repository to start a single-node CockroachDB cluster **that will delete the database when you shut it down.**
* a ClickHouse server. You should use the `omicron-dev` tool for this as well, see below, and as with CockroachDB,
* a CockroachDB cluster. For development, you can use the `cargo xtask omicron-dev` tool in this repository to start a single-node CockroachDB cluster **that will delete the database when you shut it down.**
* a ClickHouse server. You should use the `cargo xtask omicron-dev` tool for this as well, see below, and as with CockroachDB,
the database files will be deleted when you stop the program.
* `nexus`: the guts of the control plane
* `sled-agent-sim`: a simulator for the component that manages a single sled
Expand All @@ -64,11 +64,11 @@ You can run these by hand, but it's easier to use `omicron-dev run-all`. See be

=== Quick start

. Run `omicron-dev run-all`. This will run all of these components with a default configuration that should work in a typical development environment. The database will be stored in a temporary directory. Logs for all services will go to a single, unified log file. The tool will print information about reaching Nexus as well as CockroachDB:
. Run `cargo xtask omicron-dev run-all`. This will run all of these components with a default configuration that should work in a typical development environment. The database will be stored in a temporary directory. Logs for all services will go to a single, unified log file. The tool will print information about reaching Nexus as well as CockroachDB:
+
[source,text]
----
$ omicron-dev run-all
$ cargo xtask omicron-dev run-all
omicron-dev: setting up all services ...
log file: /dangerzone/omicron_tmp/omicron-dev-omicron-dev.4647.0.log
note: configured to log to "/dangerzone/omicron_tmp/omicron-dev-omicron-dev.4647.0.log"
Expand Down Expand Up @@ -98,11 +98,11 @@ There are many reasons it's useful to run the pieces of the stack by hand, espec

CAUTION: This process does not currently work. See https://github.com/oxidecomputer/omicron/issues/4421[omicron#4421] for details. The pieces here may still be useful for reference.

. Start CockroachDB using `omicron-dev db-run`:
. Start CockroachDB using `cargo xtask omicron-dev db-run`:
+
[source,text]
----
$ cargo run --bin=omicron-dev -- db-run
$ cargo xtask omicron-dev db-run
Finished dev [unoptimized + debuginfo] target(s) in 0.15s
Running `target/debug/omicron-dev db-run`
omicron-dev: using temporary directory for database store (cleaned up on clean exit)
Expand Down Expand Up @@ -157,7 +157,7 @@ Note that as the output indicates, this cluster will be available to anybody tha
+
[source,text]
----
$ cargo run --bin omicron-dev -- ch-run
$ cargo xtask omicron-dev ch-run
Finished dev [unoptimized + debuginfo] target(s) in 0.47s
Running `target/debug/omicron-dev ch-run`
omicron-dev: running ClickHouse (PID: 2463), full command is "clickhouse server --log-file /var/folders/67/2tlym22x1r3d2kwbh84j298w0000gn/T/.tmpJ5nhot/clickhouse-server.log --errorlog-file /var/folders/67/2tlym22x1r3d2kwbh84j298w0000gn/T/.tmpJ5nhot/clickhouse-server.errlog -- --http_port 8123 --path /var/folders/67/2tlym22x1r3d2kwbh84j298w0000gn/T/.tmpJ5nhot"
Expand All @@ -167,7 +167,7 @@ omicron-dev: using /var/folders/67/2tlym22x1r3d2kwbh84j298w0000gn/T/.tmpJ5nhot f
If you wish to start a ClickHouse replicated cluster instead of a single node, run the following instead:
[source,text]
---
$ cargo run --bin omicron-dev -- ch-run --replicated
$ cargo xtask omicron-dev ch-run --replicated
Finished dev [unoptimized + debuginfo] target(s) in 0.31s
Running `target/debug/omicron-dev ch-run --replicated`
omicron-dev: running ClickHouse cluster with configuration files:
Expand Down Expand Up @@ -217,11 +217,11 @@ Dec 02 18:00:01.093 DEBG registered endpoint, path: /producers, method: POST, lo

While it's often useful to run _some_ part of the stack by hand (see above), if you only want to run your own Nexus, one option is to run `omicron-dev run-all` first to get a whole simulated stack up, then run a second Nexus by hand with a custom config file.

To do this, first run `omicron-dev run-all`:
To do this, first run `cargo xtask omicron-dev run-all`:

[source,text]
----
$ cargo run --bin=omicron-dev -- run-all
$ cargo xtask omicron-dev run-all
Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.95s
Running `target/debug/omicron-dev run-all`
omicron-dev: setting up all services ...
Expand Down Expand Up @@ -316,7 +316,7 @@ When you run the above, you will wind up with Nexus listening on HTTP (with no T
+
[source,text]
----
$ cargo run --bin=omicron-dev -- cert-create demo- '*.sys.oxide-dev.test'
$ cargo xtask omicron-dev cert-create demo- '*.sys.oxide-dev.test'
wrote certificate to demo-cert.pem
wrote private key to demo-key.pem
----
Expand Down
2 changes: 1 addition & 1 deletion docs/how-to-run.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ You can skip this step. In that case, the externally-facing services (API and c
You can generate a self-signed TLS certificate chain with:

----
$ cargo run --bin=omicron-dev -- cert-create ./smf/sled-agent/$MACHINE/initial-tls- '*.sys.oxide.test'
$ cargo xtask omicron-dev cert-create ./smf/sled-agent/$MACHINE/initial-tls- '*.sys.oxide.test'
----

=== Rack setup configuration
Expand Down
2 changes: 1 addition & 1 deletion test-utils/src/dev/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,7 +653,7 @@ impl Drop for CockroachInstance {
"WARN: temporary directory leaked: {path:?}\n\
\tIf you would like to access the database for debugging, run the following:\n\n\
\t# Run the database\n\
\tcargo run --bin omicron-dev db-run --no-populate --store-dir {data_path:?}\n\
\tcargo xtask omicron-dev db-run --no-populate --store-dir {data_path:?}\n\
\t# Access the database. Note the port may change if you run multiple databases.\n\
\tcockroach sql --host=localhost:32221 --insecure",
data_path = path.join("data"),
Expand Down
2 changes: 1 addition & 1 deletion wicket/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ Making this simpler is tracked in
The easiest way to do this is to run:

```
cargo run -p omicron-dev mgs-run
cargo xtask omicron-dev mgs-run
```

This will print out a line similar to `omicron-dev: MGS API: http://[::1]:12225`. Note the address for use below.
Expand Down

0 comments on commit 3274aa5

Please sign in to comment.